test(tree-sitter-audit): re-bless stale css baseline after #2500's audit-reader fix - #2509
Merged
Merged
Conversation
…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
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.
Closes #2507.
What was failing
tree-sitter-accuracy-auditred onmainforcss, exit 1: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_scannedis 21 in both the committed baseline and now — #2478 alreadyregenerated 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_namechanges without re-blessingtests/tree_sitter_accuracy_baseline_css.json:keyframes_statementname branch (previously alwaysreturn None→ 0@keyframescorpus-wide) now recognises keyframes — +funcsat_rulebranch now returnsNonefor the bodyless@layer a, b;ordering form, whichGitGalaxy deliberately doesn't match — −funcs
Net +1 (24→25). #2500 updated the tri-comparison chart/ledger and
docs/language_status/css.mdbut 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_startto drop@media/@supports/@container/@layerNot done, deliberately. It contradicts decisions already validated:
tri_comparison_ledger.jsonarestatus: validated;css/function/existence/agree[gitgalaxy,tree_sitter]_vs[ctags](25 occ) verdict: "not aGitGalaxy defect … func_start deliberately matches CSS at-rule keywords … the closest
function-shaped construct CSS has."
tree_sitter_accuracy_audit.pyNODE_MAPS deliberately countsmedia_statement/supports_statement/keyframes_statement/at_ruleas ground-truth functions(tree_sitter_accuracy_audit.py reports real_functions=0 for css/kotlin/powershell/zig despite confirmed function-shaped nodes in real corpus files #1313). Dropping them from
func_startwould crater measured recall and force a NODE_MAPS revert.audit and the tri-comparison — the "precision 100%→83.3%" note from the v1.2.0 cut was already
resolved by css tri-comparison: func precision + recall to 100% (audit-reader fixes, no engine change) #2500 as an audit-reader bug, not an engine defect.
The only residue is the informational
args_comparablemismatch (@media all and (max-width:600px)→ GitGalaxy
got=3, tree-sitterreal=0, because at-rule nodes have noparametersfield). ThisPR 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_matchis unaffected and improved.Changes
tests/tree_sitter_accuracy_baseline_css.json--regenerate)gitgalaxy/standards/language_standards.pyCss 83.3%/80.0%→100.0%/100.0%(auto-refreshed by--regenerate)tests/tools/tree_sitter_accuracy_audit.pyargs_comparablegapNo golden-master re-bless — no engine/regex change.
Verification
tree_sitter_accuracy_audit.py --lang css --ci→ exit 0tree_sitter_accuracy_audit.py --all --ci→ 31 languages, all OK, no other language movedtree_sitter_accuracy_audit.py --summary-table→ already matchespytest -k "tree_sitter_accuracy or summary_table or language_standards_strict"→ 21 passed🤖 Generated with Claude Code