Repository navigation
DOOM call-graph oracle: drop calls in literal dead preprocessor branches (Part of #6266) - #6877
Conversation
…hes (Part of #6266) The tree-sitter walk and the text fallback read `#if 0` / dead `#if 1 ... #else` bodies as calls; the engine drops them since #6770. doomsday misses 374 -> 74, doom3-bfg 363 -> 121, gzdoom 67 -> 2; doom3do reaches 0/0 (PERFECT). Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
No description provided. |
|
No description provided. |
|
PR #6877 @ 52b34e0: 2 failed check(s) == shard 2 (1666363 LOC) (failure) -- real == shard 4 (1666524 LOC) (failure) -- real |
Part of #6266 (DOOM-rosetta check 7, callgraph).
Checklist: partial [c:0254d813] -- doomsday still lists
callgraphin expected_fails (74 misses, 45 scored engine-only left); the other 16 ports are not yet all 0/0.Fix: oracle, not engine
The tree-sitter body oracle (
tests/tools/doom_speedrun/callgraph_oracle.py) counted calls inside literal dead preprocessor branches (#if 0,#elif 0,#if 1 ... #else) that the engine already drops (#6770 / #6870). The engine was right; the oracle reported them as misses. BothBody(tree-sitter walk) andTextBody(text fallback) now skip the dead branch of a literal-0/1 condition.Class / Sibling gaps
Class: calls the oracle expects but the engine correctly omits because the code is preprocessor-dead. Fixed here for literal 0/1 conditions only.
Sibling gaps (doomsday, remaining): 26 ctor-init-list misses; 42 absent edges (
Impl -> Base,List/Set/Hash -> Base,.cpp.oldfiles,PackagesWidget -> GuiWidget); 3 comment/string engine-only; ~48 misc misses; toggle-conditional dead branches (#if SOME_MACROthat the build leaves undefined) which the oracle does not decide. Burned-estate programs needing each: none of the burned COBOL/CICS estates read these; they are C++ DOOM-port shapes only.Remaining slices
Impl -> Base/ container-base absent edges (42)..cpp.oldfiles in the oracle's file set.callgraphfrom doomsday's expected_fails.Move (23 C/C++ licensed ports)
18 ports improved, 0 regressed; doom3do went from an unlisted fail to PERFECT. Goldens (18
tests/golden_doom_rosetta/*.json.gz) andcallgraph_baseline.jsonregenerated (engine_sha 3daa213).Tests
tests/tools/test_callgraph_oracle.py: 3 new tests (tree-sitter walk, text fallback,_literal_value); 80 pass.Gates
pr_gates --fast9/9,--ratchets9/9; guard tests pass from /tmp with plain pytest;git merge-treeagainst origin/main is clean. Note churn-6770 also editscallgraph_oracle.py: expect a conflict for whichever lands second.Lessons for agents
doom_speedrun.py fetchbeforescan; a scan with no cloned repos yields an empty oracle result.doom_speedrun.py scananddoom_rosetta_check.pytake their own heavy slot: do not wrap them in heavy-run.🤖 Generated with Claude Code