Skip to content

fix(tests): _get_param_count node-type gaps deflated args_exact_match across 11 languages - #1340

Merged
squid-protocol merged 1 commit into
mainfrom
fix/args-identification-cross-language-ground-truth
Aug 12, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
fix/args-identification-cross-language-ground-truth

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Fixes #1339.

Summary

  • tests/tools/tree_sitter_accuracy_audit.py's _get_param_count (tree-sitter ground-truth arg
    counter for args_exact_match) had a counted_types whitelist built around JS/C-family
    grammars, never audited against the rest of NODE_MAPS -- 11 languages (csharp, scala, java,
    apex, typescript, php, ruby, go, swift, dart, matlab) each had their own real per-parameter node
    type (or an entirely missing field, for swift/dart/matlab) absent from it, silently measuring
    real=0 regardless of actual signature -- the exact same false-defect shape rust func_start misses bodyless multi-line trait method signatures (deserialize_* family) #1319 fixed for
    rust alone, whose own comment incorrectly claimed the gap was rust-specific.
  • Extended the whitelist with the confirmed real node type names (safe unconditionally -- none
    collide with any other NODE_MAPS language's existing names) and added swift/dart/matlab-specific
    branches for their no-field shapes, following the existing kotlin/objc/powershell precedent.

Impact (language-crucible, args_exact_match / args_comparable)

language before after
csharp 119/571 (20.8%) 535/571 (93.7%)
java 81/233 (34.8%) 222/233 (95.3%)
apex 34/38 (89.5%) 38/38 (100%)
scala 109/499 (21.8%) 481/499 (96.4%)
typescript 379/1566 (24.2%) 1484/1566 (94.8%)
php 484/1701 (28.5%) 1700/1701 (99.9%)
swift 16/92 (17.4%) 84/92 (91.3%)
dart 243/526 (46.2%) 454/526 (86.3%)
ruby 85/117 (72.6%) 89/117 (76.1%)
go 298/817 (stale local baseline) 731/817 (89.5%)
matlab 1/23 (4.3%) 22/23 (95.7%)

Zero regressions on every other NODE_MAPS language (rust, kotlin, objective-c, powershell,
javascript, c, cpp, css, fortran, zig, solidity, tcl, perl, haskell) -- c/cpp even improved
slightly as a side effect (1606→1609, 991→1004).

This is a ground-truth measurement fix, not necessarily a GitGalaxy product-accuracy fix -- in
most sampled cases GitGalaxy's own args counter was already correct (e.g. csharp's
GetParseDiagnostics(CancellationToken cancellationToken = default) measured real=0
pre-fix against GitGalaxy's already-correct got=1). See #1339 for the residual-mismatch triage
(largest remaining gaps trace to the tool's already-documented same-name-overload-collision
limitation, not new bugs) and two smaller single-language follow-ups noticed in passing (dart,
c) that weren't chased since they aren't cross-language.

Test plan

  • python tests/tools/tree_sitter_accuracy_audit.py --all --ci -- 31/31 languages pass
  • python tests/ruff_audit.py --ci -- no new findings
  • python tests/mypy_audit.py --ci -- no new findings
  • ruff format --check tests/tools/tree_sitter_accuracy_audit.py -- already formatted
  • Baselines regenerated for all 11 affected languages via --regenerate

🤖 Generated with Claude Code

… across 11 languages (#1339)

tree_sitter_accuracy_audit's ground-truth arg-count whitelist was built around
JS/C-family grammars and never audited against the rest of NODE_MAPS -- csharp,
scala, java, apex, typescript, php, ruby, go, swift, dart, and matlab each had
their own real per-parameter node type (or missing field entirely) absent from
it, silently measuring real=0 regardless of actual signature (same shape #1319
fixed for rust alone). args_exact_match roughly doubles to quadruples for most
of the 11 with zero regressions elsewhere; baselines regenerated accordingly.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol merged commit c58b31d into main Aug 12, 2026
30 checks passed
@squid-protocol
squid-protocol deleted the fix/args-identification-cross-language-ground-truth branch August 12, 2026 14:41
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.

tree_sitter_accuracy_audit: _get_param_count node-type whitelist missing real per-language parameter node types (11 languages)

1 participant