Skip to content

Promote daKrpa_c as a genuine class TU - #2002

Merged
andrewboudreau merged 5 commits into
mainfrom
cpp/dakrpa-genuine-tu
Aug 30, 2026
Merged

Promote daKrpa_c as a genuine class TU#2002
andrewboudreau merged 5 commits into
mainfrom
cpp/dakrpa-genuine-tu

Conversation

@andrewboudreau

Copy link
Copy Markdown
Collaborator

Dependency

Stacked on #2000. After it merges, this branch will be rebased onto current main.

Summary

  • promote ov070/daKrpa_c from 25 one-function sources into src/actors/daKrpa_c.cpp
  • let mwccarm emit the real D1/D0 lifecycle, vtable, RTTI, SpawnInfo, and typed class behavior; no D2 or generated destructor shells remain
  • replace local shadows, raw actor offsets, and manual lifetimes with typed members and genuine C++ calls where exact, retaining only documented ABI seams

Verification

  • tubuild verify: 25/25 MATCH, objisolate clean, relocation destinations clean
  • emission order: all 25 functions in ROM order; compiler-only Vector3 D1 is exact and fail-closed
  • romdata_check: 4 VERIFIED, 6 PARTIAL, 0 DIFFERS, 0 UNNAMED
  • check_src_tu_compiles: 88/88
  • full rombuild.py -j 16: 11,085/11,085 reproducing, 0 mismatches, 106/106 modules exact, 0 ROM-gap fallback, PASS
  • port, dead-reference, header-offset, language-mode, converted-tier, TU-state, reference, and attribution gates pass; 25/25 credits preserved

@andrewboudreau andrewboudreau added the attribution-override Maintainer accepts this PR's contributor-credit changes; validation reports them as warnings label Aug 30, 2026
@tangos-validator

tangos-validator Bot commented Aug 30, 2026

Copy link
Copy Markdown

✅ PR validation — Passed

Committed merge introduces no reconstruction or attribution regression.

Full merge validation

Check Result
Committed test merge yes
Byte-verified functions 10,998 / 11,347 (96.92%, -24)
Byte-verified code bytes 2,045,248 / 2,211,124 (92.50%, -2,536)
Claimed, not byte-verified 218 functions, 60,056 bytes (+24)
Perfect source moves 0 R100
Enrolled ranges (delinks complete) 11,058 functions, 2,052,772 bytes (92.84%, +0) -- differs from byte-verified by +60
Contributor credit 0 added, 0 changed, 0 lost
Relocation check 25 checked; 25 VERIFIED
Port reference check 405 checked; 0 stale
Module fidelity 106/106 exact; 100.000000% compared bytes
Code linked from verified source 11,087 functions, 2,066,772 bytes (93.47%)
Module bytes from source 2,066,772 / 3,049,600 (67.8%); 811,492 (26.6%) are data no delink entry reaches
ROM data reproduced from source 447 symbol(s) exact, 244 partial, 15 differ

Byte-verified means the range carries complete in a delinks.txt, so the ROM build compiled it and compared it to the cartridge. The 218 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,216 this project calls matched.

Warnings: 25 address range(s) left the byte-verified set while enrolled totals held steady: ov070:0x02121118-0x02121160, ov070:0x02121160-0x021211bc, ov070:0x021211bc-0x021211c4, ov070:0x021211c4-0x02121298, ov070:0x02121298-0x02121310, +20 more; 24 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 1 changed file(s) compile to the ROM byte-for-byte with correct relocation targets.

File Symbol Result Slots checked
src/actors/daKrpa_c.cpp _ZN8daKrpa_cD1Ev + _ZN8daKrpa_cD0Ev + _ZN8daKrpa_c13OnYoshiTryEatEv + func_ov070_021211c4 + func_ov070_02121298 + func_ov070_02121310 + func_ov070_021213cc + func_ov070_02121438 + func_ov070_021214f8 + func_ov070_02121548 + func_ov070_0212156c + func_ov070_021216b8 + func_ov070_02121710 + func_ov070_021217ac + func_ov070_0212180c + func_ov070_02121848 + func_ov070_02121880 + _ZN8daKrpa_c16CleanupResourcesEv + _ZN8daKrpa_c16OnPendingDestroyEv + _ZN8daKrpa_c6RenderEv + _ZN8daKrpa_c8BehaviorEv + _ZN8daKrpa_c13InitResourcesEv + func_ov070_02121a64 + func_ov070_02121ae0 + daKrpa_c_Spawn ✅ verified 25

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 and others added 3 commits August 30, 2026 10:01
Carries origin/main through the restacked #2000. Same two generated files
conflicted and are resolved the same way:

- config/converted-baseline.json: REGENERATED with the post-#2007 tiers.py
  (tools/tiers_ratchet.py --update), never by side or key union. Count
  2552 = the parent branch's 2559 minus the seven per-symbol files this
  PR's ov070/daKrpa_c promotion absorbs. All seven are classified
  "MOVED -- absorbed into src/actors/daKrpa_c.cpp" by classify_missing(),
  that file exists in this tree, and all seven already had rows in
  config/converted-backslide-exceptions.jsonl from this branch's own
  earlier run, so no duplicate rows were added.

- notes/cpp-tu-current-state.md: regenerated with tools/cpp_tu_state.py
  --write-note; --check-note is clean.

No source file, delinks entry, or byte changed in this merge.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WdCK1xgrJdiJzPCh3bAJfQ
Drops this branch's two redundant daObjAbuku_c backslide rows in favour of
#2011's authoritative pair (the union merge driver had produced one of each),
and re-regenerates config/converted-baseline.json from the parent branch's
2559 with tools/tiers_ratchet.py --update.

Count 2552 = 2559 minus the seven per-symbol files this PR's ov070/daKrpa_c
promotion absorbs. All seven are classified "MOVED -- absorbed into
src/actors/daKrpa_c.cpp by TU promotion (ov070/daKrpa_c)" by the tool's own
classify_missing(); that file exists and is git-tracked here. Zero genuine
removals, and all seven already had rows from this branch's earlier run, so
no duplicate rows were added.

notes/cpp-tu-current-state.md regenerated; --check-note clean.
No source file, delinks entry, or byte changed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WdCK1xgrJdiJzPCh3bAJfQ
andrewboudreau added a commit that referenced this pull request Aug 30, 2026
Carries origin/main through the restacked #2000 and #2002.

- config/converted-baseline.json: this PR RENAMES rather than absorbs, so it
  is resolved by carrying the three PathLift -> dPathLiftActor_c key renames
  onto the parent branch's 2552 set and then regenerating with
  tools/tiers_ratchet.py --update. That yields +1 / -0 and count 2553: zero
  removals and zero backslide rows, which is the honest reading.

  Regenerating WITHOUT the key rename first would have reported the three
  paths as "GONE -- not a tracked source file any more" and demanded a
  --reason, which would have logged a rename as a readability backslide.
  git itself scores them as renames (R076/R059/R061), all three destinations
  exist and are tracked, and all three are CONVERTED in the new set, so no
  readability was lost. This matches how this branch already handled the
  D0/D1 pair against the older baseline.

- notes/cpp-tu-current-state.md: regenerated with tools/cpp_tu_state.py
  --write-note; --check-note is clean.

No source file, delinks entry, or byte changed in this merge.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WdCK1xgrJdiJzPCh3bAJfQ
@andrewboudreau
andrewboudreau deleted the branch main August 30, 2026 15:36
@andrewboudreau
andrewboudreau changed the base branch from cpp/dakpfr-genuine-tu to main August 30, 2026 15:39
@andrewboudreau
andrewboudreau merged commit a900e3e into main Aug 30, 2026
13 checks passed
@andrewboudreau
andrewboudreau deleted the cpp/dakrpa-genuine-tu branch August 30, 2026 15:54
andrewboudreau added a commit that referenced this pull request Aug 30, 2026
Resolved:
- attribution.json: key union of both overrides blocks (903 keys; nothing
  lost from either side, no value disagreements).
- notes/cpp-tu-current-state.md: regenerated with
  tools/cpp_tu_state.py --write-note.

Main's naming wins throughout (#1978 ov063 RTTI renames, #1991
daDsnBase_c, #2000 daKpFr_c, #2002 daKrpa_c, the WingFeather move
under src/game/actors/).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WdCK1xgrJdiJzPCh3bAJfQ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

attribution-override Maintainer accepts this PR's contributor-credit changes; validation reports them as warnings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant