Repository navigation
Take tree-sitter-language-pack 1.24.0: oracle reads fused macro statements, baselines move (Part of #8481) - #8938
Conversation
…gers Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…alls after it (pack 1.24.0) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…cap) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
No description provided. |
|
PR #8938 @ 90f3ad8: 2 failed check(s) == shard 2 (1669485 LOC) (failure) -- main == tree-sitter-accuracy-audit (failure) -- real |
…ck 1.24.0 (#8481) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
CI shepherd: the head of this PR (c6141bc) is not the one a maintainer labelled |
|
No description provided. |
|
No description provided. |
Part of #8481 (the dependabot unhold and the CI triggers are the second slice, below)
What
Takes tree-sitter-language-pack 1.24.0 deliberately (it was reverted in e1ad80e after php / powershell / srb2 moved):
ci/requirements/treesitter.*andsolver.*pin 1.24.0 again (hash-pinned,pin_requirements.py --checkOK).tests/tree_sitter_accuracy_baseline_php.json/_powershell.jsontake CI's measured numbers (php 1706 -> 1707; powershell real 487 -> 489, args exact 484 -> 486).language_standards/__init__.py: the summary table's Php row (99.9% -> 100.0%), regenerated.tests/golden_doom_rosetta/gzdoom.json.gzis re-blessed (generated): the oracle fix, not the pack, moves gzdoom (see below).The three srb2 edges (
AM_*->FixedMul)1.24.0's C grammar reads a bare macro statement (a macro with no semicolon,
NOHUD/INLEVEL) followed by anif ... else f(x);as ONEdeclarationwith an ERROR child, andelse f(L);as a declaration of a functionfreturning typeelse. The oracle (callgraph_oracle._macro_prefixed_call, #6266) only recognised the 1.22 shape (MACRO f(x);), so the calls in the fused span vanished from the oracle while the engine, which does not use the grammar, still found them: engine-only "absent" edges, precision 0.9999 -> 0.9966.The fix recovers calls from that fused declaration (macro-named type, or
else/do, with function declarators and ERROR children only), with the samebroken/desyncedbookkeeping the ERROR branch uses. With itdoom_rosetta_check.py --only srb2isokagainst the unchanged golden on 1.24.0.gzdoom golden (Opus rescue)
On pack 1.24.0, main's oracle leaves gzdoom
ok, and this PR's oracle moves it:callgraph_precision 0.9665 -> 0.9667,callgraph_unscored 3891 -> 3879(the shard 2 failure). I diffed per-function oracle calls, old predicate against new, over the whole gzdoom clone. 27 function bodies change, every change is an addition (none removed), and each added call is a real call in a macro-fused span:else Tick();/else BeginPlay();/else return Die(...)after gzdoom'sIFVIRTUALblocks (p_mobj, dthinker, p_interaction, hudmessages, shared_sbar), and theVMA_DEBUG_GLOBAL_MUTEX_LOCKbodies in vk_mem_alloc.h (allocator->Map(...)etc.). The new predicate also matchesASMJIT_API Error emit(...);class-member declarations, but none of them is inside a function body the oracle reads, so they add no calls. Blessed--only gzdoom. After the bless,doom_rosetta_check.py --only gzdoom,srb2isokon 1.24.0.Regression test
test_a_bare_macro_statement_fused_with_the_calls_after_it_keeps_every_call_8481(the srb2 shape, generic names). Fails on 1.24.0 without the fix (lua_pushnilmissing), passes with it.Class / Sibling gaps
Class: a newer grammar changing how a statement-shaped construct parses silently shifts an oracle built on it. Sibling gaps: none found in the other oracles with the pack on 1.24.0 (php / powershell accuracy audits both match their baselines). gzdoom (C++) has the same shape (
IFVIRTUAL+else f();) and is re-blessed above. The other ports passed in CI shard 2 with the fix.Remaining slices
tree-sitter-language-packignore entry in.github/dependabot.yml(the hold stays in place until then), andthe CI triggers: a PR changing
ci/requirements/treesitter.*/solver.*should run the tree-sitter accuracy, history, tri-comparison and doom-rosetta checks (they miss it today, which is why this bump went unnoticed). Patch:accuracy_audit_plan.py(+ test) and the four workflows'paths:/ Scope grep; it needs aci_experiments_log.mdentry and the runner-minutes / PR-share measurement.Facts checked
okon the unchanged golden.tree_sitter_accuracy_audit.py --cimatch the committed baselines on 1.24.0.pr_gates --fast9/9,audit_check.pyall clear;ruff format --checkclean on changed files.Lessons for agents
python -IdropsPYTHONPATH: a private pack install is silently ignored (you get the venv's old pack).🤖 Generated with Claude Code