Repository navigation
Description
Summary
Found while verifying #1504 (tcl's tree-sitter ground-truth args-counting fix, PR #1507). After fixing the ground truth, a distinct real bug in GitGalaxy's own tcl args engine regex became visible: Tcl's default-value parameter syntax, {paramName defaultValue} as a single braced pair inside the argument list, is overcounted.
Repro
proc faultsim_integrity_check {{db db}} {
...
}tree-sitter-tcl parses {{db db}}'s inner arguments node as a single argument child wrapping the whole {db db} span (confirmed via live parse) -- i.e. ground truth is real=1 (one parameter, db, with a default value also named db). GitGalaxy's own args regex measures got=2, i.e. it's splitting {db db} into two counted tokens instead of treating the braced pair as one parameter.
Same shape recurs across language-crucible/data/tcl/sqlite/tester.tcl (cksum, catchsafecmd, explain_i, ifcapable, etc. -- all real=N got=N+1, one extra count per default-valued parameter in the signature).
Suggested fix
Look at tcl's args rule in gitgalaxy/standards/language_standards.py -- it likely counts space-separated tokens without respecting Tcl's {name default} grouping syntax (distinct from the outer {...} that wraps the whole argument list). Needs to treat a nested {word word} pair as ONE parameter, not two, similar in spirit to how haskell's _count_haskell_pattern_list (#1505, PR pending) treats a parenthesized compound pattern as one token rather than naively whitespace-splitting.
Scope
Not fixed in this issue -- filed as a follow-up while working on a different args-counting fix, per repo convention (file incidental findings as their own issue rather than a PR-body footnote). Low priority: affects only tcl's args_exact_match measurement (currently 118/141, 83.7%) and the args structural-signal count for procs using this specific default-value syntax, not func_start/class_start naming accuracy.
Activity
fix(haskell): args regex misses signature-less equations and truncate…
fix(tcl): default-value braced-pair parameters overcounted in args (#…
docs(skill): record pool-of-5 round-3 gotchas -- watch-exit vs merge-…