Repository navigation
Commit 5c1e1c4
feat(S0-A): additive
Part A of S0 (`own-fix subscriptions candidates`). Roslyn extractor only; the
Python collector is Part B. Analysis-only, strictly additive, arbiter contract.
New internal flag `--fix-candidates`. With it OFF the facts JSON is byte-for-byte
identical (verified: flag-off vs pre-S0 `git stash` build diff clean) and
`ownir_version` is unchanged (0). With it ON:
- top-level `fix_candidates_version: 1` (additive metadata, NOT an ownir_version
bump — no new resource-kind or analysis-routing value);
- each component gains `qualified_name` (one documented FQN format) + type-shape
metadata (`is_partial`, `is_nested`, `declaration_count`, `is_generated`);
- each eligible non-timer `+=` subscription gains a namespaced `fix` block.
The `fix` block honours the locked amendments:
- **Full TextSpan** (`start`/`length` UTF-16 + start/end line/column), not a bare
line — a future rewriter needs the absolute span; two subs on one line differ.
- **Semantic INotifyPropertyChanged**, never name-matching: `event_contract` is
`inotify_property_changed` only for the actual `INotifyPropertyChanged.PropertyChanged`
member or a proven implementation; a same-named event on an unrelated type is
`name_only`; anything else `other`.
- **Symbol-based teardown**, separate from the existing string-keyed `released`
(which is untouched): `teardown.status` is `none` / `exact` (one `-=` site with
equal event symbol + receiver identity + handler identity) / `ambiguous`
(multiple sites, or any identity unresolved); each candidate carries its span.
- **Line-independent identity constituents** emitted for Part B to hash:
`enclosing_member`, `event_identity`, `source_identity`, `handler_identity`
(method symbol, else a normalized syntax fingerprint), `occurrence_ordinal`.
- **Nested-type boundary**: a `fix` block is attached only when the acquire's
IMMEDIATE containing type is this class (a nested class's subscription is fixed
under the nested type's own iteration, never the outer's). Existing subscription
facts (and `released`) are unchanged.
Sample `FixCandidatesSample.cs` + `tests/check_fix_candidates_facts.py` cover:
exact/none/ambiguous teardown, INPC vs name_only vs other, two-subs-one-line
distinct spans, wrapped-delegate normalization (`+= new H(m)` / `-= m` = exact),
nested isolation, and flag-off additive-cleanliness. CI step added; ruff +
run_tests green locally.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JxKjqdGEFzq4UzZupw379G--fix-candidates extractor metadata for subscription fixes1 parent ff21d4a commit 5c1e1c4
4 files changed
Lines changed: 570 additions & 17 deletions
File tree
- .github/workflows
- frontend/roslyn
- OwnSharp.Extractor
- samples
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1608 | 1608 | | |
1609 | 1609 | | |
1610 | 1610 | | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
| 1614 | + | |
| 1615 | + | |
| 1616 | + | |
| 1617 | + | |
| 1618 | + | |
| 1619 | + | |
| 1620 | + | |
| 1621 | + | |
| 1622 | + | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
| 1629 | + | |
| 1630 | + | |
1611 | 1631 | | |
1612 | 1632 | | |
1613 | 1633 | | |
| |||
0 commit comments