decomp: recover card rename retry reset boundary #999

Merged
coah80 merged 1 commits from agent/bittle/card-rename-retry into main 2026-10-03 00:07:36 +00:00
coah80 commented 2026-10-03 00:05:29 +00:00 (Migrated from github.com)

Behavioral correction

Move the filename clear inside the rename retry loop. The target clears the temporary filename before every formatted retry; the reconstruction cleared it only once. No other copy/move logic changes.

Independent verification

  • runCardMoveOrCopy: 97.804276% → 97.8125%; one compiled branch changes, function extent preserved
  • Unit fuzzy: 97.198944% → 97.20097%; 27/30 exact functions and 4168/9852 exact code unchanged
  • Data remains 1496/1496; all non-text bytes and normalized relocations unchanged
  • Parent reran 192 focused compiled-PPC loop cases across both slots, file numbers, retry counts and success/error results. Candidate trace/state matches target; baseline mismatch reproduced in 174 cases
  • These are bounded loop tests with modeled memset/sprintf/CARD calls, not full copy/move or Wii hardware tests
  • All 1027 objects compared: only one branch in cardSequence .text changes; no report regressions
  • All 27 exact functions retain ctxdiff zero; pool 43/43 identical; literal/worktree/diff checks and full 43U build/report/DOL pass

The separately investigated reserved icon-format behavior is not changed. No new exact function or linking claim.

Parent baseline: fa0cb9b7b4
Tested tree: c92a0bccaa
DOL SHA1: 26116613f624061ba99c8d1a299aaa6efa85670d

User priority is decompilation, then matching, then linking. No merge performed or requested by this author.

Note

Fix move-rename retry loop to clear temporary filename buffer each attempt

Moves the filename-buffer clear() in runCardMoveOrCopy from before the do-while retry loop into the loop body, so each retry formats a fresh temporary name instead of appending to leftover data. Also documents the reconstruction and the deferred reserved-format icon-loader boundary in card-icon-reconstruction-attempts.md.

Macroscope summarized d49c75a.

## Behavioral correction Move the filename clear inside the rename retry loop. The target clears the temporary filename before every formatted retry; the reconstruction cleared it only once. No other copy/move logic changes. ## Independent verification - runCardMoveOrCopy: 97.804276% → 97.8125%; one compiled branch changes, function extent preserved - Unit fuzzy: 97.198944% → 97.20097%; 27/30 exact functions and 4168/9852 exact code unchanged - Data remains 1496/1496; all non-text bytes and normalized relocations unchanged - Parent reran 192 focused compiled-PPC loop cases across both slots, file numbers, retry counts and success/error results. Candidate trace/state matches target; baseline mismatch reproduced in 174 cases - These are bounded loop tests with modeled memset/sprintf/CARD calls, not full copy/move or Wii hardware tests - All 1027 objects compared: only one branch in cardSequence .text changes; no report regressions - All 27 exact functions retain ctxdiff zero; pool 43/43 identical; literal/worktree/diff checks and full 43U build/report/DOL pass The separately investigated reserved icon-format behavior is not changed. No new exact function or linking claim. Parent baseline: fa0cb9b7b43018c542b9768a6cd8cd121426b519 Tested tree: c92a0bccaa565b0496f4960ce5e2ca78ec92a184 DOL SHA1: 26116613f624061ba99c8d1a299aaa6efa85670d User priority is decompilation, then matching, then linking. No merge performed or requested by this author. <!-- Macroscope's pull request summary starts here --> <!-- Macroscope will only edit the content between these invisible markers, and the markers themselves will not be visible in the GitHub rendered markdown. --> <!-- If you delete either of the start / end markers from your PR's description, Macroscope will append its summary at the bottom of the description. --> > [!NOTE] > ### Fix move-rename retry loop to clear temporary filename buffer each attempt > Moves the filename-buffer `clear()` in `runCardMoveOrCopy` from before the do-while retry loop into the loop body, so each retry formats a fresh temporary name instead of appending to leftover data. Also documents the reconstruction and the deferred reserved-format icon-loader boundary in [card-icon-reconstruction-attempts.md](https://github.com/coah80/wii-ipl/pull/999/files#diff-33d56ff8a68d69105e2afac9320c6476b1cf1cf2bca6caab98511d88d7960012). > > <!-- Macroscope's review summary starts here --> > > <sup><a href="https://app.macroscope.com">Macroscope</a> summarized d49c75a.</sup> > <!-- Macroscope's review summary ends here --> > <!-- Macroscope's pull request summary ends here -->
coah80 commented 2026-10-03 00:07:32 +00:00 (Migrated from github.com)

Reviewed and merged: rebased on main, full build ok, DOL sha1 26116613f624061ba99c8d1a299aaa6efa85670d, 0 regressions, 0 forbidden patterns.

Reviewed and merged: rebased on main, full build ok, DOL sha1 26116613f624061ba99c8d1a299aaa6efa85670d, 0 regressions, 0 forbidden patterns.
Sign in to join this conversation.