Skip to content

Promote daIDonketu_c (ChillBully) to one snake_case translation unit - #2156

Merged
andrewboudreau merged 6 commits into
mainfrom
cpp/donketu-snake-tu
Sep 1, 2026
Merged

Promote daIDonketu_c (ChillBully) to one snake_case translation unit#2156
andrewboudreau merged 6 commits into
mainfrom
cpp/donketu-snake-tu

Conversation

@andrewboudreau

Copy link
Copy Markdown
Collaborator

ov027's Bully-on-the-ice. Seven per-function sources collapsed into
actors/d_a_i_donketu.cpp (source-owned), one complete delinks span, and the class
renamed to the name the cartridge itself carries.

The rename and the promotion are one edit

They cannot be split into two building commits. The promotion needs the destructor
inline; inlining it makes the two surviving per-function destructor sources redefine it:

object 'daIDonketu_c::~daIDonketu_c()' redefined
  src/_ZN12daIDonketu_cD0Ev.cpp:20
  src/_ZN12daIDonketu_cD1Ev.cpp:17

Measured, not assumed — that is why this is one commit.

The name is the ROM's

Read out of extracted/overlays/overlay_0027.bin: the vtable object's preamble at
0x02113928 is [0, 0x021138b0]; the typeinfo record there reads
[_ZTVN3abi20__si_class_type_infoE, 0x021138c8, 0x021138bc]; the name string at
0x021138c8 is "12daIDonketu_c" and the base's at 0x021138a4 is "7daOts_c", which
the tree already spells that way. The measurement is written out at the top of
include/daIDonketu_c.h.

The coined ChillBully reached no symbol home, so its _ZTI/_ZTS/_ZTV could never be
word-compared against the cartridge and this TU could not have declared a verifiable
compiler_only_output. The rename is what makes the promotion possible at all.

Inline destructor, key function Behavior

Out of line, mwccarm emits D0 before D1 — the reverse of ROM order, which objisolate
refuses for the whole TU (this entry's own pre-promotion block recorded ordinal pair(s) not in ROM order: [(0, 1)]) — plus a homeless D2. Inline gives the retail D1/D0 pair in
ROM order and no D2. The key function is then the first declared non-inline virtual,
Behavior, so this TU still owns the class's _ZTV/_ZTI/_ZTS group; all fourteen
vague-linkage outputs are licensed as deadstrip-data in the manifest.

The factory's second vptr store is &_ZTV12daIDonketu_c[2]: this TU now defines the
vtable, and mwccarm's symbol addresses the object start with its two-word preamble while
symbols.txt's names the slot array. _ZTV7daOts_c is not defined here and takes no bias.

Evidence

check result
tubuild.py verify 7/7 MATCH, objisolate clean, reloc destinations clean, all seven in ROM-ascending emission order, nothing unlicensed
rombuild.py -j16 106/106 exact, 100.000000% of compared bytes, mismatching 0
romdata_check per-symbol 8 VERIFIED / 5 PARTIAL / 0 DIFFERS, blindWords 0 throughout
tubuild.py linkcheck --baseline --module ov027 modules PASS
static gates check_data_definitions, check_dead_references, check_duplicate_sources, check_header_offsets --changed, check_layout_free, check_src_tu, check_tubuild_conflicts all pass

_ZTV12daIDonketu_c: 148 emitted bytes compared word-for-word, 37 slots, all equal.
_ZTI12daIDonketu_c, _ZTI7daOts_c, _ZTS7daOts_c and four base _ZTIs VERIFIED. Every
PARTIAL is a _ZTS name string whose symbols.txt extent runs past the string into
padding — the known extent condition, not a disagreement.

linkcheck's one FAIL (Symbol 'func_01ff9e2c' in ITCM at 0x01ff9e2c not found in linked binary) reproduces on the baseline and belongs to the tree, not to this TU.
check_decl_return_types's three dScMgBase_c disagreements also reproduce on the base
commit a6c2ece38 and are untouched by this change.

Prose blind spots, audited by hand

class_rename.py mangled three passages; all were fixed:

  • include/daOts_c.h collapsed the coined/ROM name pair into a tautology.
  • notes/archive/n64-decomp-cross-reference.md lost the historical name.
  • notes/plan-cpp-conversion-queue.md §3 is a captured pilot transcript; the rewrite
    invented a path that never existed in any state of the tree. The historical spelling is
    restored, the section is marked HISTORICAL, and the one dead reference is banked in
    config/dead-reference-baseline.json (exactly one row added, none removed).
  • notes/dscene-c-siblings-census.md named a file that no longer exists; it now points at
    the TU and the header.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FsXWgEM3Gtbqs6zEdwLMYV

ov027's Bully-on-the-ice: seven per-function sources collapsed into
src/actors/d_a_i_donketu.cpp, one `complete` delinks span, and the class
renamed to the name the cartridge itself carries.

THE RENAME AND THE PROMOTION ARE ONE EDIT. They cannot be split into two
building commits: inlining the destructor (which the promotion requires, see
below) makes the two surviving per-function destructor sources redefine it --
`object 'daIDonketu_c::~daIDonketu_c()' redefined` in both
src/_ZN12daIDonketu_cD0Ev.cpp:20 and D1Ev.cpp:17. Measured, not assumed.

THE NAME IS THE ROM'S. Read out of extracted/overlays/overlay_0027.bin: the
vtable object's preamble at 0x02113928 is [0, 0x021138b0]; the typeinfo record
there reads [_ZTVN3abi20__si_class_type_infoE, 0x021138c8, 0x021138bc]; the
name string at 0x021138c8 is "12daIDonketu_c" and the base's at 0x021138a4 is
"7daOts_c", which the tree already spells that way. The coined `ChillBully`
reached no symbol home, so its _ZTI/_ZTS/_ZTV could never be word-compared
against the cartridge and this TU could not have declared a verifiable
compiler_only_output.

INLINE DESTRUCTOR, KEY FUNCTION Behavior. Out of line, mwccarm emits D0 before
D1 -- the reverse of ROM order, which objisolate refuses for the whole TU (this
entry's own pre-promotion block recorded `ordinal pair(s) not in ROM order:
[(0, 1)]`) -- plus a homeless D2. Inline gives the retail D1/D0 pair in ROM
order and no D2. The key function is then the first DECLARED non-inline
virtual, Behavior, so this TU still owns the class's _ZTV/_ZTI/_ZTS group; all
fourteen vague-linkage outputs are licensed as deadstrip-data in the manifest.

EVIDENCE
  tubuild.py verify          7/7 MATCH, objisolate clean, reloc destinations
                             clean, all seven in ROM-ascending emission order,
                             nothing unlicensed
  rombuild.py -j16           106/106 exact, 100.000000% of compared bytes,
                             mismatching 0
  romdata_check per-symbol   8 VERIFIED / 5 PARTIAL, 0 DIFFERS, blindWords 0
                             throughout. _ZTV12daIDonketu_c: 148 emitted bytes
                             compared, 37 slots, all equal. _ZTI12daIDonketu_c,
                             _ZTI7daOts_c, _ZTS7daOts_c and four base _ZTIs
                             VERIFIED. Every PARTIAL is a _ZTS name string
                             whose symbols.txt extent runs past the string into
                             padding -- the known extent condition, not a
                             disagreement.
  tubuild.py linkcheck --baseline --module ov027
                             modules PASS. Its one FAIL (`func_01ff9e2c` in
                             ITCM not found in the linked binary) reproduces on
                             the baseline and belongs to the tree.

The factory's second vptr store is `&_ZTV12daIDonketu_c[2]`: this TU now
defines the vtable, and mwccarm's symbol addresses the object start with its
two-word preamble while symbols.txt's names the slot array. _ZTV7daOts_c is not
defined here and takes no bias.

Three class_rename.py prose blind spots were audited and fixed by hand:
include/daOts_c.h collapsed the coined/ROM name pair into a tautology,
notes/archive/n64-decomp-cross-reference.md lost the historical name, and
notes/dscene-c-siblings-census.md named a file that no longer exists.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FsXWgEM3Gtbqs6zEdwLMYV
@tangos-validator

tangos-validator Bot commented Sep 1, 2026

Copy link
Copy Markdown

✅ PR validation — Passed

Committed merge passes; 5 contributor credit reassignment(s) noted, not a blocker.

Full merge validation

Check Result
Committed test merge yes
Byte-verified functions 10,698 / 11,347 (94.28%, -6)
Byte-verified code bytes 1,992,848 / 2,211,124 (90.13%, -688)
Claimed, not byte-verified 519 functions, 112,832 bytes (+6)
Perfect source moves 0 R100
Enrolled ranges (delinks complete) 11,059 functions, 2,053,148 bytes (92.86%, +0) -- differs from byte-verified by +361
Contributor credit 0 added, 5 changed, 0 lost
Relocation check 46 checked; 46 VERIFIED
Port reference check 405 checked; 0 stale
Module fidelity 106/106 exact; 100.000000% compared bytes
Code linked from verified source 11,088 functions, 2,067,148 bytes (93.49%)
Module bytes from source 2,067,148 / 3,049,600 (67.8%); 811,492 (26.6%) are data no delink entry reaches
ROM data reproduced from source 577 symbol(s) exact, 165 partial, 5 differ

Contributor credit moved (5)

Function Source Before After
ov027:0x021115c4 src/_ZN10ChillBullyD1Ev.cpp -> src/actors/d_a_i_donketu.cpp andrewboudreau github-actions[bot]
ov027:0x02111618 src/_ZN10ChillBullyD0Ev.cpp -> src/actors/d_a_i_donketu.cpp andrewboudreau github-actions[bot]
ov027:0x02111770 src/_ZN10ChillBully8BehaviorEv.cpp -> src/actors/d_a_i_donketu.cpp andrewboudreau github-actions[bot]
ov027:0x0211181c src/_ZN10ChillBully13InitResourcesEv.cpp -> src/actors/d_a_i_donketu.cpp andrewboudreau github-actions[bot]
ov027:0x0211186c src/ChillBully_Spawn.c -> src/actors/d_a_i_donketu.cpp tangosdev github-actions[bot]

Byte-verified means the range carries complete in a delinks.txt, so the ROM build compiled it and compared it to the cartridge. The 519 claimed functions have a src/ file named after the symbol with no NONMATCHING banner, and nothing compiles them -- dsd fills their addresses with the ROM's own bytes. Both together are the 11,217 this project calls matched.

Warnings: contributor attribution changed, not a blocker (5 changed, 0 lost -- src/actors/d_a_i_donketu.cpp: andrewboudreau -> github-actions[bot]; src/actors/d_a_i_donketu.cpp: andrewboudreau -> github-actions[bot]; src/actors/d_a_i_donketu.cpp: andrewboudreau -> github-actions[bot]; +2 more); 7 address range(s) left the byte-verified set while enrolled totals held steady: ov027:0x021115c4-0x02111618, ov027:0x02111618-0x02111680, ov027:0x02111680-0x021116f0, ov027:0x021116f0-0x02111770, ov027:0x02111770-0x0211181c, +2 more; 6 more function(s) now claim a match that nothing compiles; enroll them in a delinks.txt to have the ROM build check them.

Per-file link-check detail

All 40 changed file(s) compile to the ROM byte-for-byte with correct relocation targets.

File Symbol Result Slots checked
src/_ZN5Bully12PlayHitSoundEv.cpp _ZN5Bully12PlayHitSoundEv ✅ verified 1
src/_ZN5Bully13InitResourcesEv.cpp _ZN5Bully13InitResourcesEv ✅ verified 1
src/_ZN5Bully13PlayStepSoundEv.cpp _ZN5Bully13PlayStepSoundEv ✅ verified 1
src/_ZN5Bully14PlayDeathSoundEv.cpp _ZN5Bully14PlayDeathSoundEv ✅ verified 1
src/_ZN5Bully14UpdateRunStateEv.cpp _ZN5Bully14UpdateRunStateEv ✅ verified 1
src/_ZN5Bully16UpdateDeathStateEv.cpp _ZN5Bully16UpdateDeathStateEv ✅ verified 1
src/_ZN5Bully17PlayShellHitSoundEv.cpp _ZN5Bully17PlayShellHitSoundEv ✅ verified 1
src/_ZN5Bully8BehaviorEv.cpp _ZN5Bully8BehaviorEv ✅ verified 1
src/_ZN5BullyD0Ev.cpp _ZN5BullyD0Ev ✅ verified 1
src/_ZN5BullyD1Ev.cpp _ZN5BullyD1Ev ✅ verified 1
src/_ZN7daOts_c12PlayHitSoundEv.cpp _ZN7daOts_c12PlayHitSoundEv ✅ verified 1
src/_ZN7daOts_c13PlayStepSoundEv.cpp _ZN7daOts_c13PlayStepSoundEv ✅ verified 1
src/_ZN7daOts_c14PlayDeathSoundEv.cpp _ZN7daOts_c14PlayDeathSoundEv ✅ verified 1
src/_ZN7daOts_c14UpdateRunStateEv.cpp _ZN7daOts_c14UpdateRunStateEv ✅ verified 1
src/_ZN7daOts_c16CleanupResourcesEv.cpp _ZN7daOts_c16CleanupResourcesEv ✅ verified 1
src/_ZN7daOts_c16OnAimedAtWithEggEv.cpp _ZN7daOts_c16OnAimedAtWithEggEv ✅ verified 1
src/_ZN7daOts_c16UpdateDeathStateEv.cpp _ZN7daOts_c16UpdateDeathStateEv ✅ verified 1
src/_ZN7daOts_c17PlayShellHitSoundEv.cpp _ZN7daOts_c17PlayShellHitSoundEv ✅ verified 1
src/_ZN7daOts_c6RenderEv.cpp _ZN7daOts_c6RenderEv ✅ verified 1
src/_ZN7daOts_cD0Ev.cpp _ZN7daOts_cD0Ev ✅ verified 1
src/_ZN7daOts_cD1Ev.cpp _ZN7daOts_cD1Ev ✅ verified 1
src/_ZN8BigBully13InitResourcesEv.cpp _ZN8BigBully13InitResourcesEv ✅ verified 1
src/_ZN8BigBully14UpdateRunStateEv.cpp _ZN8BigBully14UpdateRunStateEv ✅ verified 1
src/_ZN8BigBully16UpdateDeathStateEv.cpp _ZN8BigBully16UpdateDeathStateEv ✅ verified 1
src/_ZN8BigBully6RenderEv.cpp _ZN8BigBully6RenderEv ✅ verified 1
src/_ZN8BigBully8BehaviorEv.cpp _ZN8BigBully8BehaviorEv ✅ verified 1
src/_ZN8BigBullyD0Ev.cpp _ZN8BigBullyD0Ev ✅ verified 1
src/_ZN8BigBullyD1Ev.cpp _ZN8BigBullyD1Ev ✅ verified 1
src/_ZN8YoshiEgg13InitResourcesEv.cpp _ZN8YoshiEgg13InitResourcesEv ✅ verified 1
src/_ZN8YoshiEgg16CleanupResourcesEv.cpp _ZN8YoshiEgg16CleanupResourcesEv ✅ verified 1
src/_ZN8YoshiEgg6RenderEv.cpp _ZN8YoshiEgg6RenderEv ✅ verified 1
src/_ZN8YoshiEgg8BehaviorEv.cpp _ZN8YoshiEgg8BehaviorEv ✅ verified 1
src/_ZN8YoshiEggD0Ev.cpp _ZN8YoshiEggD0Ev ✅ verified 1
src/_ZN8YoshiEggD1Ev.cpp _ZN8YoshiEggD1Ev ✅ verified 1
src/actors/d_a_i_donketu.cpp _ZN12daIDonketu_cD1Ev + _ZN12daIDonketu_cD0Ev + _ZN12daIDonketu_c14UpdateRunStateEv + _ZN12daIDonketu_c16UpdateDeathStateEv + _ZN12daIDonketu_c8BehaviorEv + _ZN12daIDonketu_c13InitResourcesEv + daIDonketu_c_Spawn ✅ verified 7
src/func_ov064_02116220.cpp func_ov064_02116220 ✅ verified 1
src/func_ov064_02116560.cpp func_ov064_02116560 ✅ verified 1
src/func_ov064_021165d8.cpp func_ov064_021165d8 ✅ verified 1
src/func_ov064_02116754.cpp func_ov064_02116754 ✅ verified 1
src/func_ov064_02116d1c.cpp func_ov064_02116d1c ✅ verified 1

The private worker commits a test merge, builds the stock ROM profile, compares every executable module, measures matched and source-built code, checks contributor lineage, and verifies affected relocations. The mod profile is opt-in and is not part of this merge gate.

@andrewboudreau

Copy link
Copy Markdown
Collaborator Author

Merged current main (d06c059, which brought #2120's daObjKm1_Dorifu_c) into the branch and re-gated the merge tree, not just the branch:

  • attribution.json resolved by union — both blocks kept, 7 daIDonketu_c rows + 5 daObjKm1_Dorifu_c rows, file re-parses.
  • config/converted-baseline.json regenerated with tools/tiers_ratchet.py --update (2591 -> 2591, +0/-0), not hand-merged.
  • notes/cpp-tu-current-state.md regenerated with tools/cpp_tu_state.py --write-note; --check-note now reports current.

rombuild.py -j16 on the merged tree: 106/106 exact, 100.000000% of compared bytes, mismatching 0, source-owned data claims 8 reproducing / 0 mismatching, ROM data from source 573 verified.

andrewboudreau and others added 4 commits September 1, 2026 10:29
# Conflicts:
#	notes/cpp-tu-current-state.md
# Conflicts:
#	notes/cpp-tu-current-state.md
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
# Conflicts:
#	config/converted-baseline.json
#	notes/cpp-tu-current-state.md
@andrewboudreau
andrewboudreau merged commit 339c2aa into main Sep 1, 2026
9 checks passed
@andrewboudreau
andrewboudreau deleted the cpp/donketu-snake-tu branch September 1, 2026 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant