fix(typescript): resolve #2230 by ignoring multi-char operators in backward scanner - #2234
Merged
Merged
Conversation
… Obj-C, Swift, Tcl, TS
This commit resolves a batch of unvalidated tri-comparison shapes by improving extraction accuracy:
- **Objective-C**: Updated `func_start` to correctly match unparenthesized return types (e.g., `- unsigned char next_input_block`).
- **Swift**: Modified `detector.py` normalizer to preserve standard operator characters (e.g., `==`), preventing them from collapsing into `Unknown_Block`.
- **Tcl**: Updated `func_start` to optionally consume the inline brace-wrapped argument list so it isn't mistaken for the function body by the balanced-brace finder.
- **TypeScript**: Fixed arrow function `func_start` branch to permit up to 3 levels of nested parentheses in the return type, enabling extraction of `const fn = <T>(): (returnType<...>) => {`.
Closes #2214
Closes #2217
Closes #2218
Closes #2220
Also updates all relevant baselines (Tree-sitter accuracy, Crucible Golden Masters, Tri-comparison Ledger/Chart).
…thon/lisp collisions
…baseline Resolves #2230 by ignoring multi-character operators like <=, <<, and => in the detector's backward scanner. Also adds tri_comparison baseline for typescript.
squid-protocol
force-pushed
the
fix/tri-comparison-sweep-final-issues
branch
from
August 24, 2026 23:35
0cebaf1 to
9e8cadc
Compare
…eep-final-issues # Conflicts: # docs/self_scan/tree_sitter_accuracy_chart.svg # docs/self_scan/tree_sitter_accuracy_history.csv # docs/self_scan/tri_comparison_chart.svg # docs/self_scan/tri_comparison_ledger.json # docs/self_scan/tri_comparison_points_of_interest.md # tests/golden_master_audit.json # tests/golden_master_zero_dep_audit.json # tests/tree_sitter_accuracy_baseline_typescript.json
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.
Resolves #2230
Problem:
GitGalaxy was incorrectly dropping typescript functions like
createBinderwhen the backward scanner encountered bitwise operators (e.g.<<,<=) and misinterpreted them as generics.Additionally, the tree-sitter accuracy audit script was incorrectly preserving bodyless overloads for typescript (e.g.
pipeableinfp-ts) in its ground truth when they were represented asfunction_signaturenodes without a semicolon, causing them to falsely appear in the_missing_exampleslist even though GitGalaxy correctly drops them.Fix:
gitgalaxy/core/detector.pyto ignore multi-character operators like<=,<<,=>, and->instead of treating them as bracket boundaries.tests/tools/tree_sitter_accuracy_audit.pyto intentionally dropfunction_signaturenodes that do not end in a semicolon (aligning ground truth with GitGalaxy's own intentional drop of non-terminated prototypes).All tests, golden masters, and accuracy baselines have been updated.