Repository navigation
feat(libSceNpCppWebApi): track the UserProfile, ProfanityFilter and CommunicationRestrictionStatus parameter lifecycles as the module does - #11639
Conversation
MarcZX10
left a comment
There was a problem hiding this comment.
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.md requires authors of overlapping PRs to agree which goes first and declare it with Depends on. A merge-tree check confirms both GuestNpCppWebApiSignedOut.cpp and docs/dev/debt/libSceNpCppWebApi.md conflict 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.
MarcZX10
left a comment
There was a problem hiding this comment.
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/11639 reports a content conflict in docs/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 in Depends 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.
…cles as the module does
…es as the module does
…ommunicationRestrictionStatus parameter lifecycles as the module does
b02748c to
46f4b0f
Compare
|
@MarcZX10 #11235 has merged. This PR is rebased onto |
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed exact head 46f4b0f. 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.
|
Windows result for head Host: Windows 11 26300, Intel i7-12700K, WinLibs GCC 15.2.0 (x86_64-ucrt-posix-seh, r6), Release, The tree also carried the open PRs #11724, #11644, #11636, #11635, #11630, #11353, #11347, #11221, #10925, #11706, #11693, #11686, #11682, all merged cleanly, so the run is a joint one; the tests of this PR are AI-assisted: yes (Claude Code), the runs and the numbers above are from this machine. |
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
main5bc8403,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 fix(libSceNpCppWebApi): answer finish, abort and getId for never-started transactions as the module does #11235'sfinishexpectation (0x80553508) and this PR'sterminate(parameter).docs/dev/debt/libSceNpCppWebApi.mdL9. It addsBasicProfileApi::ParameterToGetPublicProfileto the list this PR rewrites. feat(libSceNpCppWebApi): answer the singular public profile request offline #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)