feat(libSceNpCppWebApi): answer the UserProfile, ProfanityFilter and CommunicationRestrictionStatus requests offline #8561

Merged
DProkos merged 3 commits from upstream-pr/8561 into main 2026-10-23 01:06:01 +00:00
DProkos commented 2026-10-20 16:41:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by DProkos on 2026-10-20T16:41:48Z.


What

Dying Light: The Beast (PPSA24003) ships no libSceNpCppWebApi.prx, and its Epic Online Services module imports 106 exports that the library does not have, so the loader stops at start-up. This adds them, following the offline rules the library already uses (#6901):

  • The five API calls (FriendsApi::getFriends, PresenceApi::getBasicPresences, BlocksApi::getBlockingUsers, ProfanityApi::filterProfanity, CommunicationRestrictionStatusApi::getCommunicationRestrictionStatus), WebApiFilterRequestFactory::create and the transactions' start/getResponseHeaders return SCE_NP_WEBAPI_ERROR_NOT_SIGNED_IN.
  • Parameter objects ({ctor,dtor,initialize,terminate}), Transaction construction and destruction, setOnFinishedCallback, setResponseInformationOption and finish succeed without keeping state. They are listed under Silent stubs.
  • The IntrusivePtr members over WebApiFilterRequest, ResponseHeaderBase, String and Vector<IntrusivePtr<BasicPresence>> use the existing CopyIntrusivePtr/ReleaseIntrusivePtr helpers with the documented reference-count offsets (0x00, 0x30 for Vector); operator->, operator* and get return the pointee.
  • Response accessors, ResponseHeaderBase::getHeaderValue and the Vector/Iterator members over IntrusivePtr<BasicPresence> and unsigned long throw: a failed request never produces a response.

Every added name recomputes to the NID the title imports (checked for all 106). None of them is in main, #8264 or #8088.

Tested

Windows 11 Pro 26200, WinLibs GCC 15.2.0 r7 UCRT, Ninja, Release, BUILD_TESTING=ON, on main 587bb343e.

  • guest_np_cpp_web_api_intrusive_ptr (extended with the 22 new IntrusivePtr members), the new guest_np_cpp_web_api_signed_out (the request flow of all five APIs and the factory) and guest_np_cpp_web_api_string: 3/3 passed.
  • PPSA24003 (01.007.001, own dump), AMD Radeon RX 7900 XTX (32.0.31041.1004): on main it stops at start-up on 106 unresolved libSceNpCppWebApi.prx imports. With this change it reaches the title screen at 59.9 FPS and ran 140 s and 180 s without an error (two runs, no input). Bring-up: #8560.
  • tools/check_conventions.py --base upstream/main passes. tools/pr_overlap.py reports no shared exports; #8264 and #7780 touch nearby lines of core/libs/CMakeLists.txt, and #8264 the same test arrays and debt file.

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: PPSA24003 #8560
  • GPUs tested: n/a
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4939127866 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8561). Originally posted by [DProkos](https://github.com/DProkos) on 2026-10-20T16:41:48Z. --- ### What Dying Light: The Beast (PPSA24003) ships no `libSceNpCppWebApi.prx`, and its Epic Online Services module imports 106 exports that the library does not have, so the loader stops at start-up. This adds them, following the offline rules the library already uses (#6901): - The five API calls (`FriendsApi::getFriends`, `PresenceApi::getBasicPresences`, `BlocksApi::getBlockingUsers`, `ProfanityApi::filterProfanity`, `CommunicationRestrictionStatusApi::getCommunicationRestrictionStatus`), `WebApiFilterRequestFactory::create` and the transactions' `start`/`getResponseHeaders` return `SCE_NP_WEBAPI_ERROR_NOT_SIGNED_IN`. - Parameter objects (`{ctor,dtor,initialize,terminate}`), `Transaction` construction and destruction, `setOnFinishedCallback`, `setResponseInformationOption` and `finish` succeed without keeping state. They are listed under Silent stubs. - The `IntrusivePtr` members over `WebApiFilterRequest`, `ResponseHeaderBase`, `String` and `Vector<IntrusivePtr<BasicPresence>>` use the existing `CopyIntrusivePtr`/`ReleaseIntrusivePtr` helpers with the documented reference-count offsets (0x00, 0x30 for `Vector`); `operator->`, `operator*` and `get` return the pointee. - Response accessors, `ResponseHeaderBase::getHeaderValue` and the `Vector`/`Iterator` members over `IntrusivePtr<BasicPresence>` and `unsigned long` throw: a failed request never produces a response. Every added name recomputes to the NID the title imports (checked for all 106). None of them is in `main`, #8264 or #8088. ### Tested Windows 11 Pro 26200, WinLibs GCC 15.2.0 r7 UCRT, Ninja, Release, `BUILD_TESTING=ON`, on `main` `587bb343e`. - `guest_np_cpp_web_api_intrusive_ptr` (extended with the 22 new `IntrusivePtr` members), the new `guest_np_cpp_web_api_signed_out` (the request flow of all five APIs and the factory) and `guest_np_cpp_web_api_string`: 3/3 passed. - PPSA24003 (01.007.001, own dump), AMD Radeon RX 7900 XTX (32.0.31041.1004): on `main` it stops at start-up on 106 unresolved `libSceNpCppWebApi.prx` imports. With this change it reaches the title screen at 59.9 FPS and ran 140 s and 180 s without an error (two runs, no input). Bring-up: #8560. - `tools/check_conventions.py --base upstream/main` passes. `tools/pr_overlap.py` reports no shared exports; #8264 and #7780 touch nearby lines of `core/libs/CMakeLists.txt`, and #8264 the same test arrays and debt file. ### Checklist - [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: PPSA24003 #8560 - [x] GPUs tested: n/a - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
nikowolf123 commented 2026-10-20 19:05:05 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by nikowolf123 on 2026-10-20T19:05:05Z.


Two inaccuracies in docs/dev/debt/libSceNpCppWebApi.md:

Line 5 says the finish overrides of TransactionBase<...> (15 instantiations) return success without doing work. Export.cpp at this head has 15 such overrides, but only 13 of them return 0: the 8 already on main and the 5 added here at L2044, L2056, L2068, L2080 and L2092. The InGameCatalog::V5 and TitleCloudStorage::V1 overrides at L1610 and L1620 call NotImplemented_nid_no_patch(__func__), and line 19 of the same file lists them among the exports that throw. That is also why main says 8 even though it has 10 overrides.

The PR description says Transaction construction and destruction are listed under Silent stubs, but neither Silent stubs bullet names them. The 10 constructors and destructors at L1928-L1992 only return 0; and leave the object untouched. CONTRIBUTING.md puts silent stubs under Silent stubs, and the review of #6901 asked for constructors and destructors that succeed without storing state to be listed there.

Suggested fix: on line 5, change (15 instantiations) to (13 instantiations), and after the setResponseInformationOption sentence add:

The constructors and destructors of the same five `Transaction<...>` instantiations succeed without keeping state
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6298914582 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8561#issuecomment-6298914582). Originally posted by [nikowolf123](https://github.com/nikowolf123) on 2026-10-20T19:05:05Z. --- Two inaccuracies in `docs/dev/debt/libSceNpCppWebApi.md`: [Line 5](https://github.com/boykopovar/AnyPS5/blob/d310c4e27e16a7d91f9c95e15d4f8b39087bd50c/docs/dev/debt/libSceNpCppWebApi.md#L5) says the `finish` overrides of `TransactionBase<...>` (15 instantiations) return success without doing work. `Export.cpp` at this head has 15 such overrides, but only 13 of them return 0: the 8 already on `main` and the 5 added here at [L2044](https://github.com/boykopovar/AnyPS5/blob/d310c4e27e16a7d91f9c95e15d4f8b39087bd50c/core/libs/prx/libSceNpCppWebApi/Export.cpp#L2044), L2056, L2068, L2080 and L2092. The `InGameCatalog::V5` and `TitleCloudStorage::V1` overrides at [L1610](https://github.com/boykopovar/AnyPS5/blob/d310c4e27e16a7d91f9c95e15d4f8b39087bd50c/core/libs/prx/libSceNpCppWebApi/Export.cpp#L1610) and [L1620](https://github.com/boykopovar/AnyPS5/blob/d310c4e27e16a7d91f9c95e15d4f8b39087bd50c/core/libs/prx/libSceNpCppWebApi/Export.cpp#L1620) call `NotImplemented_nid_no_patch(__func__)`, and [line 19](https://github.com/boykopovar/AnyPS5/blob/d310c4e27e16a7d91f9c95e15d4f8b39087bd50c/docs/dev/debt/libSceNpCppWebApi.md#L19) of the same file lists them among the exports that throw. That is also why `main` says 8 even though it has 10 overrides. The PR description says `Transaction` construction and destruction are listed under Silent stubs, but neither Silent stubs bullet names them. The 10 constructors and destructors at [L1928-L1992](https://github.com/boykopovar/AnyPS5/blob/d310c4e27e16a7d91f9c95e15d4f8b39087bd50c/core/libs/prx/libSceNpCppWebApi/Export.cpp#L1928-L1992) only `return 0;` and leave the object untouched. [CONTRIBUTING.md](https://github.com/boykopovar/AnyPS5/blob/d310c4e27e16a7d91f9c95e15d4f8b39087bd50c/CONTRIBUTING.md#L8) puts silent stubs under Silent stubs, and the [review of #6901](https://github.com/boykopovar/AnyPS5/pull/6901#pullrequestreview-5570468886) asked for constructors and destructors that succeed without storing state to be listed there. Suggested fix: on line 5, change `(15 instantiations)` to `(13 instantiations)`, and after the `setResponseInformationOption` sentence add: ``` The constructors and destructors of the same five `Transaction<...>` instantiations succeed without keeping state ```
oneandonlydean commented 2026-10-21 03:35:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-21T03:35:46Z.


@DProkos thanks, the exports and tests look right. Three changes to docs/dev/debt/libSceNpCppWebApi.md before merge:

  1. The first Silent stubs bullet says the finish overrides of TransactionBase<...> have 15 instantiations that return success. The head has 15 overrides, but only 13 return 0: the 8 on main and your 5. The InGameCatalog::V5 and TitleCloudStorage::V1 ones throw and are already listed under exports that throw. Please change it to 13, as nikowolf123 pointed out.
  2. The constructors and destructors of the five new Transaction<...> instantiations return 0 without touching the object, so they belong under Silent stubs too, for example after the setResponseInformationOption sentence: "The constructors and destructors of the same five Transaction<...> instantiations succeed without keeping state".
  3. The new Unknown function info entry names a title ID. The debt docs must not name titles or title IDs (the bring-up discussion is the place for that). Please describe the importer generically, e.g. "imported by an Epic Online Services module whose dump ships no libSceNpCppWebApi.prx".
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6307398890 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8561#issuecomment-6307398890). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-21T03:35:46Z. --- @DProkos thanks, the exports and tests look right. Three changes to `docs/dev/debt/libSceNpCppWebApi.md` before merge: 1. The first Silent stubs bullet says the `finish` overrides of `TransactionBase<...>` have 15 instantiations that return success. The head has 15 overrides, but only 13 return 0: the 8 on `main` and your 5. The `InGameCatalog::V5` and `TitleCloudStorage::V1` ones throw and are already listed under exports that throw. Please change it to 13, as nikowolf123 pointed out. 2. The constructors and destructors of the five new `Transaction<...>` instantiations return 0 without touching the object, so they belong under Silent stubs too, for example after the `setResponseInformationOption` sentence: "The constructors and destructors of the same five `Transaction<...>` instantiations succeed without keeping state". 3. The new Unknown function info entry names a title ID. The debt docs must not name titles or title IDs (the bring-up discussion is the place for that). Please describe the importer generically, e.g. "imported by an Epic Online Services module whose dump ships no `libSceNpCppWebApi.prx`".
DProkos commented 2026-10-21 06:35:14 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by DProkos on 2026-10-21T06:35:14Z.


@oneandonlydean thanks, all three are in c12ca91ed:

  1. TransactionBase<...>::finish now reads 13 instantiations: the 8 on main and the 5 added here return 0; the InGameCatalog::V5 and TitleCloudStorage::V1 ones throw and stay under the exports that throw.
  2. Added to Silent stubs: "The constructors and destructors of the same five Transaction<...> instantiations succeed without keeping state".
  3. The Unknown function info entry no longer names a title: "imported by an Epic Online Services module whose dump ships no libSceNpCppWebApi.prx".

tools/check_conventions.py --base upstream/main passes.

🤖 Addressed by Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6309713533 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8561#issuecomment-6309713533). Originally posted by [DProkos](https://github.com/DProkos) on 2026-10-21T06:35:14Z. --- @oneandonlydean thanks, all three are in c12ca91ed: 1. `TransactionBase<...>::finish` now reads 13 instantiations: the 8 on `main` and the 5 added here return 0; the `InGameCatalog::V5` and `TitleCloudStorage::V1` ones throw and stay under the exports that throw. 2. Added to Silent stubs: "The constructors and destructors of the same five `Transaction<...>` instantiations succeed without keeping state". 3. The Unknown function info entry no longer names a title: "imported by an Epic Online Services module whose dump ships no `libSceNpCppWebApi.prx`". `tools/check_conventions.py --base upstream/main` passes. _🤖 Addressed by [Claude Code](https://claude.com/claude-code)_
oneandonlydean commented 2026-10-21 06:45:20 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-21T06:45:20Z.


@DProkos thanks, all three read as described. A quick check of c12ca91ed is next, then full CI.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6309860946 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/8561#issuecomment-6309860946). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-21T06:45:20Z. --- @DProkos thanks, all three read as described. A quick check of `c12ca91ed` is next, then full CI.
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!8561
No description provided.