feat(libSceNpCppWebApi): cover SessionManager PlayerSessionsApi and InGameCatalog ContainerApi imports #8959
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/8959"
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 akkadbakkad89 on 2026-10-21T07:16:07Z.
What
198 more
libSceNpCppWebApiexports, all imported by PPSA20397 (Assassin's Creed Shadows, recorded in the title's relinker registry; every name recomputes to the imported NID viatools/nid_names.py):SessionManager::V1::PlayerSessionsApiverbs,ParameterTo*lifecycle, request/response model accessorsInGameCatalog::V5::ContainerApi+ its parameters and response model accessorsCommonhelpers the title binds:IntrusivePtrctors/dtor/deref/assign/copy over the new pointee types,VectorC1/D1/pushBack/empty/size/operator[],Iterator/ConstIteratordtors,Transaction/TransactionBaselifecycle,String::empty/operator==Semantics follow the file's established offline model: request entry points and transaction IO fail
SCE_NP_WEBAPI_ERROR_NOT_SIGNED_IN;hasResponsehonestly answers 0; parameter bookkeeping succeeds without keeping state.Vector::empty/size/operator[]read the host-createdVectorBody(honest for bodies ourpushBackgrows; they throw on title-provided bodies whose element layout is unknown). Response accessors, iterators,Vector::begin/end/copyFromand transactionabort/getId/operator=throw: a failed request never produces a response, and aborting or renumbering a transaction that never ran has no defined outcome. New stubs are documented in the library's debt file.Tested
Linux x86_64, GCC 13 (g++
-fsyntax-onlyclean forExport.cpp).guest_np_cpp_web_api_string(the library's existing test) extended with three cases and run against the new code — all pass:String::empty/String::operator==semantics,Vector<IntrusivePtr<...JoinableUser>>ctor+pushBack+dtor lifecycle (body refcount, element refcount increment, element deleter on release), and the offline responses (Transaction::hasResponse= 0,PlayerSessionsApi::getPlayerSessions=0x80552907).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)Overlap checked two ways:
tools/pr_overlap.py --branch feat/np-webapi-session-ingcreports no overlap, and a NID-level comparison against #8561 (UserProfile/ProfanityFilter/CommunicationRestrictionStatus) shows it covers 64 other imports of the same title — disjoint from this set. The title itself still stops at the unrelated AGC stencil-replay gate before reaching these calls; this PR is pure import-coverage work on the recorded registry.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-21T07:37:42Z.
Code review location:
core/libs/prx/libSceNpCppWebApi/Export.cpp; line 1925This mutating request currently reports success while the PR body and debt entry say offline API calls fail with
SCE_NP_WEBAPI_ERROR_NOT_SIGNED_IN. Could this return the offline error likechangePlayerSessionLeaderand the other request entry points? Returning 0 makes the caller believe the player-session properties were updated even though no request was sent.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-21T07:46:49Z.
Review: CHANGES_REQUESTED
Requesting one correction before approval:
PlayerSessionsApi::setPlayerSessionPropertiesreturns success (0) while the PR describes offline request entry points as returningSCE_NP_WEBAPI_ERROR_NOT_SIGNED_IN. Please make this mutation consistent with the other PlayerSessionsApi request methods. I left an inline note on the implementation. The open overlap with #4278 also still needs the superseded/merge-order clarification from my earlier comment.Imported from boykopovar/AnyPS5. Originally posted by akkadbakkad89 on 2026-10-21T07:55:13Z.
Fixed in 5e4ebeda —
setPlayerSessionPropertiesis a mutating request entry point, not a parameter setter; it now returnsSCE_NP_WEBAPI_ERROR_NOT_SIGNED_INlikechangePlayerSessionLeader. I also re-audited every direct*Apimember in the set — all five request verbs (sendPlayerSessionInvitations,getPlayerSessions,addPlayerSessionJoinableSpecifiedUsers,setPlayerSessionProperties,changePlayerSessionLeader) return the offline error; the remainingset*exports areParameterTo*/RequestBody*bookkeeping, not request entry points.On the overlap flag (#8264, #8561, #8843): the export sets are disjoint at the NID level — this PR's 198 imports were computed from the title's relinker registry minus everything already covered. #8561 covers the 64 UserProfile/ProfanityFilter/CommunicationRestrictionStatus imports (deliberately excluded here), #8264 covers 37 unrelated aerolib exports (none in this set), and #8843 is signature-alignment on existing stubs. The flagged collisions are textual only (same debt-file region, same Export.cpp tail) — whichever lands second rebases a few lines; no functional supersession. Happy to rebase on whichever goes first if a specific order is preferred.
Re: #4278 — I can't find an earlier comment on this PR referencing it (it resolves to a shader perf PR); if you meant another ticket, point me at it and I'll address it.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-21T08:05:04Z.
Code review location:
core/libs/prx/libSceNpCppWebApi/Export.cpp; line 1925The corrected return now matches the documented offline behavior. Could you add a direct assertion for
setPlayerSessionPropertiestoTestOfflineResponsesas well? That test currently exercisesgetPlayerSessions, so the original accidental success return would not have been caught by the regression suite.Imported from boykopovar/AnyPS5. Originally posted by akkadbakkad89 on 2026-10-21T08:16:34Z.
Done in 7b5594a5 — TestOfflineResponses now asserts setPlayerSessionProperties returns SCE_NP_WEBAPI_ERROR_NOT_SIGNED_IN alongside getPlayerSessions, so a future success-return regression on a mutating verb is caught. Also fixed the hasResponse extern (V129 -> V130PostPlayerSessionsResponseBody) which had drifted from the exported symbol. Compiled and ran locally: all 8 sub-tests pass.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-21T22:39:39Z.
Review: APPROVED
Reviewed the current head, including the latest
ParameterToGetContainerlifecycle andgetContainerchange. The earlier offline error finding is fixed, the follow-up adds a regression assertion forsetPlayerSessionProperties, and both review threads are resolved. I found no remaining blocking correctness issue in the reviewed diff.Local validation on this head:
c++ -std=c++20 -fsyntax-onlypassed forExport.cppandGuestNpCppWebApiString.cpp; I linked and ran the focused test executable, and it passed. The full CMake test configuration could not be generated in this environment because the SDL2 submodule sources are absent and the host lacks the required SDL XRandR development support. Hosted eligibility, conventions, labels, and report checks are green; the build jobs were skipped by path rules.Imported from boykopovar/AnyPS5. Originally posted by Ondra97 on 2026-10-22T04:30:58Z.
I opened #9612 to preserve aliased inputs in the existing
Common::String::appendandCommon::Vector::pushBackhelpers. Its tests add cases afterTestVectorPushBackCopiesStringContentinGuestNpCppWebApiString.cpp, where this PR also adds tests. The export changes are separate. I declared #9612 dependent on #8959 and #9015, which is already stacked on #8959, and will reconcile the test insertion in that order.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-23T05:19:18Z.
Review: CHANGES_REQUESTED
The latest implementation corrects the three issues identified in the thread: the six copy constructors now retain their source pointer, the four
Vector<IntrusivePtr<...>>operations use the0x30reference-count field, and empty-string equality matchesc_str(). I checked the exact 19-line source correction, local diff whitespace and conventions; both pass. I found no new source defect in those corrections.Two items still prevent approval:
String,Vector::pushBack, and offline responses, but do not copy one of these affectedIntrusivePtrobjects and verify both its pointer and reference count at offset0x00or0x30. Please add a focused check (coordinate its insertion with #9612's test changes) or provide an exact-head standalone regression run that proves those cases.tools/check_main_sync.py --base upstream/main --head <head>reports 6 commits ahead / 53 behind currentupstream/main(merge basef4b2f7907), though the merge is clean. CONTRIBUTING requires branches kept current. Please merge current main and rerun the focused string/API tests and conventions on the resulting head.The prior approval was on
d3e68ab, before the copy/refcount corrections, so it does not cover this head. The Windows/Linux test results from earlier heads are not presented as reruns of these latest changes.