feat(libSceNpCppWebApi): track the UserProfile, ProfanityFilter and CommunicationRestrictionStatus parameter lifecycles as the module does #11639
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/11639"
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 AlexFigas on 2026-10-27T00:47:33Z.
What
Five parameter classes returned 0 from
initializeandterminate, which were declared without parameters, and their constructors left the object untouched:UserProfile::V1::FriendsApi::ParameterToGetFriendsUserProfile::V1::PresenceApi::ParameterToGetBasicPresencesUserProfile::V1::BlocksApi::ParameterToGetBlockingUsersProfanityFilter::V2::ProfanityApi::ParameterToFilterProfanityCommunicationRestrictionStatus::V3::CommunicationRestrictionStatusApi::ParameterToGetCommunicationRestrictionStatusThey now follow the module bundled with PPSA21564 (
sce_module/libSceNpCppWebApi.prx, the library's own code), with the helpers from #11635.ParameterBaseconstructor zeroes +0, then+8 = 0ConstructParameterinitializeLibContext→0x80553503; context not found →0x80553502;+8 != 0→0x8055350f; then allocates and runsParameterBase::initializeInitializeParameter, same checks in the same orderGetFriends(0x3582b0),GetBasicPresences(0x360010)initialize(LibContext*, const char*)String::copyFromof the account ID(s); a null one gives0x80553503and undoes everythingGetBlockingUsers(0x353590)initialize(LibContext*),GetCommunicationRestrictionStatus(0x5a2f0)initialize(LibContext*, unsigned long)FilterProfanityinitialize(LibContext*, const char* locale, const char* serviceLabel, IntrusivePtr<WebApiFilterRequest>)(0x1bbcd0)0x80553503for null), then an empty filter request returns0x80553512after undoing everythingInitializeParameterWithBodyterminate(0x358460, 0x360190, 0x353670, 0x1bbff0, 0x5a3e0)+8 == 0→0x80553510; otherwise frees it,+8 = 0TerminateParameterNo argument is kept, because only a request would read one, and requests fail with
SCE_NP_WEBAPI_ERROR_NOT_SIGNED_INhere.Api.hppnow declares these members with their real parameters. The UserProfile/ProfanityFilter/CommunicationRestrictionStatus silent-stub debt entry now records what these five classes keep.Tested
On Ubuntu 24.04 under WSL2 (GCC 13.3, Release), rebased onto
main5bc84038c4,ctest --test-dir build -R np_cpp_web_apipasses all 4 tests (2 runs).guest_np_cpp_web_api_offlinegainsTestUserProfileParameterLifecycles. It runs each class throughTestParameterLifecycle:terminatereturns0x80553510beforeinitialize;initializereturns0x80553503for a null context and0x80553502for a context that is not set up;0x80553503for a null string,0x80553512for an emptyWebApiFilterRequest;initializesucceeds, a second call returns0x8055350f, andterminateworks once and again after a newinitialize.guest_np_cpp_web_api_signed_outused to callinitializeandterminatewith no arguments. Its request flows now:LibContext;terminate;The rest of each flow is unchanged.
Also run:
python3 tools/check_conventions.py --base origin/mainpasses.python3 tools/pr_overlap.py --branch feat/npcppwebapi-userprofile-parameter-lifecyclesreported two overlaps:GuestNpCppWebApiSignedOut.cppL116-117. It has merged, and this branch is rebased onto it: the flow keeps #11235'sfinishexpectation (0x80553508) and this PR'sterminate(parameter).docs/dev/debt/libSceNpCppWebApi.mdL9. It addsBasicProfileApi::ParameterToGetPublicProfileto the list this PR rewrites. #11631 lands first, so this PR declaresDepends on: #11631. Once it lands I'll rebase and keep that class in a "succeeds without storing state" sentence until it gets the same lifecycle.main.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)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-27T01:05:38Z.
Review: CHANGES_REQUESTED
The parameter lifecycle changes and declared dependency on #11636 are clear. Please also resolve the reported overlap with open #11235: the PR description says the signed-out test and debt-document changes will be rebased whichever lands second, but does not record an agreed ordering/dependency.
CONTRIBUTING.mdrequires authors of overlapping PRs to agree which goes first and declare it withDepends on. A merge-tree check confirms bothGuestNpCppWebApiSignedOut.cppanddocs/dev/debt/libSceNpCppWebApi.mdconflict with #11235 as currently submitted. Please coordinate the order and reflect it on the checklist, or update the overlap report if it no longer applies.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-27T02:07:09Z.
Review: CHANGES_REQUESTED
Supplemental integration review of exact head
b02748c024c9678be1f323ed26f6c4f0928c33c8.The previously reported #11235 ordering issue remains unresolved: the description still says whichever PR lands second will be rebased, without recording an agreed order. I also independently checked the newly disclosed overlap with #11631 using the current heads.
git merge-tree --write-tree refs/review/11631 refs/review/11639reports a content conflict indocs/dev/debt/libSceNpCppWebApi.md; #11631 + #11636 merges cleanly, so the conflict is introduced by #11639's debt edit. The #11639 description proposes retaining #11631's BasicProfile entry, but does not record a coordinated landing order or list #11631 inDepends on.Please coordinate merge order for both #11235 and #11631 with their authors and record the applicable dependencies/order in the checklist (or document that a conflict has been resolved). I am not asking anyone to close their PR.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-27T11:02:17Z.
Review: APPROVED
Reviewed exact head
46f4b0f7f8. The five lifecycle implementations follow the inspected module checks; the filter request body is validated, and failed initialization leaves the parameter uninitialized. The tests cover constructor state, invalid context/arguments, body absence, double initialization, and repeated initialize/terminate cycles. The signed-out request test also exercises the offline error path.Independent local check: built the exact offline and signed-out WebApi test targets and ran both under
qemu-x86_64 -cpu max; both exited successfully. The author reports the full focused set passing natively on WSL, and hosted Windows passed. This PR depends on #11636 and #11631. Main has advanced four commits beyond the base without changing these paths; please update the stack before merge. I found no additional defect in the reviewed lifecycle scope.