fix(typescript): add abstract_method_signature to tri-comparison audit's func_node_types - #2303
Merged
squid-protocol merged 2 commits intoAug 26, 2026
Conversation
squid-protocol
enabled auto-merge (squash)
August 26, 2026 22:23
…t's func_node_types tree-sitter-typescript parses a bodyless abstract method (e.g. `protected abstract createReferencedObject(...): T;`, vscode/lifecycle.ts:711-712) as a distinct abstract_method_signature node, separate from method_signature. tree_sitter_accuracy_audit.py's NODE_MAPS only listed method_signature, so the audit undercounted tree-sitter's own true signal by 2 and misreported it as GitGalaxy over-detecting -- the exact same ground-truth-tool-gap shape as the existing #1338 class_node_types fix just above it in the same file. GitGalaxy was already correct here (ledger shape typescript/function/existence/agree[gitgalaxy]_vs[ctags,tree_sitter] was already validated with credit_tools: [gitgalaxy]); this just fixes the audit tool so it no longer disagrees with a correct GitGalaxy result. Verified via a full-corpus, duplicate-aware (Counter, not set) name diff: before, 2 false "extra" occurrences in gitgalaxy vs. 0 missing; after, 0 extra, same 3 pre-existing (already-tracked, unrelated) missing occurrences untouched. Regenerated the tri-comparison chart/ledger/points-of-interest (--all --write per this repo's standing rule); the target shape's still_reproduces flipped to false automatically, no manual ledger edit needed. ruff/mypy audits clean. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Rebased onto main after its own auto-update companion workflow (docs: auto-update tri-comparison data #2299) landed the same generated artifacts -- the expected false-conflict-from-squash-merge shape this repo's tri-comparison-ledger-sweep skill documents. Resolved by keeping this branch's version of the three generated files through the rebase, then regenerating fresh on the new base (ctags confirmed real Universal Ctags first) rather than hand-merging. Target shape (typescript/function/existence/agree[gitgalaxy]_vs[ctags,tree_sitter]) confirmed still still_reproduces: false on the fresh base. ruff/mypy clean. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
squid-protocol
force-pushed
the
fix/typescript-abstract-method-signature-tricomparison
branch
from
August 26, 2026 22:27
9badb58 to
f9004de
Compare
squid-protocol
deleted the
fix/typescript-abstract-method-signature-tricomparison
branch
August 26, 2026 22:28
Contributor
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
Fixes the last remaining typescript
functiontri-comparison discrepancy (found via this repo'stri-comparison-ledger-sweepskill's step 2.5 full-corpus raw diff): GitGalaxy over-detecting 2 functions relative to tree-sitter invscode/lifecycle.ts(createReferencedObject/destroyReferencedObject, both bodylessprotected abstractmethod declarations).Root cause
tree-sitter-typescript parses a bodyless abstract method (
protected abstract createReferencedObject(key: string, ...args: unknown[]): T;, lifecycle.ts:711-712) as a distinctabstract_method_signaturenode, separate frommethod_signature.tests/tools/tree_sitter_accuracy_audit.py'sNODE_MAPS["typescript"]["func_node_types"]only listedmethod_signature, so the audit's own tree-sitter ground truth undercounted by 2 and misreported it as GitGalaxy over-detection. Same ground-truth-tool-gap shape as the existing#1338class_node_typesfix immediately below it in the same file (which addedinterface_declaration/enum_declaration).This is a tool-side bug in the audit, not a GitGalaxy defect: the ledger shape
typescript/function/existence/agree[gitgalaxy]_vs[ctags,tree_sitter]was alreadyvalidatedwith verdict "GitGalaxy correctly extracts abstract methods" andcredit_tools: [gitgalaxy]— this PR just fixes the audit tool so it stops disagreeing with an already-confirmed-correct GitGalaxy result.Fix
Added
"abstract_method_signature"to typescript'sfunc_node_typesset._get_node_name's existing generic field-lookup already resolves the name correctly for this node type (confirmed via direct parse) — no special-case needed.Verification
collections.Counter, not a naive set diff — a set diff undercounts same-name duplicates) name diff viatri_comparison_gatherer.gather_language('typescript'):ctags --versionconfirmed real Universal Ctags before regen.tri_comparison_chart.py --all --write(full 45-language regen).tri_comparison_report.py --write.tests/ruff_audit.py --ci— no new findings.tests/mypy_audit.py --ci— no new findings.still_reproducesauto-flippedtrue→false, no manual edit) plus expected downstream ripple in sibling typescript shapes from the reconciler's per-file RANK-based pairing now that tree-sitter's own signal is more complete; one unrelatedphpentry changed only due to a non-deterministic anonymous-class hash name from ctags, not this change.Test plan
tri_comparison_chart.py --all --writetri_comparison_report.py --writetests/ruff_audit.py --citests/mypy_audit.py --ci🤖 Generated with Claude Code