Skip to content

callgraph: doomsday's last 16 engine-only edges; callgraph out of every expected_fails (Part of #6266) - #7019

Merged
squid-shepherd[bot] merged 7 commits into
mainfrom
melek/6266-doomsday-callgraph
Oct 29, 2026
Merged

squid-shepherd[bot] merged 7 commits into
mainfrom
melek/6266-doomsday-callgraph

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #6266 (DOOM-rosetta check 7, callgraph). doomsday was the last port listing callgraph in expected_fails; at 5346a34 it had 3 misses and 16 scored engine-only edges. #7014 (merged while this was in review prep) closed the 3 misses; this PR closes the 16 engine-only edges, removes callgraph from doomsday's expected_fails and re-blesses its golden. No port lists callgraph in expected_fails any more.

Checklist: partial [c:0254d813] -- callgraph is gone from expected_fails for every port and doomsday passes check 7 (0 misses, 0 scored engine-only); the nightly callgraph job is still red, but for the separate clang-reference step (see "Nightly" below), not for check 7.

Overlap: #7014 (nyx) fixed the same 3 misses with near-identical changes to the ones this branch had (the decltype/sizeof/alignof/noexcept template operand, the local-variable template comparison, the folded head). It merged first; main was merged in, its versions kept and this branch's duplicates dropped, so the diff here is the 16 engine-only edges only.

The 19 edges (3 by #7014, 16 here)

Edge (doomsday) Count Who was wrong Fix
line.cpp sortSegments -> map (miss) 1 engine: de::map<decltype(segments)>( lost its callee at the ( inside <...> #7014 (merged)
edgetip.h at -> delta (miss) 1 oracle: delta < e || delta > (360 - e) on a local parses as the template call delta<..>(..) #7014 (merged)
surface.h hasSkyMaskedMaterial -> surfaceMaterialChanged (miss) 1 oracle: a class-scope DE_AUDIENCE(..) with no ; folded the members above into the node's head #7014 (merged)
inputdevice.cpp description -> name, isActive 2 oracle: _E(b) "%s" _E(.) desyncs tree-sitter's string boundaries, so the calls after it were read as string content an ERROR holding an odd number of " reads the body as text when the braces agree on the end
outputstate.cpp (amethyst) filledLine -> isDone, remove, replace 3 oracle: tree-sitter closed the body before abortLine: labeled_statement joins the statements that mean "the body was closed early" (a label is never at file scope)
packageswidget.cpp Impl -> Base, PackagesWidget -> GuiWidget x2 3 oracle: an unclosed nested class in the DE_GUI_PIMPL swallowed the definitions below it, so their owner was that class _owner: a qualified Cls::Cls names its class over an enclosing one; a constructor named for another class is not a member of the one around it
libraryfile.cpp.old LibraryFile -> File x2, sdlnativefont.cpp.old SdlNativeFont -> NativeFont x2 4 oracle: the engine reads .old (and .bak, .orig, ... language_lens.SAFE_WRAPPERS) as the language beneath by design, but the oracle's class table read only plain C++ extensions, and an owner class no source defines got no bases the class table reads wrapper-suffixed C++ files (x.h.old), and an owner no source defines reads every listed base, as TextBody already did
fontlinewrapping.cpp DE_PIMPL_NOREF -> CString, line 2 engine: Line(const WrappedLine &ln = {CString(), 0}, ...) was no unit (the parameter block allowed a brace default only without parens), so its default argument and : line(ln) went to the enclosing macro class cpp.py func_start: a brace-init default may hold one flat call
fluid_defsfont.c / fluid_ramsfont.c delete_* -> context 2 engine: the macro-body call table read context (noteon ...) inside a trailing /**< ... */ doc comment of fluid_sample_refcount detector.c_macro_body_calls: comments are blanked with the literals in one pass

.old scope: no exclusion was added. The engine scans backup-wrapped sources on purpose, the scorer's check 1 does not count them, and the edges in them are real base-constructor calls; the oracle was the side reading a different file set.

Measurements

  • doom_rosetta_check.py over all 44 ports at this head: only doomsday moved (scored engine-only 16 -> 0, precision 0.9684 -> 0.9686, unscored 4638 -> 4639, functions 25484 -> 25485 for the new Line constructor unit in fontlinewrapping.cpp, verdict 6/7 -> PERFECT). Re-blessed with --only doomsday --update --yes; a re-check is clean. The other 43 are byte-identical.
  • Seven-check PERFECT: 42 of 44 ports (cssdoom and sqldoom fail check 3 functions, their listed expected_fails; none fails callgraph).
  • callgraph_oracle.py --only all --clang --baseline callgraph_baseline.json at 5346a34 and at this head: every body-oracle number identical except doomsday (precision 0.9684 -> 0.9686, 68178 -> 68186 calls) and odamex (0.9829 -> 0.9828, from calls_out: decltype/sizeof operand in template args; oracle local/folded-head reads (Part of #6266) #7014, inside the 0.001 tolerance); every clang number identical. callgraph_baseline.json not regenerated.
  • Crucible (golden-lock.sh crucible_check.py, both legs): PASS, zero drift (the one crucible move of this work, mlir make_unique<decltype(..)>(, came in with calls_out: decltype/sizeof operand in template args; oracle local/folded-head reads (Part of #6266) #7014).

Nightly

The nightly callgraph job has failed since 10-27 in its "Score call-graph accuracy against the baseline" step, on the --clang reference section only, and this PR does not change it: locally at 5346a34 and at this head the same 10 regressions reproduce (prboom-plus clang recall 0.9972 -> 0.9303, 0 -> 28 clean-file disagreements; fastdoom, dsda-doom, doomretro, doomgeneric, doom-ascii, sdl-doom, linuxdoom). The clang section was added to the baseline by #6768 (10-27) and the baseline's own fatal-error file counts are far higher than a fresh run gets (linuxdoom 59 vs 2), so files that were excluded as fatal then are clean now and their disagreements count. Not fixed here (it needs a clang-section re-baseline or reference fix, out of this PR's scope).

Class / Sibling gaps

Class: a C/C++ call edge one side gets wrong because of a misparse around macros, literals or template brackets. Handled members here: the six engine-only shapes in the table (macro-body comment, brace-init default with a call, unclosed-class constructor owner, undefined owner class / wrapper-suffixed header, file-scope label, desynced string literal), each with a test that fails without its fix. Sibling gaps not handled:

Gates

  • pr_gates.py --fast: 8/9; affected fails only test_committed_fidelity_table_is_fresh_against_the_corpus, which compares the committed table with the local keyword-rosetta checkout's bias_data.json (no engine input; the checkout is not at the table's commit).
  • pr_gates.py --ratchets: 9/9 (Ports Compile needs JAVA_HOME at a JDK with javac, 17 on this box, and the mainframe corpora fetched).
  • audit_check.py: all clear. Tests: tests/extraction/languages/, test_detector.py, test_macro_body_calls_6770.py, test_callgraph_oracle.py, test_language_standards_strict.py, the doom tool tests: 11601 passed. New tests fail without their fix.

Cross-repo: none.

Lessons for agents

  • The shared selfscan venv's editable install points at another worktree: a script run from outside the worktree imports that engine. Set PYTHONPATH to the worktree (the doom tools do it for their scans).
  • On melek the default java (21) has no javac: Ports Compile fails every equivalence case with "release version 17 not supported" until JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64.
  • callgraph_oracle.py --clang needs libclang (ci/requirements/callgraph.txt); pip install --target into a scratch dir plus PYTHONPATH keeps the shared venv untouched.

🤖 Generated with Claude Code

https://claude.ai/code/session_018srRvgHnFtHyG5RHPr2dmM

squid-protocol and others added 6 commits October 29, 2026 11:03
…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
…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
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

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]>
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 29, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

Taken over from melek (owner 2026-10-29: nyx owns DOOM now). Merged main (f022800): kept #7023's _owner, re-blessed doomsday with CI's pinned tree-sitter (1.22.1); doomsday PERFECT, linuxdoom re-checked clean as the parity control; oracle tests 101/101, pr_gates --fast 9/9.

@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) October 29, 2026 20:48
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

squid-protocol added a commit that referenced this pull request Oct 29, 2026
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]>
@squid-shepherd
squid-shepherd Bot merged commit c09083d into main Oct 29, 2026
69 checks passed
@squid-shepherd
squid-shepherd Bot deleted the melek/6266-doomsday-callgraph branch October 29, 2026 21:16
squid-protocol added a commit that referenced this pull request Oct 29, 2026
… re-blessed on top of #7019

Co-Authored-By: Claude Opus 5.5 <[email protected]>
squid-shepherd Bot pushed a commit that referenced this pull request Oct 30, 2026
…prose (follow-up to #6097) (#7147)

* DOOM study: rescan at 6c7c6c1, one scan for every table, refresh the prose (follow-up to #6097)

Rescanned all 44 licensed ports at main 6c7c6c1 (42/44 PERFECT; callgraph
passes everywhere after #7019) and regenerated the sfs subway table on the same
scans, so no table mixes scan dates any more.

Prose: drop the defect and "not done" text that #6700/#6703/#6705/#6749 fixed,
state the sqldoom/cssdoom #5876 ruling, explain the median-0 complexity of the
JVM/Rust ports (method size, measured), fix the dist range and date line.
study_report.py: the scorecard's last column was "functions now" but counts only
ctags-language files (doom-fx read 1, dartdoom 0); relabel it and say so.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* DOOM study: read wiring similarity against its floor; cross-subsystem wiring (follow-up to #6097)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* DOOM study: subway table reads cross wiring over a shuffled null; negative controls

study_report.py shows sfs's cross_wiring, its shuffled-placement null and the gap
when subway.csv has them (sfs PR #21), sorted by the gap; old CSVs keep the old table.
Prose: raw wiring flatters (doomf77 0.91 is +0.05 over null); doom-scheme and gore
keep cross wiring +0.51/+0.50 over null like chocolate-doom; JVM/C#/Fortran ports
and reimplementations show none. Negative controls (WinQuake, Quake II, Lua at the
same engine) give the null levels; graph-shape distance does not separate them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* DOOM study: restructure as findings first, tables as appendices; twin cross-check, controls, blind placement

Findings lead (twins 93% precise vs source text at 6c7c6c1; textscreen shared sideways;
Scheme/Go wiring above chance and blind placement kappa 0.50/0.31/0.26; names kept,
bodies rewritten; extraction accuracy), then what this does not show, then Appendices
A-G (the generated tables, unchanged) and a new hand-quoted Appendix H (twin
cross-check, descent, unrelated programs).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Joe Esquibel <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant