feat(libSceNpCppWebApi): fill audited Common/vector/model exports from bundled module #14122
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/14122"
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-31T19:45:00Z.
What
Implements the 67
libSceNpCppWebApiexports that are imported by the audited titles, currently stubbed, and not covered by any open pull request, plus the construct/destruct/setter coherence ports those accessors need (BasicPresence,BasicProfile,Binary). Behaviour is ported from thelibSceNpCppWebApimodule bundled with PPSA13197 (Stellar Bladesce_module), unwrapped and disassembled — 79 definitions in all:Common::Iteratoroperator++/operator*/operator!=over the auditedIntrusivePtrelement families andunsigned long: an iterator is a zero 32-bit tag plus the element pointer at +8;++advances by the element size (0x18 forIntrusivePtr, 8 forunsigned long),*returns the element address,!=compares the stored pointersCommon::Vectorbegin/end/size/emptyover the same families andVector<IntrusivePtr<ResponsePlayerSessionPlayer>>::copyFrom: reads and writes host-created bodies; title-provided bodies throw, as before.copyFromfollows the module — releases the old elements through the element reference count, adopts the source context when unset, copies each handle with alock inc, and returns0x80553504on allocation failureTransactionBase<Vector<Container>, ResponseHeaderBase>::operator=(two-word copy) andstart: the module's guard order — null context →0x80553503, unset context →0x80553502, then the request path, which staysSCE_NP_WEBAPI_ERROR_NOT_SIGNED_INofflineBinary::getBinary/size(+8/+0x10),BasicPresenceconstruct/destruct,set{AccountId,InContext,OnlineStatus}and the matching getters/IsSetbytes (0x10/0x18, 0x21/0x22, 0x1c/0x20)BasicProfileconstruct/destruct — the destructor releases the members in the module's order: theVector<String>at 0x90 (reference count at object+0x38), the vector at 0x70 (+0x30), theStringat 0x48, the pointer at 0x28 (+0x00) — plussetOnlineId,setIsOfficiallyVerifiedand theonlineIdIsSet/personalDetailIsSet/isOfficiallyVerifiedIsSetbytes (0x24/0x40/0xaa)Skuprice/label fields and*IsSetbytes,ProductgetId/getType/getDisplayName/getDescription/getReleaseDate/releaseDateIsSet/skusIsSet/getSkus,Container::getChildren(vector handle at 0x228, reference count at +0x30),PlayerSession::getSessionId(string at 0x10),GetPublicProfilesResponse::getProfilesandPostPlayerSessionsResponseBody::getPlayerSessions(vector handle at 0x30), andCommunicationRestrictionStatusResponse::getRestricted(byte at 0x30)The remaining unimplemented exports in the same families still throw, and the debt file now records which offsets were measured and which accessors remain unverified.
Tested
Windows 11 host, MinGW build.
ctest -R np_cpp_web_api: all 9 tests pass (guest_np_cpp_web_api_{intrusive_ptr,signed_out,offline,matchmaking,string,title_cloud_storage}plus the three alias tests). The intrusive-pointer test now constructs realBasicProfile/BasicPresenceobjects and asserts theIsSetflags and getter round-trips. No title run: the accessors are exercised through unit tests only, matching how the surrounding machinery was validated.python3 tools/check_conventions.py --base origin/mainclean;python3 tools/pr_overlap.py --branch feat-npcwa-common-fillreports no overlap with the 100 open PR heads.Checklist
main; no other open PR implements the same functions except the already-disclosed overlaps:Common::Binary::size/getBinaryalso appear in #12808 (same audited offsets) andVector<IntrusivePtr<BasicPresence>>::sizein #11631 (with its ownHostVectorSizehelper) — whichever of those lands second reconciles the duplicate helperNotImplemented_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-31T20:11:31Z.
Review: APPROVED
Reviewed — looks good
I found no blocking issue in the reviewed exports at head
12776a9e90adc5c010ec1bc8891ceef7b652c261; the Windows run’s sole failure isguest_filesystem, a separate test executable that links onlylibkernelandlibc.What I ran
Reviewed the exact PR head against base
121b2e37af75278e3d84a2f43869730030b112ed; the fresh merge preview against currentmain(59bd3b677d67cb5cfdb4a0092ffe644d27cf1a56) was clean. Environment: Linux x86_64, Python 3.11.2, GCC 12.2.0. No local build or C++ tests were run.Results
DestroyVectorBody; source inspection confirms it is astaticimplementation helper, not a public exportguest_np_cpp_web_apitest targets passedguest_filesystemfailed with exit0xc0000409Unedited hosted Windows test output
The author reports
guest_filesystempasses locally 3/3; I did not independently reproduce that result.Sources
Not verified
I did not rerun the author-reported differential/sanitizer fixtures, run Linux tests, or test the guest loader, a title, or console behavior. The source ABI audit is lexical and does not prove binary ABI compatibility.