Repository navigation
Conversation
… size, header size and content length setters sceHttpSetSendTimeOut, sceHttpSetRecvTimeOut, sceHttpSetResolveTimeOut, sceHttpSetResolveRetry, sceHttpSetRecvBlockSize, sceHttpSetResponseHeaderMaxSize and sceHttpSetRequestContentLength returned 0 for any id and kept nothing. They now return BEFORE_INIT before sceHttpInit, INVALID_ID for an unknown id, and keep the value in the object's options; the content length is taken only by a request. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PrivacyOnion
left a comment
There was a problem hiding this comment.
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against 9fba7a84b1:
- Conventions:
tools/check_conventions.pypassed. - Build:
guest_http_options_tests,guest_http_testsbuilt cleanly. - CTest (
guest_http,guest_http_uri_locale,guest_http_options):1/3 Test #3934: guest_http_uri_locale ............ Passed 0.04 sec 2/3 Test #3937: guest_http_options ............... Passed 0.03 sec 3/3 Test #3932: guest_http ....................... Passed 0.34 sec 100% tests passed, 0 tests failed out of 3 - Negative control: with
core/libs/prx/libSceHttp/Export.cpp,core/libs/prx/libSceHttp/src/Options.cpp,core/libs/prx/libSceHttp/src/Options.hppreverted tomain, the new tests do not build/link without the change; restoring it makes them build and pass. - Code reading:
- core/libs/prx/libSceHttp/src/Options.cpp: Verified that sceHttpSetSendTimeOut, sceHttpSetRecvTimeOut, sceHttpSetResolveTimeOut, sceHttpSetResolveRetry, sceHttpSetRecvBlockSize, sceHttpSetResponseHeaderMaxSize, and sceHttpSetRequestContentLength check HttpInitialised() first and return ERROR_BEFORE_INIT (0x80431020) if uninitialized.
- core/libs/prx/libSceHttp/src/Options.cpp: Verified order of validation in sceHttpSetResolveRetry (retry < 0 checks before id lookup) and sceHttpSetResolveTimeOut (SDK version check >= 0x01700000u with usec <= 999999u returning ERROR_INVALID_VALUE before id lookup).
- core/libs/prx/libSceHttp/src/Options.cpp: Verified SetHttpRequestContentLength checks both ID presence and that options.request is true, returning ERROR_INVALID_ID when passed templates or connections.
- core/libs/prx/libSceHttp/Export.cpp: Verified all four request creation entry points (sceHttpCreateRequest, sceHttpCreateRequest2, sceHttpCreateRequestWithURL, sceHttpCreateRequestWithURL2) pass request=true to AddHttpChild.
- core/libs/prx/libSceHttp/src/Options.cpp: Verified thread-safety and lock scoping of g_optionsMutex across SetHttpValue, SetHttpRequestContentLength, AddHttpChild, and RemoveHttpObject.
- docs/dev/debt/changes/fix-http-setters-validate-id.md: Verified technical debt fragment correctly records unknown function info, behaviour differences, and removed stubs conforming to AGENTS.md rules.
Looks Good To Me
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
Nothing blocks this change; the points below are optional.
What I ran
Reviewed head 9fba7a84b19af3723723122569b2b60df38830ed using the prepared diff and pinned repo_read.py reader. No commands or tests were run during this review.
Results
| Check | Result | Note |
|---|---|---|
| Changed code review | passed | All six changed files read |
| Tests in this review | not run | Author-reported runs not repeated |
| Excluded files | not applicable | manifest.json lists no excluded changed files |
Findings
Blocking
None.
Non-blocking
None.
Not verified
No runtime checks were performed. The author reports 20/20 guest HTTP tests and convention checks passing; those results were not independently run. Console behavior and the PS5 firmware behavior inferred from shadPS4 were not verified. files.json was not available through the reader; exclusion status was checked in manifest.json.
Files read: description.md, commits.md, manifest.json, diff.patch; Export.cpp, Options.cpp, Options.hpp, GuestHttp.cpp, GuestHttpOptions.cpp, and fix-http-setters-validate-id.md. All six changed files were listed as included in manifest.json and read. No files were listed as excluded.
To get this to a good state
Nothing is required. The PS5 behavior inference and lack of console measurements are documented limitations.
|
Linux run (the Tested section lists Windows only). Setup: Fedora 44, kernel 7.3.4, GCC 16.2.1, glibc from F44, Release. Head Result: 43 tests matching the files this PR changes: all passed on the merge (43/43). The same pattern on AI-assisted: yes |
|
Tested
AI-assisted: yes (Claude Code); the runs are automated, this summary was written from their reports. |
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
Nothing blocks this change; the points below are optional.
What I ran
Reviewed head 81b4bc374f321fb0f2cc50861e84918de923ddd6 from the prepared diff and targeted source reads. No tests or builds were run; repo_read.py was not invoked directly because this review interface provides pinned-head reader tools.
Results
| Check | Result | Note |
|---|---|---|
| Diff and targeted source review | passed | Six changed files read |
| Tests and build | not run | Author-reported results only |
| Review-bundle exclusions | not applicable | files.json was not available in the bundle |
Findings
Blocking
None.
Non-blocking
- The new timeout and size values are stored, but the debt note says no code currently reads them and their defaults are unmeasured. The description accurately identifies these limits; consider tracking behavioral use and validation separately. See
core/libs/prx/libSceHttp/src/Options.cpp:197. - The resolve-timeout and retry validation order and thresholds are inferred from shadPS4 rather than measured on PS5 firmware, as the description and debt note disclose. See
core/libs/prx/libSceHttp/src/Options.cpp:207.
Not verified
No tests, build, console behavior, or firmware disassembly were verified in this review. The bundle included the full text of all six changed files, and all six were read: core/libs/prx/libSceHttp/Export.cpp, core/libs/prx/libSceHttp/src/Options.cpp, core/libs/prx/libSceHttp/src/Options.hpp, core/libs/tests/GuestHttp.cpp, core/libs/tests/GuestHttpOptions.cpp, and docs/dev/debt/changes/fix-http-setters-validate-id.md. files.json was unavailable, so the reviewed-file list could not be compared with a separate reviewed manifest.
To get this to a good state
Nothing is required. The optional follow-up is to measure or confirm the inferred PS5 behavior and connect stored options to behavior when HTTP requests are implemented.
ligmaSec
left a comment
There was a problem hiding this comment.
Built the changed HTTP units and ran the branch's GuestHttp and GuestHttpOptions fixtures against the existing Linux runtime. Both passed. I checked that the seven setters accept live handles of the supported kinds and route invalid IDs through the shared validation path.
AI-assisted: yes.
What
sceHttpSetSendTimeOut,sceHttpSetRecvTimeOut,sceHttpSetResolveTimeOut,sceHttpSetResolveRetry,sceHttpSetRecvBlockSize,sceHttpSetResponseHeaderMaxSizeandsceHttpSetRequestContentLengthreturned 0 for any id, beforesceHttpInittoo, and kept nothing. They now live incore/libs/prx/libSceHttp/src/Options.cpp:184-219next to the other option setters and:ERROR_BEFORE_INITuntilsceHttpInit;ERROR_INVALID_IDfor an unknown or deleted id;HttpOptions(new fields inOptions.hpp), copied from the parent as the existing options are;sceHttpSetRequestContentLengthtakes only a request (newHttpOptions::request, set by the foursceHttpCreateRequest*calls) and refuses a template or connection withERROR_INVALID_ID;sceHttpSetResolveRetryrefuses a negative count andsceHttpSetResolveTimeOutrefuses 999999 us or less when the title was built with SDK 1.70 or later, both withERROR_INVALID_VALUEbefore the id check.Evidence and limits (also in the debt fragment). The firmware 13.42 disassembly in
docs/dev/debt/libSceHttp.mdis recorded only forsceHttpSetHttp09Enabled,sceHttpSetPriorityOptionandsceHttpSetPolicyOption("checks initialisation, then stores each value through one option setter that refuses an unknown id"); I did not disassemble these seven, so I apply the same order to them as an inference. Which kinds each takes and the two value checks come from shadPS4src/core/libraries/network/http.cppat 264d6b71d8 (sceHttpSetSendTimeOut3017,sceHttpSetRecvTimeOut3034,sceHttpSetResolveTimeOut2665,sceHttpSetResolveRetry2978,sceHttpSetRecvBlockSize2186,sceHttpSetResponseHeaderMaxSize2689,sceHttpSetRequestContentLength2913): PS4, not measured on a PS5. No merged PR or issue measures these calls on a console. shadPS4's busy error for a request already sent is not modelled (no request is ever sent), and the content length given tosceHttpCreateRequest*is still ignored. Defaults (0) are unmeasured. shadPS4 code was not copied.The debt fragment
docs/dev/debt/changes/fix-http-setters-validate-id.mdremoves the seven from the Silent stubs entries (rewriting thesceHttpSetResponseHeaderMaxSize/sceHttpSetRecvBlockSizeone, dropping the send/receive/content-length, resolve-retry and resolve-timeout ones), notes thatsceHttpSetConnectTimeOutstill does not check its id, and adds one entry with the above.Tested
Windows 11, WinLibs GCC 15.2, Release,
-DBUILD_TESTING=ON; offline guest tests only, no title or console.core/libs/tests/GuestHttpOptions.cpp: newCheckStoredLimits(line 284) covers, for a template, connection and request, every setter's success and stored value (including 0 and values above 2^31 and 2^32),BEFORE_INITbeforesceHttpInit(CheckOfflineSettersBeforeInit), unknown, context and deleted ids, content length refused on a template and connection and not kept, the negative retry, the sub-second resolve timeout at SDK 1.70 and the same value accepted at SDK 1.6FFFFF, and the value check coming before the id check.core/libs/tests/GuestHttp.cpp: the two calls that expected 0 after the lastsceHttpTermnow expectBEFORE_INIT.main: withsrc/restored toupstream/mainand the tests as in this PR,ninja tests/guest_http_options_tests.exefails ("'const struct HttpOptions' has no member named 'sendTimeoutUs'") andctest -R "^guest_http$"aborts (Exit code 0xc0000409) because the stubs returned 0 aftersceHttpTerm.ctest -R "guest_http_|guest_http$" -E http2in a build of allguest_http_*_tests: 20/20 passed.py -3 tools/check_conventions.py --base upstream/main: all checks passed;py -3 tools/debt_fold.py --check: no output.AddHttpChild(id, conn_id)lines this PR changes; neither changes the seven setters.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 repository (attach them to this PR)