Skip to content

Call-graph accuracy: measure kotlin, scala, swift, lua (Part of #3641) - #6396

Merged
squid-protocol merged 1 commit into
mainfrom
churn/3641-20261024T0651Z
Oct 24, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
churn/3641-20261024T0651Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #3641 (step 2, coverage sweep, calls half). Checklist: partial -- calls now measured for kotlin, scala, swift, lua; rest of the gap map remains.

What

call_graph_accuracy.py scores callee names (Level 1) for kotlin, scala, swift and lua, against tree-sitter. Tool and test change only: no engine, so no golden re-bless.

Harness fixes (mechanical, not verdicts): kotlin/swift call_expression and scala instance_expression have no callee field (callee is the first named child); scala stable_type_identifier names its last segment; a swift x["k"] subscript parses as a call and is not one (C3); lua function_call.

language functions precision recall
kotlin 27 (small: one crucible file) 96.8% 90.9%
scala 541 97.9% 89.3%
swift 132 99.0% 75.2%
lua 623 97.5% 98.2%

New ledger shapes (26) are all unvalidated; existing shapes are untouched (the count churn stays with the history workflow).

Class / Sibling gaps

Class: a tree-sitter-comparable language with crucible data but no Level-1 callee measurement. Covered here: kotlin, scala, swift, lua. Sibling gaps: zig (call nodes are SuffixExpr/FnCallArguments, needs its own callee mapping); dart, haskell, perl, powershell, objective-c, apex, tcl, fortran, matlab, ada, scheme, makefile (need NODE_MAPS call mapping; groovy has no NODE_MAPS entry). Engine gaps the numbers show: swift trailing-closure calls (x.map { }, 82 of 94 FN), scala new a.B[T]() and call-chain misses. No burned mainframe estate needs any of these.

Gates

call_graph_accuracy --ci OK; graph_coverage_chart --check current; pr_gates --fast 7/7; --ratchets 9/9; tree-wide guard tests and changed tests pass (35 tests, time ratchet clean).

🤖 Generated with Claude Code

Step 2 of the epic, calls half. call_graph_accuracy.py now scores callee names for four more
tree-sitter-comparable languages. Harness fixes: kotlin/swift call_expression and scala
instance_expression carry no callee field, scala stable_type_identifier names its last
segment, a swift subscript is no call (C3), lua function_call. Baseline and ledger seeded
(new shapes only, all unvalidated).

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-protocol squid-protocol added 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

No description provided.

@squid-protocol
squid-protocol marked this pull request as ready for review October 24, 2026 07:06
@squid-protocol
squid-protocol enabled auto-merge (squash) October 24, 2026 07:07
@squid-protocol
squid-protocol merged commit cfd5af2 into main Oct 24, 2026
51 checks passed
@squid-protocol
squid-protocol deleted the churn/3641-20261024T0651Z branch October 24, 2026 07:19
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