Skip to content

Call-graph skills: language onboarding, miss sweep, Haiku triage scout (#3779, #3780) - #3795

Merged
squid-protocol merged 2 commits into
mainfrom
claude/optimistic-heisenberg-bta91d
Sep 26, 2026
Merged

squid-protocol merged 2 commits into
mainfrom
claude/optimistic-heisenberg-bta91d

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Summary

The second PR under epic #3772. It turns the call-graph tools from #3793 into routines that are repeatable and cheap on tokens.

--split resolved_outside on zod (269 edges):

shape:receiver edges issue
qualified:z 133 #3789
qualified:processors 53 #3788
spread + spread-qualified:errorUtil 40 + 24 #3787
rest (util.x(), bare, other) 19

Earlier I counted about 51 spreads by eye; the deterministic count is 64.

A re-run of the scout trial with these instructions reproduced the tool output exactly.

Type of change

  • Documentation / tooling (skills, agent, test tooling). No engine change.

CI checklist

  • ruff format and the ruff, mypy and dead-key audits pass
  • New tests: 11 call_shape cases, split on the fixture scan, and the JSON excerpt

Differential Scan target

N/A: no parsing or engine code changed, so golden masters are unaffected.

Verification

python tests/tools/callgraph_check.py --langs typescript,python --skip crucible,tree-sitter (crucible and tree-sitter skipped because nothing in the engine changed):

PASS     gate:typescript    precision 99.9% (1520) recall 57.1% resolution 73.7%  [baseline 99.9% / 57.1% / 73.7%]
PASS     gate:python        precision 99.8% (1806) recall 51.6% resolution 97.5%  [baseline 99.8% / 51.6% / 97.5%]
PASS     tests              301 passed
PASS     lint:ruff / lint:dead-key / lint:mypy / lint:format

Closes #3779
Closes #3780

🤖 Generated with Claude Code

https://claude.ai/code/session_01AbvXUJpva5XxxbssoKG9Jt


Generated by Claude Code

#3779, #3780)

- .claude/skills/callgraph-language-onboarding: the checklist for adding a
  language's compiler reference (tool/pin traps, corpus choice, adapter naming
  rules, registry, fixture test, sanity checks, baseline/CI/hook, docs).
- .claude/skills/callgraph-miss-sweep: triage -> known-pattern table -> source
  verification -> explain_call root cause -> fix -> net-change rule -> ship.
- .claude/agents/callgraph-triage-scout (haiku): mechanical triage/split/explain
  runs and issue drafts; pastes tool output verbatim, never judges.
- callgraph_triage.py: --split BUCKET classifies a bucket's call sites by shape
  and receiver deterministically (a Haiku trial misclassified them by eye);
  --json samples now carry their source excerpt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AbvXUJpva5XxxbssoKG9Jt
@squid-protocol squid-protocol added this to the Compiler call-graph comparison milestone Sep 26, 2026 — with Claude
@squid-protocol squid-protocol added documentation Updates to standard operating procedures, guides, or wiki testing Unit, integration, and E2E pipeline verification labels Sep 26, 2026 — with Claude
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

Copy link
Copy Markdown
Owner Author

full-suite-matrix (windows-latest, 3.9) is red, but not because of this PR. Two tests fail with KeyError: 'src/LEDGER.cbl':

  • tests/cobol_mainframe/test_refractor_engine_channels.py::test_open_sites_survive_a_delta_scan
  • tests/cobol_mainframe/test_refractor_engine_channels.py::test_a_baseline_without_open_sites_still_rehydrates

This PR changes only skills, an agent file, docs and tests/tools/callgraph_triage.py plus its test. The failing file came in with #3768. The same failure hit #3793's Windows run, and origin/main still has the unfixed test.

Cause: on Windows, StateRehydrator(...).load_state(...)["ram_cache"] is keyed by native src\LEDGER.cbl paths, but the tests index it with "src/LEDGER.cbl".

Fix: no fix PR exists yet. The test-only patch is in my comment on #3793: a _cached(cache, rel) helper that looks the key up with / or os.sep. Or ram_cache keys could be normalised to / in state_rehydrator.py, if that is the intended contract. I haven't widened this PR with either change; it should land on its own.


Generated by Claude Code

…ive paths)

The rehydrated ram_cache is keyed by native paths (src\LEDGER.cbl on Windows),
so indexing it with "src/LEDGER.cbl" failed the Windows matrix since #3768.
Test-only: look the key up via a _cached(cache, rel) helper.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AbvXUJpva5XxxbssoKG9Jt
@squid-protocol
squid-protocol merged commit 5216740 into main Sep 26, 2026
38 checks passed
@squid-protocol
squid-protocol deleted the claude/optimistic-heisenberg-bta91d branch September 26, 2026 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Updates to standard operating procedures, guides, or wiki testing Unit, integration, and E2E pipeline verification

Projects

None yet

2 participants