Skip to content

Call-graph reference: Rust via rust-analyzer SCIP on serde-rs/json (Part of #3785) - #6399

Merged
squid-protocol merged 2 commits into
mainfrom
churn/3785-20261024T0718Z
Oct 24, 2026
Merged

squid-protocol merged 2 commits into
mainfrom
churn/3785-20261024T0718Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #3785 (adapter slice; the baseline is not in this PR).

What

  • tests/tools/callgraph_refs.py: rust reference (rust-analyzer, SCIP, serde-rs/json from tests/import_graph_corpus.json).
  • tests/tools/scip_callgraph.py: rust_analyzer_contract (rust-analyzer scip <repo> into the shared contract_from_index), rust_analyzer_version (None without cargo + rust-analyzer, so other machines skip), a turbofish f::<T>( call is a call, and a bracket descriptor holding a quoted ] (impl#[[u8]]first().) parses whole.
  • tests/tools/test_scip_callgraph.py: hand-built SCIP index: impl methods, trait default method, bodyless trait method (not a def, Call resolver (TypeScript): confident links land on bodyless signatures (interface / abstract / type members) instead of the code that runs #3757), turbofish, macro reference (no edge), fn used as a value (no edge), external call; plus the slice-type descriptor.
  • docs/graph_accuracy.md: checks-table row and "What the Rust reference cannot see": serde-derive / macro-generated calls are a deliberate limit, not a defect.

Class / Sibling gaps

Class: onboarding a language's compiler-resolved call-graph reference through the shared SCIP adapter (scip-java is the worked member; Rust is this one). Same-mechanism siblings are the other SCIP languages of #3783 and #3784; each is one registry entry plus a build function, none touched here. No burned mainframe estate needs any of them.
Remaining slices (this PR is at 4 hand-written files, but they need a Rust toolchain and workflow permission):

  1. Install pinned toolchain (rustup 1.90.0 + rust-analyzer), run call_graph_resolution.py rust --regenerate, commit tests/call_graph_resolution_rust_baseline.json, hand-check about 10 samples each of wrong / external / unconfirmed, verify rust-analyzer emits enclosing_range and the impl symbol shape, and confirm the 1.90.0 pin (it is my choice, not measured).
  2. .github/workflows/graph-accuracy-audit.yml gate step + paths, .claude/hooks/session-start.sh install (needs allow_workflows).
  3. docs/function_call_graph.md numbers once the baseline exists.

Verification

  • pytest (plain, from /tmp): test_scip_callgraph, test_call_graph_resolution_gate, test_callgraph_tools, test_source_reads: 45 passed.
  • pr_gates --fast 7/7; audit_check.py all clear.
  • callgraph_check.py: gates java/javascript/typescript PASS, tests 358 passed; gate:rust and gate:python MISSING (tool not installed); crucible/tree-sitter steps FAIL locally on environment (not touched by this PR; crucible log: tiktoken cache).
  • Not run: pr_gates --ratchets (no engine parsing change).
  • The adapter has NOT been run against a real rust-analyzer index.

🤖 Generated with Claude Code

…art of #3785)

A rust entry in callgraph_refs.REFERENCES, rust_analyzer_contract /
rust_analyzer_version in scip_callgraph.py (shared SCIP adapter), turbofish
call detection and quoted-slice impl descriptors, fixture tests and docs.
No baseline yet: no Rust toolchain on the authoring box.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-protocol squid-protocol added shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md and removed shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md labels Oct 24, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol marked this pull request as ready for review October 24, 2026 07:24
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol enabled auto-merge (squash) October 24, 2026 07:25
@squid-protocol

Copy link
Copy Markdown
Owner Author

This PR conflicts with main, so no checks ran. Merge origin/main into it and regenerate generated files with their tools (never hand-merge them), then push.

@squid-protocol squid-protocol added shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md and removed shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md labels Oct 24, 2026
@squid-protocol squid-protocol removed the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 24, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

CI shepherd: the head of this PR (6e799c1) is not the one a maintainer labelled shepherd:merge on (new commits, or never approved), so the label was removed and nothing merges unreviewed code. Re-add the label when the new head is ready (shepherd:reapprove marks this PR until then).

@squid-protocol squid-protocol added shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md and removed shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md shepherd:reapprove Bot: new commits dropped shepherd:merge; re-add it to merge this head. Guide: docs/ci.md labels Oct 24, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol enabled auto-merge (squash) October 24, 2026 07:46
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol merged commit 93f1ded into main Oct 24, 2026
34 checks passed
@squid-protocol
squid-protocol deleted the churn/3785-20261024T0718Z branch October 24, 2026 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant