Finish and link HTTP socket library with a const request view #790

Merged
coah80 merged 1 commits from agent/bittle/http-send-selection into main 2026-10-02 10:00:26 +00:00
coah80 commented 2026-10-02 09:55:59 +00:00 (Migrated from github.com)

Change

NHTTPi_SocSend only reads the request's sslId/cancel fields and never passes the request to a mutating callee. Mark that parameter const in the definition and the caller's forward declaration. Align the definition's buffer parameter with the existing const-void buffer declaration in NHTTP_thread.c. Enable native linking for NHTTP_socket_RVL.

Three changed lines across three files. No body logic, shared header, volatile/register hint, assembly, data, padding, symbol metadata, or compiler-option changes.

Matching evidence

Before: NHTTPi_SocSend 43/43 instructions with three prologue scheduling differences: SSL-id load followed the r31 save/move instead of preceding them. The read-only request view produces the exact target sequence. Conditional-expression and named-temporary variants did not fix it and are not included.

After: NHTTPi_SocSend 43/43, zero differences; whole socket unit 10/10 exact (2,140/2,140 code, no owned data). +172 genuinely matched code bytes/+1 matched function, +2,140 linked code bytes/+1 completed unit.

Verification after rebase on d494f44516

  • Full 43U all_source/progress/report/ok build passes; DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d.
  • All 1,027-object audit: only NHTTP_socket_RVL .text changes (same 2,140-byte size, same 49 relocations). NHTTP_thread's object and every other allocated section/relocation remain unchanged.
  • No unit loses matched code, data, or functions versus freshly built main. Global link-address audit: 0 differences.
  • Pool 0/0 identical. Literal-reference audit covers 10 functions with no candidates/errors/skips (no static string arguments).
  • Tests: workflow 8, literal 36, jump-table 27, pool 8 pass. Diff/worktree checks pass.
  • Published tree c76aa510b1 matches the tested local tree.

Draft for review; no merge performed.

Note

Finish nhttp socket library with const-qualified request view

  • Marks NHTTP_socket_RVL.c as Matching for the nhttp library in configure.py, completing the library
  • Const-qualifies the request parameter of NHTTPi_SocSend and switches the data parameter to const void*, with the declaration in NHTTP_thread.c updated to match the definition in NHTTP_socket_RVL.c
  • Behavioral Change: build now treats the nhttp socket source as Matching instead of NonMatching

Macroscope summarized 73c9ca5.

## Change NHTTPi_SocSend only reads the request's sslId/cancel fields and never passes the request to a mutating callee. Mark that parameter const in the definition and the caller's forward declaration. Align the definition's buffer parameter with the existing const-void buffer declaration in NHTTP_thread.c. Enable native linking for NHTTP_socket_RVL. Three changed lines across three files. No body logic, shared header, volatile/register hint, assembly, data, padding, symbol metadata, or compiler-option changes. ## Matching evidence Before: NHTTPi_SocSend 43/43 instructions with three prologue scheduling differences: SSL-id load followed the r31 save/move instead of preceding them. The read-only request view produces the exact target sequence. Conditional-expression and named-temporary variants did not fix it and are not included. After: NHTTPi_SocSend 43/43, zero differences; whole socket unit 10/10 exact (2,140/2,140 code, no owned data). +172 genuinely matched code bytes/+1 matched function, +2,140 linked code bytes/+1 completed unit. ## Verification after rebase on d494f44516c38ab8e403afd52d4706a316947c97 - Full 43U all_source/progress/report/ok build passes; DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d. - All 1,027-object audit: only NHTTP_socket_RVL .text changes (same 2,140-byte size, same 49 relocations). NHTTP_thread's object and every other allocated section/relocation remain unchanged. - No unit loses matched code, data, or functions versus freshly built main. Global link-address audit: 0 differences. - Pool 0/0 identical. Literal-reference audit covers 10 functions with no candidates/errors/skips (no static string arguments). - Tests: workflow 8, literal 36, jump-table 27, pool 8 pass. Diff/worktree checks pass. - Published tree c76aa510b1f0403a644e552189a0bbb1ac828e39 matches the tested local tree. Draft for review; no merge performed. <!-- 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] > ### Finish `nhttp` socket library with const-qualified request view > - Marks `NHTTP_socket_RVL.c` as Matching for the `nhttp` library in [configure.py](https://github.com/coah80/wii-ipl/pull/790/files#diff-4d5f3192809ec1b9add6b33007e0c50031ad9a0a2f3f55a481b506468824db2c), completing the library > - Const-qualifies the request parameter of `NHTTPi_SocSend` and switches the data parameter to `const void*`, with the declaration in [NHTTP_thread.c](https://github.com/coah80/wii-ipl/pull/790/files#diff-3634ad3896e804eafc73a0cea43df33941a68ae42c3948e6da0cbe4100cebac9) updated to match the definition in [NHTTP_socket_RVL.c](https://github.com/coah80/wii-ipl/pull/790/files#diff-7a243e71b7627f1db44ae644d5b6c6504726764d6124b6409e63506ed4556170) > - Behavioral Change: build now treats the `nhttp` socket source as Matching instead of NonMatching > > <!-- Macroscope's review summary starts here --> > > <sup><a href="https://app.macroscope.com">Macroscope</a> summarized 73c9ca5.</sup> > <!-- Macroscope's review summary ends here --> > <!-- Macroscope's pull request summary ends here -->
coah80 commented 2026-10-02 10:00:23 +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.