Skip to content

Promote daKpFr_c as a genuine class TU - #2000

Merged
andrewboudreau merged 6 commits into
mainfrom
cpp/dakpfr-genuine-tu
Aug 30, 2026
Merged

Promote daKpFr_c as a genuine class TU#2000
andrewboudreau merged 6 commits into
mainfrom
cpp/dakpfr-genuine-tu

Conversation

@andrewboudreau

Copy link
Copy Markdown
Collaborator

Summary

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

Verification

  • tubuild verify: 21/21 MATCH, objisolate clean, relocation destinations clean
  • raw object: exactly 21 functions and 10 licensed data objects; D1 then D0; no D2 or _Znwm
  • romdata_check: 4 VERIFIED, 6 PARTIAL with 72 exact bytes, 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, ROM-build PASS
  • port, dead-reference, header-offset, language-mode, converted-tier, TU-state, reference, and attribution gates pass; 21/21 credits preserved

@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 11,022 / 11,347 (97.14%, -20)
Byte-verified code bytes 2,047,784 / 2,211,124 (92.61%, -1,724)
Claimed, not byte-verified 194 functions, 57,520 bytes (+20)
Perfect source moves 0 R100
Enrolled ranges (delinks complete) 11,058 functions, 2,052,772 bytes (92.84%, +0) -- differs from byte-verified by +36
Contributor credit 0 added, 0 changed, 0 lost
Relocation check 21 checked; 21 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, 243 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 194 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: 21 address range(s) left the byte-verified set while enrolled totals held steady: ov070:0x02121b48-0x02121b88, ov070:0x02121b88-0x02121bdc, ov070:0x02121bdc-0x02121be4, ov070:0x02121be4-0x02121c8c, ov070:0x02121c8c-0x02121cbc, +16 more; 20 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/daKpFr_c.cpp _ZN8daKpFr_cD1Ev + _ZN8daKpFr_cD0Ev + _ZN8daKpFr_c13OnYoshiTryEatEv + func_ov070_02121be4 + func_ov070_02121c8c + func_ov070_02121cbc + func_ov070_02121d50 + func_ov070_02121e14 + func_ov070_02121eb0 + func_ov070_02121ef8 + func_ov070_02121f18 + func_ov070_02121fb0 + func_ov070_02121fd0 + func_ov070_0212200c + func_ov070_02122044 + _ZN8daKpFr_c16CleanupResourcesEv + _ZN8daKpFr_c16OnPendingDestroyEv + _ZN8daKpFr_c6RenderEv + _ZN8daKpFr_c8BehaviorEv + _ZN8daKpFr_c13InitResourcesEv + daKpFr_c_Spawn ✅ verified 21

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 andrewboudreau added the attribution-override Maintainer accepts this PR's contributor-credit changes; validation reports them as warnings label Aug 30, 2026
Resolves three generated files that main regenerated wholesale:

- config/converted-baseline.json: REGENERATED with the post-#2007 tiers.py
  (tools/tiers_ratchet.py --update), not resolved by side or key union.
  Keeping the branch's copy would have banked 1951 and silently lowered the
  ratchet floor by ~600 entries with every gate green. New count 2559 =
  main's real current CONVERTED score (2565) minus the six per-symbol files
  this PR's ov070/daKpFr_c promotion absorbs.

- config/converted-backslide-exceptions.jsonl: the six daKpFr_c rows this
  branch already logged are kept as-is; two rows added for
  src/_ZN12daObjAbuku_cD0Ev.cpp and D1, which main's own ov002/daObjAbuku_c
  promotion (#1996) absorbed without re-banking. Both are classified
  "MOVED -- absorbed into src/actors/daObjAbuku_c.cpp" by the tool's own
  classify_missing(), and that file exists in this tree.

- 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 added a commit that referenced this pull request Aug 30, 2026
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
Re-merges main now that #2011 has re-banked the two daObjAbuku_c paths
that #1996 absorbed, which was main's own ratchet desync and not this
PR's doing.

- config/converted-baseline.json: REGENERATED from main's 2565 with
  tools/tiers_ratchet.py --update -- never resolved by side or key union.
  New count 2559 = 2565 minus the six per-symbol files this PR's
  ov070/daKpFr_c promotion absorbs. All six are classified
  "MOVED -- absorbed into src/actors/daKpFr_c.cpp by TU promotion
  (ov070/daKpFr_c)" by the tool's own classify_missing(), and that file
  exists and is tracked in this tree. Zero genuine removals.

- config/converted-backslide-exceptions.jsonl: the union driver produced
  duplicate daObjAbuku_c rows (this branch's earlier pair plus #2011's).
  #2011's authoritative rows are kept and the redundant pair dropped, so
  each path is one row. The six daKpFr_c rows this branch already logged
  are unchanged; no new rows were needed.

- 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 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 merged commit 765e9d3 into main Aug 30, 2026
7 checks passed
@andrewboudreau
andrewboudreau deleted the cpp/dakpfr-genuine-tu branch August 30, 2026 15:36
@andrewboudreau
andrewboudreau restored the cpp/dakpfr-genuine-tu branch August 30, 2026 15:38
andrewboudreau added a commit that referenced this pull request Aug 30, 2026
Resolved:
- attribution.json: key union of both overrides blocks (878 keys, no
  key or value lost from either side).
- notes/cpp-tu-current-state.md: regenerated with
  tools/cpp_tu_state.py --write-note; it now names both main's
  daKpFr_c.cpp and this branch's ActorDerived.cpp as complete
  multi-function owners.

Took main's naming for the #1978 ov063 RTTI renames (MansionSteps ->
daTrsTrap_c, BooCage -> daTBasket_c), the #1991 daDsnBase_c slots and
the #2000 daKpFr_c TU promotion.

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
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