feat(libSceNpCppWebApi): answer the singular public profile request offline #11631
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/11631"
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 nicolasabosch on 2026-10-27T00:06:35Z.
What
Adds the singular public profile request of
UserProfile2V1next to the plural one already inmain, plus theCommoninstantiations around it:BasicProfileApi::getPublicProfile,TransactionBase<IntrusivePtr<GetPublicProfileResponse>>::startandTransaction<...>::getResponsefailSCE_NP_WEBAPI_ERROR_NOT_SIGNED_IN, like every other offline request entry point.BasicProfileApi::ParameterToGetPublicProfile{ctor,dtor,initialize,terminate}, the constructor and destructor ofTransaction<IntrusivePtr<GetPublicProfileResponse>>andTransactionBase<IntrusivePtr<GetPublicProfilesResponse>>::setResponseInformationOptionsucceed without keeping state, as their siblings do; they are listed under Silent stubs.IntrusivePtrhelpers:GetPublicProfileResponsector, dtor andoperator->;PersonalDetailctor;Avataroperator->;Vector<IntrusivePtr<Avatar>>dtor (reference count at 0x30) andoperator*;Vector<IntrusivePtr<BasicProfile>>operator*;operator boolofIntrusivePtr<BasicProfile>andIntrusivePtr<BasicPresence>.Vector<IntrusivePtr<BasicProfile>>::sizeandVector<IntrusivePtr<BasicPresence>>::size(the latter threw before) read host-created bodies and throw on title-provided ones, like the otherVector::sizeinstantiations. The debt entry that listed theBasicPresencevector members as throwing is cut accordingly.Tested
Windows 11, WinLibs GCC 15.2.0 r7, Release with
BUILD_TESTING=ON:guest_np_cpp_web_api_intrusive_ptr(extended with the new constructors, accessors, destructors, the singular request flow,operator boolandsizeon empty and host-created vectors),guest_np_cpp_web_api_offline,guest_np_cpp_web_api_signed_out,guest_np_cpp_web_api_stringand the 65public_headerstests pass.tools/check_conventions.py --base origin/mainpasses. Not tested with a title.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)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-27T00:12:57Z.
Review: APPROVED
Reviewed exact head
ecb225f179913f03aa18177d06ea192418ff2216. The singular request follows the existing offlineNOT_SIGNED_INbehavior; the response transaction, intrusive-pointer lifetime helpers, and host-created vector size paths are consistent with neighboring implementations. The vector size declarations usestd::size_t, and the focused test covers empty, host-created and title-provided vector bodies plus request lifecycle. The documented limitation that title-provided vector layouts remain unsupported is accurately retained. Hosted eligibility, conventions, intake, labels and report checks pass; product/relinker suites were skipped by path policy. The PR reports its Windows Release focused suites and public-header tests; I did not rerun them locally.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-27T00:24:19Z.
Review: CHANGES_REQUESTED
The new
BasicPresencevector test asserts thatsize()throws for a title-provided body with an unknown layout. That exception currently represents an unsupported layout, not an invalid input; pinning it will make the regression test fail once that layout is implemented. Please remove this assertion and retain the empty-vector and host-created-vector checks. The production refusal and debt entry can remain until the layout is supported.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-28T22:04:41Z.
Review: CHANGES_REQUESTED
Reviewing exact head
531ba12fef0b77eca827f80f043ec17a4588389c.What I ran
Results
Findings
Blocking
Export.cpp(// UserProfile2V1 singular public profile request...and its divider). The repository's AGENTS.md and conventions prohibit code comments except namespace endings and#endif. Please remove the comment; the exported symbol names already make the section clear.Non-blocking
BasicPresence::Vector::size()must throw on a title-provided body; that behavior is an unsupported layout, not a stable contract. The singular request path returns the same not-signed-in error used by the neighboring offline request, and the new intrusive-pointer/vector coverage follows existing host-created-body helpers.Sources
Not verified
To get this to a good state
Remove the added section comment, then request a re-review.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-28T22:25:27Z.
Review: CHANGES_REQUESTED
I re-reviewed exact head
51f9bdb214d5a491572582a598972c3598aa01ca. The new commit removes the prohibited section comment, and the earlier unstable test assertion thatBasicPresence::Vector::size()must throw on title-provided storage is gone. The singular offline request, response transaction helpers, pointer lifetimes, and host-created vector-size paths remain consistent with neighboring implementations. The author reports the Windows Release focused suites and public-header tests passing on the preceding tree; hosted eligibility, conventions, labels, and report pass on this head, while Windows is still running and Linux/product jobs are skipped. I did not run a local build.One repository integration item remains: the current overlap report identifies #9612 in the same
GuestNpCppWebApiIntrusivePtr.cpptest insertion area, and #9612 is still open. This PR saysDepends on: none; I found no agreed landing order in either thread. Please coordinate which test change lands first, record the agreed order in the relevant checklists, and retain both test blocks after rebasing. I cannot approve until that overlap rule is resolved.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-28T23:56:37Z.
Review: CHANGES_REQUESTED
Re-checked — changes requested for current-main integration
The earlier test assertion and code-comment concerns are addressed, and the proposed order before #9612 is reasonable; the remaining issue is that this head has not been tested against current
main.What I ran
51f9bdb214d5a491572582a598972c3598aa01ca; currentmainis3a2b91981651569163768854a1fcdc7193b6667b.git merge-tree --write-tree upstream/main upstream/pr-11631— clean preview, tree184e0ef84c3d7a1f33b1b7affdfc7c64cfccf36c.git diff --check upstream/main...upstream/pr-11631— passed.python3 tools/check_conventions.py --base upstream/main --head upstream/pr-11631— passed.np_cpp_web_apitests, and conventions pass on this head.Results
Findings
The unsupported
BasicPresencesize assertion is removed, and the code-comment issue is resolved. The proposed sequence for the test insertion overlap is acceptable: #11631 can land first, then #9612 can rebase while retaining both test blocks. Since this PR does not depend on #9612's implementation,Depends on: noneis appropriate unless #9612's author requests the reverse order.The branch's merge base is
74acfad65b3f0fd4eab653f3a3989d298fba1157, and currentmainhas since changed the sameExport.cpp,Api.hpp, and technical-debt files touched here.CONTRIBUTING.mdrequires branches to stay current. Please rebase onto3a2b91981651569163768854a1fcdc7193b6667b, preserve the current upstream changes and this PR's tests, then rerun the fournp_cpp_web_apitests and conventions on the updated tree.Sources
Not verified
I did not run a local C++ build, the four focused tests, Windows/macOS tests, or console behavior. The focused test result above is attributed to the author.
To get this to a good state
Rebase onto current
main, keep the overlap order documented, rerun the focused tests and conventions, and attach the exact updated head and output.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-29T03:04:04Z.
Review: APPROVED
Re-checked — approved
The current head resolves the remaining review items. The branch incorporates current
main, the unstable title-provided-vector assertion and prohibited section comment are gone, and the author reports the focused API suite passing on the merged tree. I approve commit6cd336ce1644206ef17d44b2c94d45a08f0f34e5.What I ran
mainto the exact PR head.python3 tools/check_conventions.py --base upstream/main --head HEAD.git diff --check upstream/main...HEAD.git merge-tree --write-tree upstream/main HEAD.Results
184e0ef84c3d7a1f33b1b7affdfc7c64cfccf36cintrusive_ptr,string,signed_out,offline, and conventions passThe new offline request returns
SCE_NP_WEBAPI_ERROR_NOT_SIGNED_IN, matching neighboring request paths. Pointer destruction and accessors follow the established intrusive-pointer helpers. The two vectorsize()exports use the existing host-created-body validation path. The unstable expectation that an unsupported title-provided vector layout must throw has been removed.Negative control
Not applicable to these offline API and lifecycle additions. The focused tests exercise signed-out errors, lifecycle return codes, empty and host-created vectors, and pointer lifetime behavior.
Findings
Blocking
None found on this head.
Non-blocking
Depends on: #11631, and committed to retaining both test blocks after rebasing. This satisfies the repository’s overlap-order rule.Sources
All code links point to the reviewed commit
6cd336ce1644206ef17d44b2c94d45a08f0f34e5.Not verified
To get to a good state
No further changes are required for the findings in this review.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-31T17:20:43Z.
Review: APPROVED
Re-checked — new head, looks good
The merge-updated head preserves the reviewed implementation, and the exact-head no-build checks plus applicable hosted build and tests show no blocking issue.
What I ran
Reviewed head
024912b6c16617bec1e52b471340b170e8378f61against base474030e58424fefdb65e5df9f3820810fbb4553c; its merge preview was clean. Local environment: Debian Linux x86_64, Python 3.11.2, GCC 12.2.0. I did not build or compile locally. GitHub's Windows job built the changed test targets and ran CTest on the exact head.Results
DestroyVectorBodyhelper; no changed export mismatch was reportedUnedited local check output
Unedited relevant hosted CTest output
Findings
Blocking
None found on this head.
Non-blocking
None.
Sources
Not verified