Repository navigation
Description
Summary
tests/tools/tri_comparison_gatherer.py's _count_ctags_signature_params (verification-only
tooling, not part of the shipped gitgalaxy package) splits a ctags signature: field on
top-level commas to count real parameters, tracking bracket-nesting depth but not string-literal
boundaries. A comma inside a quoted string-literal default value is miscounted as an extra
top-level parameter separator.
Evidence
Found via the tri-comparison-ledger-sweep on python/function/args/agree[gitgalaxy,tree_sitter]_vs[ctags]
(1 occurrence). numpy/crackfortran.py's markoutercomma(line, comma=','): has exactly 2 real
parameters (line, comma=',') -- GitGalaxy and tree-sitter both correctly report 2. ctags' own
raw signature text is also correct verbatim ((line, comma=','), confirmed via
ctags --fields=+S -x) -- the "3" was never a ctags defect, only this counting function's split,
which treated the literal comma inside the ',' string as a second separator.
Fix (shipped in the same PR)
Added quote-tracking (single/double, with backslash-escape awareness) to both depth-scan loops in
_count_ctags_signature_params, so a comma or bracket-like character inside a string literal is
ignored for splitting/depth purposes -- mirroring how detector.py's real engine shields string
literals before running any structural regex over source text.
Verified via direct spot-checks (markoutercomma's exact case plus several synthetic
quoted-comma/nested-bracket cases) -- this module has no existing pytest suite (verification-only
tooling with a hard tree_sitter_language_pack dependency), consistent with how this function's
three prior documented bug fixes (trailing comma, bare *// markers, C's (void)) were each
verified. No golden-master reblessing needed -- this file isn't part of the shipped engine
crucible_check.py exercises.
Not scoped to python specifically: any language whose ctags signature can contain a quoted
comma-bearing default value could show the same phantom-arg-count symptom. Filing narrowly here
since this pass only confirmed python's single occurrence; worth a quick sweep of other languages'
ledger args shapes if this pattern recurs.
Activity
Validate python tri-comparison ledger; fix Cython func_start recall g…