fix(perl): correct misdiagnosed tri-comparison ledger entry crediting tree-sitter - #2307
Merged
squid-protocol merged 1 commit intoAug 27, 2026
Conversation
… tree-sitter perl/function/existence/agree[tree_sitter]_vs[ctags,gitgalaxy] (122 occurrences) credited tree_sitter with a "GitGalaxy misses subroutines with prototypes or signatures" verdict. Direct re-verification (raw galaxyscope scan + tri_comparison_gatherer.py against the real exiftool/ExifTool.pm corpus file) shows GitGalaxy and ctags each correctly report exactly 1 occurrence per sampled name, at the real definition. tree_sitter reports 2: the real definition plus a bodyless forward declaration -- the same grammar defect already closed as #1608. The shape only exists because tri_comparison_reconcile.py's rank-based pairing matches GitGalaxy/ctags' single real occurrence against tree_sitter's phantom forward-declaration rank instead of its real one, stranding tree_sitter's real occurrence as "tree_sitter-only." Removed the undeserved credit_tools entry and recorded the corrected verdict. Regenerated the chart for all languages per the standing --all --write rule; perl's Func Precision badge flips from tree-sitter to GitGalaxy (both are verified 100%, but tree-sitter's raw claim count included the phantom duplicates, dropping its confirmed precision to 941/1063). No other language or shape changed status/verdict/credit -- the rest of the diff is the routine last_reconciled_at refresh from a full regen. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Contributor
squid-protocol
deleted the
fix/perl-tri-comparison-forward-declaration-ledger
branch
August 27, 2026 01:35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
perl/function/existence/agree[tree_sitter]_vs[ctags,gitgalaxy](122 occurrences) wascredited to tree_sitter with the verdict "GitGalaxy misses subroutines with prototypes or
signatures" (Antigravity, 2026-08-24). That's a misdiagnosis -- it's what was dragging perl's
Func Precision badge onto tree-sitter and making perl look worse than GitGalaxy vs.
tree-sitter, when it isn't.
Direct re-verification (a raw
galaxyscopescan of the real corpus file, plus running theactual
tri_comparison_gatherer.pypipeline againstexiftool/ExifTool.pm) shows:(
ParseArguments,ReadValue,Filter,DecodeBits, etc.), at the real, body-bearingdefinition line, identical to each other in every case.
forward declaration a few hundred lines earlier (e.g.
sub Filter($$$);) -- the same grammardefect already root-caused and closed as tree-sitter ground truth: perl bodyless forward declarations counted as real functions GitGalaxy correctly ignores #1608.
The shape only exists because
tri_comparison_reconcile.pypairs same-named occurrences byrank (1st-with-1st, 2nd-with-2nd): tree_sitter's phantom forward-declaration entry sorts first
by line number, so GitGalaxy/ctags' single real occurrence gets rank-paired against
tree_sitter's phantom rank-1 entry instead of its real one -- stranding tree_sitter's real
occurrence as apparently "tree_sitter-only." GitGalaxy isn't missing anything here.
Changes
docs/self_scan/tri_comparison_ledger.json-- corrected the one entry (credit_toolscleared, verdict + investigation metadata replaced with the re-verified finding). Everything
else in the diff is the routine
last_reconciled_attimestamp refresh from a required--all --writeregen (no other shape's status/verdict/credit changed).docs/self_scan/tri_comparison_chart.svg-- regenerated. Perl's Func Precision badge flipsfrom tree-sitter to GitGalaxy: both are verified 100% correct, but tree-sitter's raw claim
count included the phantom duplicates, so its confirmed precision is actually 941/1063, not
1063/1063. Summary tally: GitGalaxy best 25->26, tree-sitter best 3->2.
Verification
ctags --versionconfirmed genuine Universal Ctags 5.9.0 (not the arduino-ctags shadowincident from Fix #1892: COBOL func_start regex reserved word shield #2111) before regenerating.
verdict/investigated_by/investigated_at/credit_toolschanged; all 182 entries got theexpected
last_reconciled_atbump and nothing else.language or metric moved.
Note: unrelated to open PR #2306 (typescript baseline regen) -- branched fresh off
main, nooverlap in scope or files.
🤖 Generated with Claude Code