Repository navigation
DOOM-rosetta nightly: a macro named like a declared function reaches it; clang baseline re-measured for #6930 (Part of #6266) - #7020
Conversation
…6266) Engine: a comment in a function-like macro body is no callee; a brace-init default holding a call keeps a nested constructor a unit; a template argument may hold decltype/sizeof(...). Oracle: a qualified or differently named ctor is no member of an unclosed class around it; an undefined owner class reads any listed base (as TextBody does), wrapper-suffixed headers (.h.old) declare classes; a file-scope label continues a closed-early body; an ERROR with a stray quote reads the body as text; a template call on a local is a comparison; a head run over declarations above the function takes the braces. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018srRvgHnFtHyG5RHPr2dmM
…ed_fails; re-bless (Part of #6266) doomsday callgraph misses 3 -> 0, scored engine-only 16 -> 0, verdict 6/7 -> PERFECT; one more function (fontlinewrapping.cpp's nested Line constructor). Crucible: mlir flatbuffer_export.cc gains make_unique<decltype(..)>(. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018srRvgHnFtHyG5RHPr2dmM
… of #6266) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018srRvgHnFtHyG5RHPr2dmM
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018srRvgHnFtHyG5RHPr2dmM
…plate and folded-head reads #7014 fixed the same 3 doomsday misses; its versions are kept and this branch's duplicates dropped. The doomsday golden is re-blessed next. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018srRvgHnFtHyG5RHPr2dmM
…(Part of #6266) engine-only 16 -> 0 (misses were 0 after #7014), verdict 6/7 -> PERFECT. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018srRvgHnFtHyG5RHPr2dmM
…it; clang baseline re-measured for #6930 (Part of #6266) A name that is both a function-like macro and a function the scan declares was dropped too, so a macro body that invokes it lost the call: prboom-plus `free(p)` -> `Z_Free(p)` -> `(Z_Free)(...)` (300 edges, clang recall 0.9975 -> 0.9303), fastdoom `LL_AddToTail` -> `LL_AddNode` (9), chocolate/crispy-doom `DEH_String` (2 each). c_repo_macro_body_calls now also collects the names the C/C++ texts declare or define as functions (a declarator line: type words, then `name(` or `(name)(`, a parameter list with no string, no second `(` after it); such a macro lists its own name, and _macro_expansion_callees lists a macro's own name instead of expanding it again. Non-function macro names still leave Calls Out To. Every clang and body-oracle number of the 15 C ports is again that of engine 2a023d3; the Graph Accuracy Audit stays at c fp 297, cpp fp 166 (the #6922 win). The rest of the nightly failure is #6930's reference change (compiler builtin headers on the path): fatal-error files fell, so disagreements that already existed became clean-file ones. They are identical at engine 2a023d3 and after this fix, so the clang section of callgraph_baseline.json is re-measured at this branch; the body-oracle section is unchanged. README triages the newly clean shapes. Re-bless DOOM-rosetta chocolate-doom, crispy-doom, fastdoom, srb2, doomsday: summary.callgraph_unscored only, back to the pre-#6922 values (69 -> 71, 39 -> 41, 71 -> 86, 2048 -> 2530, 4638 -> 4663); no check verdict moves. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_018srRvgHnFtHyG5RHPr2dmM
callgraph_oracle.py: #7023 merged the same constructor-owner fix; main's _owner (named-for-its-class climb) is kept, this branch's Classes table and .old-wrapper bases stay. doomsday golden re-blessed on top of main with CI's pinned tree-sitter (language-pack 1.22.1): callgraph engine-only 13 -> 0, verdict 6/7 -> PERFECT; linuxdoom re-checked clean as the parity control. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Only conflict: doomsday golden. Re-blessed with CI's pinned tree-sitter (language-pack 1.22.1): callgraph_unscored 4639 -> 4664, as this PR predicts; chocolate-doom, crispy-doom, fastdoom, srb2 check clean. callgraph_oracle.py --only all --clang --baseline --fail-on-regression on this head: exit 0, 0 regressions, numbers equal the PR's table. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Taken over from melek (owner 2026-10-29: nyx owns DOOM). Merged #7019's head (with main) in; doomsday re-blessed on top (unscored 4639 -> 4664, CI-pinned tree-sitter 1.22.1). The nightly's own check on this head: |
|
No description provided. |
|
No description provided. |
|
This PR conflicts with main, so no checks ran. Merge origin/main into it and regenerate generated files with their tools (never hand-merge them), then push. |
… re-blessed on top of #7019 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
CI shepherd: the head of this PR (6437ebf) is not the one a maintainer labelled |
|
No description provided. |
|
PR #7020 @ 6437ebf: 17 failed check(s) == crucible (failure) -- real == db2 (cancelled) -- infra == db2 ${{ matrix.shard }} (cancelled) -- infra == equivalence-e2e (failure) -- infra == full-suite (failure) -- real == full-suite part ${{ matrix.group }}/${{ needs.shard-plan.outputs.splits }} (cancelled) -- infra == ground-truth (failure) -- infra == ground-truth part ${{ matrix.shard }} (cancelled) -- infra == ground-truth-warm (cancelled) -- infra == measure (shard ${{ matrix.shard }}/${{ matrix.total }}) (cancelled) -- infra == plan the suite parts (cancelled) -- infra == publish-history (cancelled) -- infra == shard ${{ matrix.group }}/3 (cancelled) -- infra == shard ${{ matrix.shard }} (cancelled) -- infra == shard ${{ matrix.shard }} (${{ matrix.loc }} LOC) (cancelled) -- infra == store the suite's durations (cancelled) -- infra == suite time budget (#5166) (cancelled) -- infra |
|
No description provided. |
|
Claimed by promoter-bot host |
…ers as CI measures them (Part of #6266) (#7056) #7020 re-measured the clang section on a dev box. The CI runner's libclang reference finds 2 fewer linuxdoom edges (1539, not 1541) and 1 fewer doomgeneric edge (2097, one more fatal file), steadily: the 10-29 morning nightly and the post-#7020 dispatch (run 40976028791) give the same counts. At 1546 engine edges, 2 edges is just over the 0.001 tolerance, so the nightly failed on linuxdoom precision 0.9968 -> 0.9955 alone. The engine side (engine_edges) is unchanged; only the reference's counts move. Co-authored-by: Joe Esquibel <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
Part of #6266
The DOOM-rosetta nightly
callgraphjob has been red since 2026-10-27. On 10-29 it failed at the step that scores call-graph accuracy against the libclang reference. Two separate causes are mixed together in that failure, and this PR fixes or accounts for each one.1. Engine regression from #6922 (fixed)
#6922 changed macro expansion so that it lists only the functions a macro reaches, never a nested macro name. That also dropped names that are both a function-like macro and a function the scan declares. A macro body that invoked such a name lost the call:
midifile.c: FreeEvent -> Z_Free(free(p)->Z_Free(p)->(Z_Free)(...),z_zone.h:88,114); 300 edgesns_gusau.c: GUSWAVE_InitVoices -> LL_AddNode(LL_AddToTailinns_llm.h;LL_AddNodeis a macro inns_ll.h:11and a function inns_llm.h:17); 9 edgesstrife/p_enemy.c: A_BossDeath -> DEH_String(deh_str.h:27function,:37macro); 2 edges eachFix (
gitgalaxy/core/detector.py).c_repo_macro_body_callsalso collects the names the C/C++ texts declare or define as functions. That is a declarator line: type words, thenname(or(name)(, with no string in the parameter list and no second(after it, soHWRAPI(f)(...)and__attribute__do not count. A macro with such a name lists its own name among its calls, and_macro_expansion_calleeslists that name instead of expanding it again. When a macro body reaches the name, it now gets what a direct call of the name gets.Why it's a class fix. The rule covers every name that is both a macro and a declared function, whichever header shadows which, not just the three ports above. Macro names that are not functions still leave Calls Out To, which is what #6922 was for: its test with a nested
SHIFT/KINDmacro still passes, and so do the new negative tests (return KIND(x),int y = KIND(x),obj KIND("s"),EXPORT void KIND(Draw)(...)).Measured. For all 15 C ports, every clang number and every body-oracle number matches engine
2a023d320again, which is the engine the clang baseline was written at. The Graph Accuracy Audit (call_graph_accuracy.py --ci) is unchanged at c fp 297 and cpp fp 166, so the #6922 gain there is kept.2. Reference change from #6930 (baseline
clangsection re-measured)#6930 put the compiler's builtin headers on libclang's path.
stddef.handstdarg.hno longer stop a parse, so the number of files with a fatal parse error fell sharply: linuxdoom 59 -> 2, doom-ascii 81 -> 4, doomgeneric 92 -> 12, doomretro 95 -> 20, sdl-doom 82 -> 22, fastdoom 120 -> 82, prboom-plus 133 -> 106. Disagreements that were already there now sit in files counted as clean. #6930 did not refreshcallgraph_baseline.json.Not environment drift: CI and this box use the same libclang wheel (18.1.1) and the same flags, and the local fatal counts match the 10-29 CI log exactly. The baseline's clang section was last written at engine
2a023d320(#6881), before #6930 added-idirafter <gcc builtin include>inclang_callgraph.build. Running the oldclang_callgraph.pyon this box gives the baseline's counts again (linuxdoom 59, fastdoom 120, prboom-plus 133).I ran the new reference against engine
2a023d320(the baseline's engine) and against this branch. The clean-file disagreement count is identical for every port: doom-ascii 14, doomgeneric 15, doomretro 19, dsda-doom 22, fastdoom 27, linuxdoom 2, prboom-plus 18, sdl-doom 13, nugget-doom 3, woof 3, every other port 0. So these counts come from the reference change, not from the engine. Only theclangsection is re-measured, ate1767b0c7, which has the same engine code as this PR. The body-oracle section andengine_shaare not touched.Clang numbers per port: committed baseline -> 10-29 nightly (main) -> this PR. Recall / precision / clean-file disagreements:
With this baseline,
callgraph_oracle.py --only all --clang --baseline ... --fail-on-regressionexits 0 over the 23 baseline ports. The 10-27 and 10-28 failures were each a 2-edge linuxdoom precision dip (0.9726 -> 0.9713, then 0.978 -> 0.9767). The new reference changes linuxdoom's numbers anyway (precision is now 0.9968), so that dip is superseded.DOOM-rosetta
doom_rosetta_check.pyover all 44 ports: 39 ok. 5 drift, and only insummary.callgraph_unscored. Each moves back to its pre-#6922 value: chocolate-doom 69 -> 71, crispy-doom 39 -> 41, fastdoom 71 -> 86, srb2 2048 -> 2530, doomsday 4638 -> 4663 (re-blessed on top of #7014). No check verdict moves, so every port that passes check 7 still passes it. The restored edges are calls the compiler makes through a same-named macro, which the body oracle cannot score as calls.Overlap with #7019 (
melek/6266-doomsday-callgraph): both PRs touchdetector.pyandtest_macro_body_calls_6770.py, but in different hunks. #7019 changes comment stripping inc_macro_body_calls; this PR changesc_repo_macro_body_callsand_macro_expansion_callees. Both re-blessdoomsday.json.gz, so whichever merges second re-blesses it. Here only itscallgraph_unscoredcount moves, and there is no doomsday-specific logic in this PR.Class / Sibling gaps
#define f(a) (f)(a, ...), a header macro shadowing another header's function, a configuration-dependent macro/function pair). One rule in the repo-wide macro table covers C and C++ alike.tests/tools/doom_speedrun/README.md):#if ORIGCODEwith the macro defined nowhere is a dead branch, but the engine keeps its calls. The Siblings of #5630: call-graph clean-file disagreements vs libclang (puredoom triage) #6770 rule reads#ifdef X/defined(X)only (doomgeneric, doom-ascii, sdl-doom:d_loop.c,m_argv.c,statdump.c,i_joystick.c,m_config.c).saveg_read_think_t,saveg_write_bool,OVERLAYTEXTX) is not expanded, so the call is missed (doomgeneric, doom-ascii, sdl-doom, doomretro).SNDSERV, fastdoomMODE_X,SIMPLECHECKS, music players, a Windows shim). Configuration, not an engine bug.string_view.c: direct calls the reference does not report. The engine is right in source; the cause is not yet traced.Gates
pr_gates.py --fast: 9/9 pass.crucible_check.py: full_precision and zero_dependency PASS, with no golden change.call_graph_accuracy.py --ci: OK, c/cpp unchanged.tests/core_engine/test_macro_body_calls_6770.py: 40 pass. 5 of the new tests fail without the fix.🤖 Generated with Claude Code
https://claude.ai/code/session_018srRvgHnFtHyG5RHPr2dmM