chore: regenerate tree-sitter-accuracy baselines orphaned by #2415 - #2422
Merged
Conversation
#2415 (aperture infra_path_pattern left-boundary fix) newly included ~20 real source files across the corpus, but tree-sitter-accuracy-audit.yml does not trigger on aperture.py, so it merged without regenerating the affected baselines. `tree_sitter_accuracy_audit.py --all --ci` has been red on main for every detector.py/prism.py/language_standards.py PR since. Every number here is `measure()`'s own output, not hand-edited. No engine code changes. - shell: 31.6% -> 99.1% func recall, 68.3% -> 97.0% precision. This is #2401 / #2406's shell Mode-D fixes finally reflected in the baseline (found_functions 140 -> 449, extra 65 -> 14); the +6 files / +10 real functions from #2415 are a small part of it. - powershell: func recall/precision unchanged (100%/100%); +3 files, args_exact_match 234 -> 252 of 257. - c 99.0 -> 99.7% · lua 78.2 -> 78.7% · tcl 98.6 -> 100.0% · ruby args_exact_match 115 -> 121 -- all `found_functions` improvements from the +1 file each, already passing --ci ("improved on ..."), locked in here so the summary table stays honest. - html: N/A -> 0.0% func precision. `cpython_jinja/layout.html` (a Jinja template, new via #2415) has a `<style>` block; html's func_start intentionally anchors on `<style>`/`<script>` element boundaries, which tree-sitter-html models as inert raw_text, so it shows as extra_functions 0 -> 1. Baseline written from measure() output with the regression gate overridden -- same maintainer-override shape as commit 9011de4 (lua class precision 0.0%). Whether html func-precision should be forced N/A like css/html class-precision already is: filed as #2421. Summary table in language_standards.py's docstring regenerated to match. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019Zm1uVBpVEZJ9SB7bWFR8S
Contributor
squid-protocol
added a commit
that referenced
this pull request
Aug 29, 2026
…injected grammar (#2434) `tree_sitter_accuracy_audit.py` compared html's `func_node_types` (`script_element` / `style_element`) at the TAG level, but `_get_node_name` has no branch for those node types, so tree-sitter's side always yielded NOTHING for them. GitGalaxy, meanwhile, does a polyglot descent -- it parses the CSS/JS inside a `<style>`/`<script>` and names the block after what it finds (`layout.html`'s `<style>` -> `media`, from the real `@media only screen { ... }` rule). That turned a correct GitGalaxy find into a permanent `extra_functions: 1` / `0.0%` precision artifact once the v1.1.0 corpus gained an html file with a real `<style>` block. Not a GitGalaxy defect (its `func_start` = "the recurring code-bearing unit", same as jcl EXEC steps / dockerfile RUN / css @media) and not a tree-sitter defect (tree-sitter-html models `<style>` content as opaque `raw_text` by design) -- a granularity mismatch in the audit. Fix: `_html_embedded_ts_funcs()` parses a `<script>`/`<style>`'s inline body with the embedded grammar (javascript / css) and feeds THOSE functions -- via the same `func_node_types` / `_get_node_name` / `_get_param_count` those languages are scored with directly -- into `real_funcs`, exactly the descent GitGalaxy already does. `<script src=>` (external, no inline code) and empty bodies contribute nothing. Result: html goes from `func recall N/A / precision 0.0%` to `100.0% / 100.0%` -- GitGalaxy's `media` now pairs with the injected tree-sitter-css `media_statement`. css and every other language unchanged (the descent is `lang == "html"`-gated); `--all --ci` green. Closes the follow-up from PR #2422's shell/html baseline regen. Claude-Session: https://claude.ai/code/session_019Zm1uVBpVEZJ9SB7bWFR8S Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
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.
Why
tree_sitter_accuracy_audit.py --all --cihas been red onmainsince #2415 (apertureinfra_path_patternfix) merged. #2415 newly included ~20 real source files across the corpus,but
tree-sitter-accuracy-audit.ymldoesn't trigger onaperture.py, so the affected baselineswere never regenerated. The first
detector.py-touching PR to run the audit (#2420) catches it.This PR regenerates the drifted baselines. No engine code changes — every number is
measure()'s own output.Changes
found140→449,extra65→14)args_exact_match234→252 of 257args_exact_match115→121c/lua/tcl/ruby already passed
--ci("improved on …"); locked in here so the summary tablestays honest.
html
0.0%cpython_jinja/layout.html(a Jinja template, new via #2415) has a<style>block. html'sfunc_startintentionally anchors on<style>/<script>element boundaries — tree-sitter-htmlmodels
<style>…</style>as inertraw_text, so it shows asextra_functions: 0 → 1(a 1-lineblock GG names
mediafrom@media only screen). Baseline written frommeasure()output withthe regression gate overridden — same maintainer-override shape as commit
9011de45(lua classprecision
0.0%). Whether html func-precision should be forced N/A like css/html classprecision already is: filed as #2421.
Verification
tree_sitter_accuracy_audit.py --all --ci→ all OK (31 languages). Summary table inlanguage_standards.py's docstring regenerated to match. ruff / mypy clean.🤖 Generated with Claude Code
https://claude.ai/code/session_019Zm1uVBpVEZJ9SB7bWFR8S