Fix main: name the tubuild test's real input by symbol, not by a promoted path - #2073
Merged
Merged
Conversation
…oted path `dead references` is red on main. tools/test_tubuild.py, landed in #2072, cites `src/func_ov006_020f8224.c` as the real-world input its Allman-brace case was built from. #2071 promoted that file into the ov006/dScMgMCarlo_c TU an hour later, so the path is gone and the prose reference dangles. Neither PR could see it. #2072's dead-references run happened while the file still existed; #2071's premerge_check ran against a merge tree that predated #2072. The two are individually green and red in combination -- the merge-tree hazard, one step removed. Fix names the input by symbol instead of by path. `func_ov006_020f8224` survives both promotion and rename, and check_dead_references reads only `a/b`-shaped path tokens, so a symbol cannot dangle. The docstring says why, so the path does not get helpfully restored later. Not bundled, deliberately: `--update` would also drop the now-stale `src/game/actors` baseline entry. That is real but unrelated cleanup in a tracked config file, and main is red now.
✅ PR validation — Passednoverify: no source/build-data changes in this PR Each changed |
This was referenced Aug 31, 2026
andrewboudreau
added a commit
that referenced
this pull request
Aug 31, 2026
Both are pre-existing on main and both resolve today, so no gate is red --
but they are the per-symbol shape that dies twice over, on rename AND on TU
promotion, and one of them is live ammunition right now:
src/_ZN8PoleLiftD1Ev.cpp src_tu/actors/PoleLift.cpp already exists
src/_ZN5Stage11RenderModelEv.cpp
A PoleLift promotion deletes the first one out from under this docstring and
takes main red on dead references, which is exactly how main broke earlier
today at 6d8f8e5 (fixed in #2073).
Named by mangled symbol instead. check_dead_references reads only a/b-shaped
path tokens, so `_ZN8PoleLiftD1Ev` cannot dangle, and the symbol survives both
rename and promotion. The concrete evidence in both comments -- the local
ModelComponents stand-in, and the 0x80/0x158/0x50 padding numbers -- is
unchanged; only the citation spelling moved.
andrewboudreau
added a commit
that referenced
this pull request
Aug 31, 2026
…prove work (#2074) * Use prose examples the cartridge agrees with, and make the gate test prove work Re-cut of #2070. Its diagnosis was right -- a class-specific path hard-coded in tool prose is a live reference that check_dead_references resolves, so it goes red the moment the class is renamed. Its substitute had the same defect. `tools/rtti_name_audit.py --class`, walking _ZTV-4 -> _ZTI -> _ZTS in the cartridge: dActor_c ROM 8dActor_c AGREES Camera ROM 9dCamera_c DISAGREES -- #2070's replacement Amp ROM 7daBrq_c DISAGREES -- what #2070 replaced Both sides of that swap are in the 259-of-541 coined set and both are scheduled for rename, so #2070 bought nothing. dActor_c and dScMgBase_c agree with the cartridge and nothing above them can re-key their names. marker_evidence.py keeps its concrete struct sketch and loses only the per-symbol path. Rewriting a specific docstring into abstract prose costs explanatory value for nothing; the path was the only part that could die. A per-symbol file dies twice over -- on rename, and on TU promotion folding it into src/actors/<Class>.cpp. test_a_real_tree_header_still_parses asserted only rc == 0, which a header the parser SKIPPED satisfies just as well: include/dActor_c.h rc=0 33 commented fields, 0 mismatched include/fBase_c.h rc=0 skipped -- polymorphic, implicit vptr not modelled The second is the exact "reported a pass and checked nothing" shape this file exists to catch, and the old assertion passed on it. Now the test reads the gate's own output and requires a positive checked-field count, so a future substitution into a skipped header fails loudly instead of quietly asserting nothing. check_dead_references clean, check_python_names PASS, 20/20 tests pass. * Name two more doomed prose paths by symbol instead Both are pre-existing on main and both resolve today, so no gate is red -- but they are the per-symbol shape that dies twice over, on rename AND on TU promotion, and one of them is live ammunition right now: src/_ZN8PoleLiftD1Ev.cpp src_tu/actors/PoleLift.cpp already exists src/_ZN5Stage11RenderModelEv.cpp A PoleLift promotion deletes the first one out from under this docstring and takes main red on dead references, which is exactly how main broke earlier today at 6d8f8e5 (fixed in #2073). Named by mangled symbol instead. check_dead_references reads only a/b-shaped path tokens, so `_ZN8PoleLiftD1Ev` cannot dangle, and the symbol survives both rename and promotion. The concrete evidence in both comments -- the local ModelComponents stand-in, and the 0x80/0x158/0x50 padding numbers -- is unchanged; only the citation spelling moved.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
dead referencesis red onmain. One docstring line, and the cause is worth recording.Red at
6d8f8e529— run 33378442037. Reproduced in a clean worktree atad9dbc8c0, green after this commit.How two green PRs made a red
maintools/test_tubuild.pylanded in #2072. Its Allman-brace regression case documents the real-world input it was built from:#2071 promoted that file into
src/actors/dScMgMCarlo_c.cppabout an hour later. The path is gone; the prose still names it.Neither PR could have caught this:
src/func_ov006_020f8224.cpresent — reference resolvespremerge_checkvs merge tree4e0d92d28a7dtest_tubuild.pydid not exist yetBoth were individually correct and 8/8 on their own merge trees. This is the merge-tree hazard one step removed: gating each PR against
maindoes not gate a pair of PRs against each other, and the window here was 65 minutes.I own this one twice over — I merged both, and the citation exists because my #2071 review asked for it: "Please put both failing inputs in the test file — the fix without the inputs leaves us re-deriving them next time." That was the right ask. Citing the input by path was the part that had a shelf life.
The fix
The symbol is the durable identifier:
func_ov006_020f8224survives both TU promotion and class rename, andcheck_dead_referencesonly resolvesa/b-shaped path tokens, so a bare symbol cannot dangle. The example loses nothing — the symbol is already asserted twice in the test body below it.The docstring says why the path is absent. Without that, the next reader restores it as a helpful clarification and we are back here.
ov006/dScMgMCarlo_cis kept as-is: it isa/b-shaped but demonstrably does not resolve as a reference today, since it was already in the failing file and the gate flagged only thesrc/token.Verified
Those 2 failures are pre-existing and unrelated — I measured them against the unmodified file in the same worktree and they fail identically:
Both compile
src_tu/actors/PoleLift.cppfor real, so they only execute on a toolchain-wired worktree — in CI they cannot run, which is whytool testsis green onmainwhile these are red locally. Filing that separately; it is not this PR's business, but it does mean thetool testsgreen is hollow for those two cases.Deliberately not bundled
--updatealso wants to drop a now-stale baseline entry:That path exists on
mainnow, so the baseline is carrying a dead entry that would mask a future real break atsrc/game/actors. Real, but unrelated cleanup in a tracked config file that every ledger PR conflicts on — andmainis red right now. Separate PR.