feat(libSceNpCppWebApi): track the TitleCloudStorage and InGameCatalog parameter lifecycles as the module does #11252

Merged
AlexFigas merged 1 commit from upstream-pr/11252 into main 2026-10-26 12:03:00 +00:00
AlexFigas commented 2026-10-25 22:41:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by AlexFigas on 2026-10-25T22:41:31Z.


What

Several parameter exports threw:

  • TitleCloudStorage::V1::DataApi::ParameterToGetMultiDataStatusesByUser: constructor, initialize, setfields, terminate and destructor.
  • DataApi::ParameterToDownloadData::setobjectId.
  • InGameCatalog::V5::ContainerApi::ParameterToGetContainer: constructor, isInitialized and setserviceLabel.

The rest of these three classes succeeded without state, so isInitialized could 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}:

Member Module Here
constructor (0xc8360, 0x2fb8e0) ParameterBase constructor zeroes +0, then +8 = 0 zeroes +0 and +8
initialize (0xc83c0, 0x2fb940, 0x2f6f40) null LibContext → 0x80553503; context not found → 0x80553502; +8 != 0 → 0x8055350f; allocates the implementation (OOM → 0x80553504), then String::copyFrom of each string argument, which returns 0x80553503 for null and undoes the initialize same checks in the same order. A LibContext counts as not found when its value is 0, which is what Common::terminate leaves and Common::initialize replaces. +8 holds a marker instead of an allocation
isInitialized (0xc85a0) [rdi + 8] != 0 same
setfields, setobjectId, setcontainerIds (0x2fbce0, 0x2f72a0, 0xc85d0) +8 == 0 → 0x80553502; otherwise String::copyFrom, 0x80553503 for null same codes; the string is not kept
setserviceLabel (0xc88a0), like setsort/setoffset/setlimit stores the value only when +8 != 0, no result stores nothing
terminate (0xc8530, 0x2fbc00) +8 == 0 → 0x80553510; otherwise frees it, +8 = 0, returns 0 same
destructor jmp ParameterBase::~ParameterBase, a bare ret does nothing

No value is kept, because only a request would read one, and requests fail with SCE_NP_WEBAPI_ERROR_NOT_SIGNED_IN here. 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_api passes all 4 tests. guest_np_cpp_web_api_offline gains TestParameterLifecycles, which runs each of the three classes through the same sequence:

  • the constructor zeroes exactly 0x10 bytes;
  • a setter returns 0x80553502 and terminate returns 0x80553510 before initialize;
  • initialize returns 0x80553503 for a null context and 0x80553502 for a context Common::initialize has not set;
  • initialize returns 0x80553503 for a null string argument and leaves the parameter uninitialized;
  • initialize then succeeds, and a second call returns 0x8055350f;
  • a setter returns 0x80553503 for null and 0 otherwise;
  • terminate succeeds once, then returns 0x80553510;
  • the parameter can be initialized again;
  • isInitialized tracks every step for ParameterToGetContainer.

Also run:

  • python3 tools/check_conventions.py --base origin/main passes.
  • python3 tools/pr_overlap.py --branch feat/npcppwebapi-parameter-lifecycle reports no overlap.
  • git merge-tree against #9612, #10925, #11221, #11235, #11248, #10832 and #9015 merges cleanly.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5009442270 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11252). Originally posted by [AlexFigas](https://github.com/AlexFigas) on 2026-10-25T22:41:31Z. --- ### What Several parameter exports threw: - `TitleCloudStorage::V1::DataApi::ParameterToGetMultiDataStatusesByUser`: constructor, `initialize`, `setfields`, `terminate` and destructor. - `DataApi::ParameterToDownloadData::setobjectId`. - `InGameCatalog::V5::ContainerApi::ParameterToGetContainer`: constructor, `isInitialized` and `setserviceLabel`. The rest of these three classes succeeded without state, so `isInitialized` could 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}`: | Member | Module | Here | |---|---|---| | constructor (0xc8360, 0x2fb8e0) | `ParameterBase` constructor zeroes +0, then `+8 = 0` | zeroes +0 and +8 | | `initialize` (0xc83c0, 0x2fb940, 0x2f6f40) | null `LibContext` → `0x80553503`; context not found → `0x80553502`; `+8 != 0` → `0x8055350f`; allocates the implementation (OOM → `0x80553504`), then `String::copyFrom` of each string argument, which returns `0x80553503` for null and undoes the `initialize` | same checks in the same order. A `LibContext` counts as not found when its value is 0, which is what `Common::terminate` leaves and `Common::initialize` replaces. `+8` holds a marker instead of an allocation | | `isInitialized` (0xc85a0) | `[rdi + 8] != 0` | same | | `setfields`, `setobjectId`, `setcontainerIds` (0x2fbce0, 0x2f72a0, 0xc85d0) | `+8 == 0` → `0x80553502`; otherwise `String::copyFrom`, `0x80553503` for null | same codes; the string is not kept | | `setserviceLabel` (0xc88a0), like `setsort`/`setoffset`/`setlimit` | stores the value only when `+8 != 0`, no result | stores nothing | | `terminate` (0xc8530, 0x2fbc00) | `+8 == 0` → `0x80553510`; otherwise frees it, `+8 = 0`, returns 0 | same | | destructor | `jmp ParameterBase::~ParameterBase`, a bare `ret` | does nothing | No value is kept, because only a request would read one, and requests fail with `SCE_NP_WEBAPI_ERROR_NOT_SIGNED_IN` here. The TitleCloudStorage entry under Silent stubs now says this for all three classes. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> On Ubuntu 24.04 under WSL2 (GCC 13.3, Release), `ctest --test-dir build -R np_cpp_web_api` passes all 4 tests. `guest_np_cpp_web_api_offline` gains `TestParameterLifecycles`, which runs each of the three classes through the same sequence: - the constructor zeroes exactly 0x10 bytes; - a setter returns `0x80553502` and `terminate` returns `0x80553510` before `initialize`; - `initialize` returns `0x80553503` for a null context and `0x80553502` for a context `Common::initialize` has not set; - `initialize` returns `0x80553503` for a null string argument and leaves the parameter uninitialized; - `initialize` then succeeds, and a second call returns `0x8055350f`; - a setter returns `0x80553503` for null and 0 otherwise; - `terminate` succeeds once, then returns `0x80553510`; - the parameter can be initialized again; - `isInitialized` tracks every step for `ParameterToGetContainer`. Also run: - `python3 tools/check_conventions.py --base origin/main` passes. - `python3 tools/pr_overlap.py --branch feat/npcppwebapi-parameter-lifecycle` reports no overlap. - `git merge-tree` against #9612, #10925, #11221, #11235, #11248, #10832 and #9015 merges cleanly. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
MarcZX10 commented 2026-10-25 22:46:07 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-25T22:46:07Z.

Review: APPROVED


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.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5645737296 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/11252#pullrequestreview-5645737296). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-25T22:46:07Z. **Review:** APPROVED --- 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.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!11252
No description provided.