fix(ezitext): recover options receiver and workspace contracts #1032

Merged
coah80 merged 1 commits from agent/bittle/ezitext-receiver-review into main 2026-10-03 03:29:31 +00:00
coah80 commented 2026-10-03 03:27:57 +00:00 (Migrated from github.com)

Target-proven receiver contracts

Zi8Punctuation's caller passes request/options/workspace in r3/r4/r5. Its definition omitted the third formal and treated options as workspace, describing coincident offsets with unrelated workspace fields. Reuse the dispatcher's existing private 24-byte ZiCandidateOptions view and read its actual countOnly/maxCount/capacity fields. The return type now agrees with the dispatcher declaration.

Separately add Zi8IsZicorpSignature's missing workspace formal, already explicitly supplied by its sole caller. Both target helpers ignore incoming workspace; this adds no local, storage, assignment or manufactured instruction.

Independent parent verification

  • Private options definition matches producer verbatim; compiled layout assertions confirm size24 and accessed offsets0/0x0C/0x10
  • Original dispatcher fixed argument moves checked; punctuation overwrites r5 from options capacity before any use, and signature's 48 instructions never use r5
  • Punctuation remains 75/75 exact; zi8initd functions remain 128/128 and 48/48 exact, all ctxdiff zero
  • All 1027 allocated objects/canonical relocations and complete report unchanged; three exact functions and 120 data bytes preserved
  • Punctuation's whole object only changes compiler-generated anonymous-name characters in nonallocated .strtab; no whole-object identity claim for that object
  • Empty pools identical; full 43U all_source/report/progress/DOL and worktree/diff checks pass

Worker's broader diagnostic audit checked 338 callsite argument expressions at fixed ABI register/stack positions without finding another live-argument mismatch; this is not a formal whole-program proof.

Only two owned sources and separate evidence logs change. No shared header, buffer, table, metadata, compiler, linking or percentage-gain claim.

Base: 885cdfeee6
Tested tree: 84cd95c09c
DOL SHA1: 26116613f624061ba99c8d1a299aaa6efa85670d

No merge performed or requested by this author.

Note

Fix Zi8Punctuation options and Zi8IsZicorpSignature workspace contracts

  • Adds a private ZiCandidateOptions record in Zi8punct.c and changes Zi8Punctuation to take an explicit options pointer and return an unsigned 32-bit value. Capacity, count-only mode, and termination now come from the options record instead of implicit workspace fields.
  • Adds the missing ZI_NEED_WORK formal to the Zi8IsZicorpSignature definition in zi8initd.c so its parameter list matches the caller. Signature comparisons are unchanged.
  • Adds decompilation analysis reports under tools/decomp-assist/ documenting the reconstructed argument contracts and ABI audit.
  • Risk: callers of Zi8Punctuation must pass the new options pointer in place of workspace-based inputs; check the updated call sites in zi8initd.c and the punctuation module.

Macroscope summarized 395bf57.

## Target-proven receiver contracts Zi8Punctuation's caller passes request/options/workspace in r3/r4/r5. Its definition omitted the third formal and treated options as workspace, describing coincident offsets with unrelated workspace fields. Reuse the dispatcher's existing private 24-byte ZiCandidateOptions view and read its actual countOnly/maxCount/capacity fields. The return type now agrees with the dispatcher declaration. Separately add Zi8IsZicorpSignature's missing workspace formal, already explicitly supplied by its sole caller. Both target helpers ignore incoming workspace; this adds no local, storage, assignment or manufactured instruction. ## Independent parent verification - Private options definition matches producer verbatim; compiled layout assertions confirm size24 and accessed offsets0/0x0C/0x10 - Original dispatcher fixed argument moves checked; punctuation overwrites r5 from options capacity before any use, and signature's 48 instructions never use r5 - Punctuation remains 75/75 exact; zi8initd functions remain 128/128 and 48/48 exact, all ctxdiff zero - All 1027 allocated objects/canonical relocations and complete report unchanged; three exact functions and 120 data bytes preserved - Punctuation's whole object only changes compiler-generated anonymous-name characters in nonallocated .strtab; no whole-object identity claim for that object - Empty pools identical; full 43U all_source/report/progress/DOL and worktree/diff checks pass Worker's broader diagnostic audit checked 338 callsite argument expressions at fixed ABI register/stack positions without finding another live-argument mismatch; this is not a formal whole-program proof. Only two owned sources and separate evidence logs change. No shared header, buffer, table, metadata, compiler, linking or percentage-gain claim. Base: 885cdfeee63a4b681bb5242e198dd7220834eb43 Tested tree: 84cd95c09c255406411fba8505a76c272da054b1 DOL SHA1: 26116613f624061ba99c8d1a299aaa6efa85670d 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 `Zi8Punctuation` options and `Zi8IsZicorpSignature` workspace contracts > - Adds a private `ZiCandidateOptions` record in [Zi8punct.c](https://github.com/coah80/wii-ipl/pull/1032/files#diff-a9bebb769e52c88a0c7b6a4e4c41f45c0c2dc13d06869cd51a1e887ca35b04da) and changes `Zi8Punctuation` to take an explicit options pointer and return an unsigned 32-bit value. Capacity, count-only mode, and termination now come from the options record instead of implicit workspace fields. > - Adds the missing `ZI_NEED_WORK` formal to the `Zi8IsZicorpSignature` definition in [zi8initd.c](https://github.com/coah80/wii-ipl/pull/1032/files#diff-f337b29bd47fde4cfa1395d7d2af799e65ae8c73b80b2f30f08358df0a4e720a) so its parameter list matches the caller. Signature comparisons are unchanged. > - Adds decompilation analysis reports under [tools/decomp-assist/](https://github.com/coah80/wii-ipl/pull/1032/files#diff-ec16ecde4e6a48fc75691bd0523ff1d067262277466c150f993c7285abecfb8f) documenting the reconstructed argument contracts and ABI audit. > - Risk: callers of `Zi8Punctuation` must pass the new options pointer in place of workspace-based inputs; check the updated call sites in `zi8initd.c` and the punctuation module. > > <!-- Macroscope's review summary starts here --> > > <sup><a href="https://app.macroscope.com">Macroscope</a> summarized 395bf57.</sup> > <!-- Macroscope's review summary ends here --> > <!-- Macroscope's pull request summary ends here -->
coah80 commented 2026-10-03 03:29:29 +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.