Skip to content

test(tree-sitter-audit): re-bless stale css baseline after #2500's audit-reader fix - #2509

Merged
squid-protocol merged 1 commit into
mainfrom
fix/2507-css-tree-sitter-baseline-stale
Aug 30, 2026
Merged

test(tree-sitter-audit): re-bless stale css baseline after #2500's audit-reader fix#2509
squid-protocol merged 1 commit into
mainfrom
fix/2507-css-tree-sitter-baseline-stale

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Closes #2507.

What was failing

tree-sitter-accuracy-audit red on main for css, exit 1:

real_functions: baseline=24 current=25

Only the ground-truth-drift guard fails CI. Everything else already moved the right way:
found_functions 20→25, extra_functions 5→0, args_exact_match 14→19.

Root cause (issue item 2 — "investigate before regenerating")

Not corpus drift. files_scanned is 21 in both the committed baseline and now — #2478 already
regenerated this baseline against the v1.2.0 pin.

The 24→25 is #2500 ("css tri-comparison … audit-reader fixes, no engine change") landing its own
_get_node_name changes without re-blessing tests/tree_sitter_accuracy_baseline_css.json
:

  • the fixed dead-code keyframes_statement name branch (previously always return None → 0
    @keyframes corpus-wide) now recognises keyframes — +funcs
  • the at_rule branch now returns None for the bodyless @layer a, b; ordering form, which
    GitGalaxy deliberately doesn't match — −funcs

Net +1 (24→25). #2500 updated the tri-comparison chart/ledger and docs/language_status/css.md
but missed this JSON — its own commit message records the target: "css Func Found 25*/24*/0* ->
25/25/0"
. Zero GitGalaxy engine change, zero corpus change.

Issue item 1 — tighten css func_start to drop @media/@supports/@container/@layer

Not done, deliberately. It contradicts decisions already validated:

The only residue is the informational args_comparable mismatch (@media all and (max-width:600px)
→ GitGalaxy got=3, tree-sitter real=0, because at-rule nodes have no parameters field). This
PR documents it in the SCOPE docstring — same "no formal signature at the declaration site" shape as
the shell/perl note (#1518/#1519). The gated args_exact_match is unaffected and improved.

Changes

File Change
tests/tree_sitter_accuracy_baseline_css.json regenerated (--regenerate)
gitgalaxy/standards/language_standards.py summary-table row: Css 83.3%/80.0%100.0%/100.0% (auto-refreshed by --regenerate)
tests/tools/tree_sitter_accuracy_audit.py SCOPE-docstring note on the at-rule args_comparable gap

No golden-master re-bless — no engine/regex change.

Verification

  • tree_sitter_accuracy_audit.py --lang css --ci → exit 0
  • tree_sitter_accuracy_audit.py --all --ci → 31 languages, all OK, no other language moved
  • tree_sitter_accuracy_audit.py --summary-table → already matches
  • pytest -k "tree_sitter_accuracy or summary_table or language_standards_strict" → 21 passed

🤖 Generated with Claude Code

…dit-reader fix (#2507)

`tree-sitter-accuracy-audit` was red on main for css with a ground-truth drift
(`real_functions: baseline=24 current=25`). Not corpus drift: files_scanned is
21 in both the committed baseline and now -- #2478 already regenerated it against
the v1.2.0 pin.

The 24->25 is #2500 ("css tri-comparison ... audit-reader fixes, no engine
change") landing its own `_get_node_name` changes without re-blessing this JSON:
the fixed dead-code `keyframes_statement` branch (was always `return None`, so 0
`@keyframes` corpus-wide) adds keyframes; the `at_rule` branch now returning None
for the bodyless `@layer a, b;` form removes those. Net +1. #2500 updated the
tri-comparison chart/ledger and docs/language_status/css.md but missed this file
-- its commit message records the target state ("css Func Found 25*/24*/0* ->
25/25/0"). Zero GitGalaxy engine change, zero corpus change.

Regenerated via `--regenerate` (also refreshes the summary table in
language_standards.py: css 83.3%/80.0% -> 100%/100%, matching the tri-comparison).
All movement is an improvement or the explained audit-reader correction:
found_functions 20->25, extra_functions 5->0, args_exact_match 14->19.

Also documents the permanent css at-rule `args_comparable` discrepancy in the
SCOPE docstring (GitGalaxy reads a param count off the at-rule prelude;
`_get_param_count` has no parameters field for at-rule nodes -> real=0). Not an
engine defect -- a CSS at-rule has no formal parameter list, and counting
at-rules as functions is a ledger-validated design choice
(`css/function/existence/agree[gitgalaxy,tree_sitter]_vs[ctags]`, status
validated). The gated `args_exact_match` is unaffected.

No golden-master re-bless: no engine/regex change.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Tpu4YmAESTUeSoPQ5LqLWy
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol merged commit a8484e8 into main Aug 30, 2026
30 checks passed
@squid-protocol
squid-protocol deleted the fix/2507-css-tree-sitter-baseline-stale branch August 30, 2026 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CSS at-rules (@layer / @media / @supports) counted as functions; css tree-sitter-accuracy baseline stale (real_functions 24→25)

1 participant