Skip to content

Call-graph accuracy: measure powershell and tcl callee names (Part of #3641) - #6480

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

squid-protocol merged 2 commits into
mainfrom
churn/3641-20261024T1439Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #3641. Adds powershell and tcl to the Level 1 call-name measurement (tests/tools/call_graph_accuracy.py). Engine untouched, so no golden bless.

Checklist: partial [c:bf495ed4] -- calls half done for powershell and tcl; groovy is unmeasurable here; the import half and the other unmeasured languages remain

What changed

  • LANGS gains powershell and tcl; CALL_NODE_TYPES gains command and invokation_expression; new _ps_tcl_callee (wired into _callee).
    • powershell: command_name token is the callee; & $g and . ./a.ps1 (a command_name_expr) are dynamic/dot-sourcing and name no call; $o.Save(1) / [Foo]::Make(2) name the member_name; a property read ($o.Name) is no call.
    • tcl: the name field word is the callee; ns::k -> k; [cmd] substitution counts; commands after an ERROR node are still counted.
  • 3 tests in test_call_graph_accuracy.py (powershell shapes, tcl shapes, LANGS registration).
  • Regenerated: baseline, graph_comparison_ledger.json (43 new unvalidated shapes), graph_coverage_chart.svg.

Measured (language-crucible v1.7.0, raw, not a verdict)

language functions precision recall
powershell 460 77.7% 38.4%
tcl 369 69.8% 71.2%

Leads for later shape work: tcl engine names set, variable, file (a proc arg), expr that tree-sitter does not call; powershell engine names ForEach-Object/pipeline stages and property accesses that tree-sitter parses differently, and tree-sitter finds many calls the engine misses (recall 38%).

The baseline --regenerate also moved four existing languages (recall/precision up, no regressions: the committed baseline was stale against main) and the ledger added 8 perl shapes and refreshed last_reconciled_at.

Class / Sibling gaps

Class: languages with a tree-sitter grammar and a NODE_MAPS entry that are not in call_graph_accuracy.LANGS (no callee-name measurement). Covered here: powershell, tcl. Sibling gaps: groovy -- unmeasurable by this method (grammar has no class/method declaration nodes, tree_sitter_accuracy_audit.py documents it; no function ground truth to attribute calls to), needs a Level 2 / SCIP route; the import-graph coverage sweep and the shape bucketer/catalog items of #3641 are separate slices.

Gates

pr_gates --fast 7/7 pass, --ratchets all pass, audit_check clear, test_call_graph_accuracy.py + tree-wide guards pass.

Cross-repo: none (language-crucible pin unchanged). Overlap: #6473/#6476 touch the ledger/chart SVG; regenerate them from main if those merge first.

🤖 Generated with Claude Code

…3641)

Adds both languages to call_graph_accuracy LANGS with callee extraction for
powershell command/invokation_expression and tcl command nodes; baseline,
ledger and chart regenerated.

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 14:56
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol enabled auto-merge (squash) October 24, 2026 14:58
@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 the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label 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 (506e9e5) 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 15:20
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

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