Repository navigation
feat(libSceNpCppWebApi): track the TitleCloudStorage and InGameCatalog parameter lifecycles as the module does - #11252
Conversation
…g parameter lifecycles as the module does
Progress report (b90d009 → fcf9754)📈 System libraries: 50.16% (+0.07%, +9 implemented functions) ✅ 9 implemented
⚪ 2 behaviourally empty (constant return or throw)
Changed libraries (implemented exports)
|
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed exact head fcf9754a29bd24441dc7cc3fe84d9f99d6253a81 against current main b90d009d9f73354cbea239a74a8f7e2dcd138772. The lifecycle state and error ordering match the module behavior documented in the PR: construction initializes the two object slots, initialization rejects null/uninitialized contexts and duplicate initialization, setters reject uninitialized/null inputs, and termination clears the initialized slot. The no-storage limitation is recorded in the debt entry and is consistent with requests still failing as not signed in. Local diff-check and conventions pass; merge previews with #11235 and #11248 are clean. Hosted eligibility, conventions, intake, labels and report checks pass; platform product jobs are skipped. The author reports the focused Ubuntu/WSL2 np_cpp_web_api tests pass 4/4; I did not rerun them locally because this checkout has only a relinker build and full configuration is unavailable here.
|
Windows run of this head
AI-assisted: yes (Claude Code) |
What
Several parameter exports threw:
TitleCloudStorage::V1::DataApi::ParameterToGetMultiDataStatusesByUser: constructor,initialize,setfields,terminateand destructor.DataApi::ParameterToDownloadData::setobjectId.InGameCatalog::V5::ContainerApi::ParameterToGetContainer: constructor,isInitializedandsetserviceLabel.The rest of these three classes succeeded without state, so
isInitializedcould not be answered. All three now follow the module bundled with PPSA21564 (sce_module/libSceNpCppWebApi.prx, the library's own code). In the module, a parameter object is{ParameterBase implementation at +0, class implementation at +8}:ParameterBaseconstructor zeroes +0, then+8 = 0initialize(0xc83c0, 0x2fb940, 0x2f6f40)LibContext→0x80553503; context not found →0x80553502;+8 != 0→0x8055350f; allocates the implementation (OOM →0x80553504), thenString::copyFromof each string argument, which returns0x80553503for null and undoes theinitializeLibContextcounts as not found when its value is 0, which is whatCommon::terminateleaves andCommon::initializereplaces.+8holds a marker instead of an allocationisInitialized(0xc85a0)[rdi + 8] != 0setfields,setobjectId,setcontainerIds(0x2fbce0, 0x2f72a0, 0xc85d0)+8 == 0→0x80553502; otherwiseString::copyFrom,0x80553503for nullsetserviceLabel(0xc88a0), likesetsort/setoffset/setlimit+8 != 0, no resultterminate(0xc8530, 0x2fbc00)+8 == 0→0x80553510; otherwise frees it,+8 = 0, returns 0jmp ParameterBase::~ParameterBase, a bareretNo value is kept, because only a request would read one, and requests fail with
SCE_NP_WEBAPI_ERROR_NOT_SIGNED_INhere. The TitleCloudStorage entry under Silent stubs now says this for all three classes.Tested
On Ubuntu 24.04 under WSL2 (GCC 13.3, Release),
ctest --test-dir build -R np_cpp_web_apipasses all 4 tests.guest_np_cpp_web_api_offlinegainsTestParameterLifecycles, which runs each of the three classes through the same sequence:0x80553502andterminatereturns0x80553510beforeinitialize;initializereturns0x80553503for a null context and0x80553502for a contextCommon::initializehas not set;initializereturns0x80553503for a null string argument and leaves the parameter uninitialized;initializethen succeeds, and a second call returns0x8055350f;0x80553503for null and 0 otherwise;terminatesucceeds once, then returns0x80553510;isInitializedtracks every step forParameterToGetContainer.Also run:
python3 tools/check_conventions.py --base origin/mainpasses.python3 tools/pr_overlap.py --branch feat/npcppwebapi-parameter-lifecyclereports no overlap.git merge-treeagainst fix(npcppwebapi): preserve aliased inputs during growth #9612, fix(libSceNpCppWebApi): count Vector<String> and Vector<unsigned long> references where the bundled module does #10925, feat(libSceNpCppWebApi): iterate Vector<String> with begin, end and the Iterator<String> operators #11221, fix(libSceNpCppWebApi): answer finish, abort and getId for never-started transactions as the module does #11235, feat(libSceNpCppWebApi): read size and operator[] of the Sku, Container and PlayerSession vectors from host bodies #11248, feat(libSceNpCppWebApi): fail the InGameCatalog and TitleCloudStorage transactions signed out #10832 and feat(libSceNpCppWebApi): cover the UserProfile models and remaining Common instantiations #9015 merges cleanly.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)