docs(libSceHttp2): record the synchronous WebSocket exports as unestablished #16936
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/16936"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by Deftera186 on 2026-11-07T23:55:26Z.
What
Record in the libSceHttp2 technical-debt file that the four synchronous WebSocket exports have no established prototype, so they stay throwing.
sceHttp2WebSocketClosesceHttp2WebSocketSendTextMessagesceHttp2WebSocketSendDataMessagesceHttp2WebSocketSetCloseTimeoutThis started as an implementation of those four exports, mirroring their async twins. Review correctly showed there was no cited source for the prototypes: the debt entry claimed SharpProspero's
Http2.cs, which at5dfdb4bhas no WebSocket declarations at all. prosper'shle_http2.cppand rps5e'shttp.rsare the same — async twins and the two ping setters only — and a GitHub code search for the four names finds only this PR, its forks and NID maps.Dropping
asyncOptionfrom an async twin is also unsound as a rule, not just uncited: the async forms take(…, kqueueOption, option)and this library's synchronous forms drop both.sceHttp2ReadDataandsceHttp2SendRequesttake three arguments where their async twins take five. A prototype one parameter longer than the console's would read the guest's unset register asoptionand reject a valid call with0x817B11FEinstead of0x817B1065.So the exports stay in
InventoryExports.cppas parameterlessintplaceholders that throw throughNotImplemented_nid_no_patch, exactly as onmain, and the new debt entry states what would close the gap: a read of the 13.40libSceHttp2.sprxexports, or a title call site, giving each prototype.This PR now changes no code, only
docs/dev/debt/libSceHttp2.md(two added lines). The earlier commits' implementations, argument guards,SetCloseTimeoutfloor and their tests are dropped, because all of them depended on the inferred prototypes and nothing may assert behavior for exports that take no verified arguments.Tested
Not tested — documentation only.
python3 tools/check_conventions.py --base origin/mainpasses (debt entry 871 characters, under the 1000 limit).Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repositoryImported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-11-11T23:48:10Z.
Review: CHANGES_REQUESTED
Thanks for this. One blocker:
docs/dev/debt/libSceHttp2.md:49says the signatures follow SharpProsperoHttp2.cs, but that file at 5dfdb4b has no WebSocket declarations at all, so the sync prototypes (Export.cpp:543-565: argument order and the trailingoption) have no cited source. They are inferred from the async twins by droppingasyncOption. Please either point to a real source for each signature (e.g. the firmware 13.40 module disassembly you already rely on for the async exports, showing whereflags/optionsit in the registers) or, if that can't be established, keep these exports throwing and record them in the debt file.The rest (guards mirroring the async twins,
SetCloseTimeoutfloor, header move, test coverage) looks fine.Imported from boykopovar/AnyPS5. Originally posted by Deftera186 on 2026-11-18T23:04:07Z.
Review: COMMENTED
You're right, and I've taken your fallback: the four exports stay throwing and the gap is now recorded in the debt file instead of claimed as an ABI.
Verified before changing anything:
SharpProsperoHttp2.csat5dfdb4bhas zero WebSocket declarations (339 lines,grep -i websocket→ 0 hits). So does prosperhle_http2.cppandrps5e'shttp.rs: async twins and the two ping setters only.libSceHttp2.sprximage here, and thelibSceHttp2.prxin the local probe tree is this repo's own stub build (every export aNotImplementedthunk at0x34b60), so disassembling it would only have read back my own placeholders.On the derivation itself, dropping
asyncOptionis also unsafe as a rule, not just uncited. The async twins take(…, kqueueOption, option), and this library's synchronous forms drop both:Removing only
asyncOptionwould leave a trailingoptionparameter that the console does not have, so the guest's unset register would be read asoptionand a valid call would come back0x817B11FEinstead of0x817B1065. Keeping them throwing is the only version that cannot be wrong in that direction.What's in the PR now (rebased onto
main, two added lines indocs/dev/debt/libSceHttp2.md, no code changes):ReadData/SendRequestcounterexample, and ends withCloses when: a read of the 13.40 libSceHttp2.sprx exports or a title call site gives each prototype;sceHttp2WebSocketClose,…SendTextMessage,…SendDataMessageand…SetCloseTimeoutstill live inInventoryExports.cppas parameterlessintplaceholders that throw throughNotImplemented_nid_no_patch, as onmain.Dropped from the branch, since they depended on the inferred prototypes: the real signatures in
Export.cpp/Http2.hpp, the argument guards mirroring the async twins, and theSetCloseTimeoutfloor. The websocket guard and ping-setter tests go with them, so nothing asserts behavior for exports that no longer take arguments.If you'd rather have the implemented versions than the record, the missing piece is a 13.40 module read of these four exports showing the
flags/optionregister positions; with that I'll restore the code on top of this.tools/check_conventions.py --base origin/mainpasses.Imported from boykopovar/AnyPS5. Originally posted by Deftera186 on 2026-11-18T23:13:34Z.
Review: COMMENTED
One correction to my previous message: I first edited
docs/dev/debt/libSceHttp2.mddirectly, then found thatdocs/dev/TechnicalDebt.mdFragments says a pull request must not edit the debt files, only adddocs/dev/debt/changes/<branch>.md. The branch now carries just that fragment, and the debt file is byte-identical tomain.So the PR's whole diff is one new file,
docs/dev/debt/changes/http2-sync-websocket.md, +5 lines:python3 tools/debt_fold.py --checkpasses, and--show libSceHttp2folds the entry in once, under Unknown function info, right after the NID table that lists the four names.tools/check_conventions.py --base origin/mainpasses.Everything in my previous message about the evidence still holds: the SharpProspero citation is gone, no public source gives these four prototypes, and the
sceHttp2ReadData/sceHttp2SendRequestpairs show the synchronous forms drop both trailing option arguments rather than justasyncOption. The four exports remain throwing placeholders inInventoryExports.cpp, as onmain.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-23T06:13:05Z.
Review: COMMENTED
Reviewed — comments
This documentation-only change records the lack of verified prototypes for four synchronous WebSocket exports and keeps the existing throwing placeholders.
What I ran
I read the full changed file and the prepared description, commit list, manifest, and diff for head
a44ef1307ad40bb943159ae2dfce5cd782c29bd6. No commands were run.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
The author reports
python3 tools/check_conventions.py --base origin/mainpasses; I did not run it. I did not independently verify the external-source and console-export claims summarized in the new entry. No other repository files were read;files.jsonwas not available in the prepared artifacts, so the full set of files classified as reviewed could not be confirmed.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T12:06:54Z.
Review: COMMENTED
Ran the debt fold check on this head. The new note applies cleanly, and the four synchronous WebSocket exports still use the repository’s throwing path. The note records the missing prototype evidence.
AI-assisted: yes.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.