Skip to content

plan: CALLS noise + resolution (propose rev5 + PLAN + prompts)#179

Merged
HumanBean17 merged 3 commits into
masterfrom
plan/calls-noise
May 19, 2026
Merged

plan: CALLS noise + resolution (propose rev5 + PLAN + prompts)#179
HumanBean17 merged 3 commits into
masterfrom
plan/calls-noise

Conversation

@HumanBean17
Copy link
Copy Markdown
Owner

@HumanBean17 HumanBean17 commented May 19, 2026

Summary

Builds on merged propose #178 (revision 3 on master). This branch adds revision 4 implementation-contract patches plus revision 5 anchor/prompt fixes.

Tracks #177.

What changed in revision 4 (propose)

  • ORDER BY on neighbors(out, ['CALLS']) — source-order transcript at MCP, not just in the graph.
  • edge_filter pushdown — filter in Cypher before limit, not post-fetch truncation.
  • exclude_external stays on find_callers only; JDK noise on neighbors uses edge_filter.
  • HINTS/ontology PR-3 checklist, supertype-dedup pseudocode, /mini-map cross-link for accessor noise.

What changed in revision 5 (this branch)

  • Fixture anchors: ClientMessageProcessor#process (bank); call_graph_smoke for supertype dedup + overload_ambiguous (not fictional OrderService / MyRepository).
  • HV37 awkward-case footnote: exclude_external only on find_callers/find_callees; OTHER role filter bluntness documented.
  • Test names unified (pushdown_in_cypher, perf test ..._client_message_processor, heavy-gated).
  • PR-2: unresolved-calls CLI deferred to PR-3 (no empty stub).
  • PR-3: interleave tie-break + dedup_calls canonical line in plan.
  • CURSOR-PROMPTS-CALLS-NOISE.md — iteration-loop tests, sentinels, scope per PR.

Plan (no code in this PR)

PR What Breaking?
PR-1 callee_declaring_role on CALLS + supertype dedup + counters Re-index, ontology 15; row-count delta at dedup sites
PR-2 edge_filter on neighbors_v2 + ORDER BY + pushdown No
PR-3 Move phantom/chained receiver failures to UnresolvedCallSite Yes

Test plan

  • Propose + plan + prompts review only (no runtime tests in this PR)
  • After merge: implement PR-1 → PR-2 → PR-3 per plans/CURSOR-PROMPTS-CALLS-NOISE.md

Locks ORDER BY and edge_filter pushdown, exclude_external stance,
HINTS PR-3 checklist, supertype dedup pseudocode, and mini-map cross-link.
Status under review; per-PR sentinels in plans/PLAN-CALLS-NOISE.md.

Co-authored-by: Cursor <cursoragent@cursor.com>
Copy link
Copy Markdown
Owner Author

@HumanBean17 HumanBean17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review (revision 4 + plan)

Verdict: approve with doc fixes before merge. This is a solid implementation contract on top of merged #178. I would not start PR-1 until fixture anchors and CURSOR-PROMPTS-CALLS-NOISE.md are settled.

What looks good

  • ORDER BY + pushdown (Decisions 36–37) match real code: neighbors_v2 flat CALLS path has no ORDER BY and slices in Python (mcp_v2.py ~1391–1459). Locking ORDER BY e.call_site_line, e.call_site_byte with predicates before offset/limit is the right fix for #177-style truncation.
  • Phantom split line refs are accurate: remove chained_receiver (1190–1200) and unresolved-receiver phantom (1202–1212); keep known-external (1257–1271) and overload_ambiguous (1284–1289).
  • §3.9.1 HINTS checklist is necessary — FUZZY_STRATEGY_SET still includes phantom / chained_receiver; PR-3 will break hints without H1–H8.
  • 3-PR landing order (additive schema → MCP filter → breaking graph) is sound.

Blockers (please fix in this PR)

  1. Fixture / test anchors are fictional or absent on bank-chat-system:

    • OrderService.process does not exist in the fixture (HV1, HV21, HV34, perf test name). Pin a real method — e.g. ClientMessageProcessor#process (~57 outbound CALLS on a fresh bank index).
    • test_pass3_supertype_dedup_jpa_repository_save_one_row (MyRepository extends JpaRepository) — no such type in bank; also zero same-site duplicate save CALLS today. Use tests/fixtures/call_graph_smoke/ or a small dedicated fixture per tests/README.md.
    • test_pass3_overload_ambiguous_still_n_rows on bank — overload_ambiguous count is 0 in bank graph; needs a dedicated fixture, not bank alone.
  2. Internal contradiction on exclude_external: Decision 38 / §3.4.2 correctly say it is not on neighbors, but §4.5 HV37 note still says agents can use exclude_external=True for library noise without scoping to find_callers / find_callees. Please fix that sentence (and grep for similar slips).

  3. Test name drift: propose §3.4.1 has test_neighbors_calls_edge_filter_pushdown_role; plan PR-2 has test_neighbors_calls_edge_filter_pushdown_in_cypher — pick one verbatim name in both files.

  4. Plan header: still points at #178 as the active propose PR; #178 is already merged. Update to #179 / “rev4 in this PR”.

  5. Missing CURSOR-PROMPTS-CALLS-NOISE.md: plan defers until PR-1. Repo norm is plan + prompts together (plans/completed/CURSOR-PROMPTS-*.md). Please add a skeleton prompt file in this PR or open a follow-up before any code lands.

Non-blocking (implementation / prompts)

  • Post–PR-3 JDK noise via exclude_callee_declaring_roles: ['OTHER'] is blunt (known-external rows are also OTHER) — ensure AGENT-GUIDE states this clearly.
  • Perf test 1.5× median will flake in CI unless gated (JAVA_CODEBASE_RAG_RUN_HEAVY or skip) — plan says “optional heavy” but also lists under deliverables; resolve in prompts.
  • Prefer deferring unresolved-calls CLI stub to PR-3 (empty output before UCS tables is misleading).
  • PR-3: specify pagination / tie-break for include_unresolved interleave and canonical line when dedup_calls=True.
  • PR-2 sentinels: treat rg "LIMIT.*call_site" as advisory; rely on named tests for pushdown-before-limit.
  • PR-1 still changes row count via supertype dedup — call that out in README re-index notes (not only “additive column”).

Merge checklist

  • Replace OrderService.process with real bank method IDs (or label as illustrative + pin test IDs).
  • Fixture paths for supertype dedup + overload_ambiguous tests.
  • Fix §4.5 HV37 exclude_external wording.
  • Unify pushdown test name; update plan header (#178#179).
  • Add CURSOR-PROMPTS-CALLS-NOISE.md or explicit follow-up before code PRs.

Happy to re-review after a small doc pass.

Pin ClientMessageProcessor#process fixture anchors, fix HV37 exclude_external
wording, unify test names, defer CLI to PR-3, and add per-PR Cursor handoffs.

Co-authored-by: Cursor <cursoragent@cursor.com>
@HumanBean17 HumanBean17 changed the title plan: CALLS noise + resolution (propose rev4 + PLAN) plan: CALLS noise + resolution (propose rev5 + PLAN + prompts) May 19, 2026
Correct appendix B (prompts landed in #179); add prompts link in header.

Co-authored-by: Cursor <cursoragent@cursor.com>
@HumanBean17 HumanBean17 merged commit f57a04c into master May 19, 2026
1 check passed
@HumanBean17 HumanBean17 deleted the plan/calls-noise branch May 23, 2026 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant