decomp: recover AOSS initialization guards and request lifetimes #1001

Merged
coah80 merged 1 commits from agent/bittle/aoss-init-flow into main 2026-10-03 00:15:32 +00:00
coah80 commented 2026-10-03 00:14:07 +00:00 (Migrated from github.com)

Source reconstruction

Recover the target's repeated initial-address status guard and cleanup block, distinct send-result/socket lifetimes, request-record traversal, receive-state transition at the reconnection join, and retry/cleanup branch boundaries.

The repeated guard is redundant on its successful edge, but original object offsets 0x6F0–0x730 retain that branch and cleanup before allocation at 0x734. Parent independently inspected this region. The source comment explains the redundancy; no fabricated call, qualifier or undefined value is added.

Independent verification

  • AOSS_Init_old: 93.78725% → 96.18624%; source 1575 → 1581 instructions, target 1584
  • Unit fuzzy: 96.777916% → 97.71665%; exact functions 16/21, exact code 6436/16192 and data 3928/3928 unchanged
  • All 1027 source objects compared: only AOSS .text changes; every allocated non-text byte and normalized relocation is unchanged; no function/unit/data regression
  • All 16 exact functions retain ctxdiff zero; one-string pool identical; literal audit checks 10 arguments with no errors/candidates
  • Parent reran native local-algorithm checks for 65,536 retry spans, 20,003 error states and 65,536 three-record initializations with canaries under ASan/UBSan
  • Those checks are not a simulation of network initialization; no Wii/network runtime execution claimed
  • Full 43U build/report/progress/DOL and worktree/diff checks pass

Init remains partial, with allocation, scheduling and source-object boundaries still unresolved. Hello and all other functions are unchanged. No ATERM, header, metadata, linking or compiler-option changes.

Parent baseline: 14a8b23adb
Tested tree: 2c9aeab8d1
DOL SHA1: 26116613f624061ba99c8d1a299aaa6efa85670d

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

Note

Recover AOSS initialization guards and request lifetimes in AOSS_Init_old

  • Adds a repeated nonzero-state guard before access-point allocation in AOSS_Init_old (AOSS.c). On nonzero state it sets failure status, releases both access-point allocations, and jumps to the shared initialization finish path.
  • Reworks the three request records to use one array index for address copying and transaction-ID generation. Replaces timeout-error switches with explicit zero/one/default chains and moves protocol-state publication to a shared reconnection join.
  • Adds a reconstruction report covering source boundaries, rejected alternatives, and verification results in aoss-init-reconstruction-20261002.md.
  • Behavioral Change: AOSS_Init_old now aborts initialization with failure status and cleanup when the new pre-allocation state check sees a nonzero state.

Macroscope summarized 59df857.

## Source reconstruction Recover the target's repeated initial-address status guard and cleanup block, distinct send-result/socket lifetimes, request-record traversal, receive-state transition at the reconnection join, and retry/cleanup branch boundaries. The repeated guard is redundant on its successful edge, but original object offsets 0x6F0–0x730 retain that branch and cleanup before allocation at 0x734. Parent independently inspected this region. The source comment explains the redundancy; no fabricated call, qualifier or undefined value is added. ## Independent verification - AOSS_Init_old: 93.78725% → 96.18624%; source 1575 → 1581 instructions, target 1584 - Unit fuzzy: 96.777916% → 97.71665%; exact functions 16/21, exact code 6436/16192 and data 3928/3928 unchanged - All 1027 source objects compared: only AOSS .text changes; every allocated non-text byte and normalized relocation is unchanged; no function/unit/data regression - All 16 exact functions retain ctxdiff zero; one-string pool identical; literal audit checks 10 arguments with no errors/candidates - Parent reran native local-algorithm checks for 65,536 retry spans, 20,003 error states and 65,536 three-record initializations with canaries under ASan/UBSan - Those checks are not a simulation of network initialization; no Wii/network runtime execution claimed - Full 43U build/report/progress/DOL and worktree/diff checks pass Init remains partial, with allocation, scheduling and source-object boundaries still unresolved. Hello and all other functions are unchanged. No ATERM, header, metadata, linking or compiler-option changes. Parent baseline: 14a8b23adbd5e72873acdce882ded87eae1c2a2b Tested tree: 2c9aeab8d1e175f5616790c09075be3c6c1d884a 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] > ### Recover AOSS initialization guards and request lifetimes in `AOSS_Init_old` > - Adds a repeated nonzero-state guard before access-point allocation in `AOSS_Init_old` ([AOSS.c](https://github.com/coah80/wii-ipl/pull/1001/files#diff-c9d178769a3c839c7dccd0eba548dd59c264dfe097f6aa29f6df6f8bb7546c98)). On nonzero state it sets failure status, releases both access-point allocations, and jumps to the shared initialization finish path. > - Reworks the three request records to use one array index for address copying and transaction-ID generation. Replaces timeout-error switches with explicit zero/one/default chains and moves protocol-state publication to a shared reconnection join. > - Adds a reconstruction report covering source boundaries, rejected alternatives, and verification results in [aoss-init-reconstruction-20261002.md](https://github.com/coah80/wii-ipl/pull/1001/files#diff-a56d424be8ff8be360cfd4237a97bedf89eccc72e186ae6fe378d95612a66aea). > - Behavioral Change: `AOSS_Init_old` now aborts initialization with failure status and cleanup when the new pre-allocation state check sees a nonzero state. > > <!-- Macroscope's review summary starts here --> > > <sup><a href="https://app.macroscope.com">Macroscope</a> summarized 59df857.</sup> > <!-- Macroscope's review summary ends here --> > <!-- Macroscope's pull request summary ends here -->
coah80 commented 2026-10-03 00:15:30 +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.