Commit 7a88eb2
committed
propose(calls-noise): revision 3 — review-driven restructure
Applies the 12-item amendment plan posted at #178 issuecomment-4487386547.
Reverses three round-1/round-2 decisions that the external review correctly
flagged as data-loss or contract violations.
Six blockers addressed:
1. Known-external CALLS preservation (build_ast_graph.py:1257-1271).
- Decision 1 / Principle 5 / §3.1 / §3.3 / §3.10 / HV37 / Decision 34:
CALLS sheds *only* strategy='phantom' (unresolved receiver) and
strategy='chained_receiver'. Receiver-resolved-but-callee-not-indexed
rows stay in CALLS with resolved=False and preserved receiver-tier
strategy/confidence/arg_count metadata.
- Decision 2 reversed: 'resolved BOOLEAN' STAYS in CALLS DDL.
2. Multi-candidate dedup scope-narrowed (Decision 33).
- Supertype-walk dedup only (one concrete + N inherited supertype
declarations -> collapse to concrete).
- overload_ambiguous rows preserved as N rows. The 'one row per
ambiguous site' phrasing from round-2 deleted; resolver ambiguity
stays visible to find_callers/explain.
3. edge_filter fail-loud (Principle 7 + Decision 10 reversed; HV13).
- Mixed edge_types + edge_filter raises ValueError with a teaching
message matching the existing _nodefilter_inapplicable_fields
pattern at mcp_v2.py:191-206. Silent no-op was the wrong call.
4. include_unresolved + edge_filter mutex restored (Decision 25 + HV23).
- The round-2 'compose them' reversal would have reintroduced
unfiltered phantom/chained noise into the interleaved transcript
view. Mutually exclusive (fail-loud), as in revision 1.
5. neighbors_v2 stays one-hop.
- HV28 (depth=2 walk) deleted entirely. Decision 21 deleted.
- README:12 + mcp_v2.py:39 ('Stored graph edge labels for one-hop
neighbors.') are the locked contract; multi-hop needs its own
propose (visited-set, cycles, fanout cap, hint behavior).
6. CLI binary rename: 'pc' -> 'java-codebase-rag'.
- docs/JAVA-CODEBASE-RAG-CLI.md:1-17 is the source of truth.
- All §3.6 / HV8 / HV9 / HV26 CLI references updated.
Counters reduced 3 -> 2:
- pass3_unresolved_phantom_receiver, pass3_unresolved_chained.
- No more pass3_unresolved_name_only (those rows stay in CALLS).
- UnresolvedCallSite.reason enum reduced to two values; name_only branch
removed. UnresolvedCallSite gains arg_count INT64.
New decisions:
- Decision 34: known-receiver-external rows preserved in CALLS.
- Decision 35: fail-loud validator on _nodefilter_inapplicable_fields.
Sub-PR sequence reordered for safer adoption (per reviewer's suggestion):
- PR-1: callee_declaring_role + supertype-walk dedup + GraphMeta counters
(strictly additive).
- PR-2: EdgeFilter + CLI stub (strictly additive).
- PR-3: UnresolvedCallSite + UNRESOLVED_AT + phantom/chained branch
removal + include_unresolved + dedup_calls (only breaking PR).
Counts: 35 decisions (was 33), 37 use cases (HV1-HV37; deleted HV28 and
the old HV38, added HV37), 8 principles (Principle 7 reversed), 3 PRs.
Tracks: #177
PR: #1781 parent 11a526f commit 7a88eb2
1 file changed
Lines changed: 204 additions & 166 deletions
0 commit comments