refactor(libSceSystemService): throw the documented unknown-title rejection #14202

Closed
rooklz wants to merge 1 commit from upstream-pr/14202 into main
rooklz commented 2026-10-31 23:13:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by rooklz on 2026-10-31T23:13:34Z.


What

docs/dev/debt/libSceSystemService.md says the console's results for a title ID other than the running title are unknown, so sceSystemServiceGetAppId, sceLncUtilGetAppId and sceLncUtilIsAppLaunched throw for them. The shared RunningAppId helper in Export.cpp still did that through NotImplemented_nid_no_patch, while its sibling rejection helpers (CopyRunningTitleId, AnswerForRunningApp, ListRunningBigApp) already throw explicitly.

This replaces that marker with an explicit std::runtime_error carrying the same message. The running-title answers, the invalid-title -1 / 0x80940005 answers and the null-output checks are unchanged; calls for another title still throw.

Tested

  • cmake -S . -B build-systemservice -G Ninja -DCMAKE_BUILD_TYPE=Release -DANYPS5_RELINKER_ONLY=ON -DBUILD_TESTING=ON and cmake --build build-systemservice --parallel: rc 0.
  • ctest --test-dir build-systemservice --output-on-failure: 542/542 passed, 0 failed (119.96 s).
  • g++ -std=c++20 -fsyntax-only on core/libs/prx/libSceSystemService/Export.cpp and core/libs/tests/GuestSystemService.cpp: rc 0.
  • python3 tools/progress.py: libSceSystemService done 93 -> 96, todo 491 -> 488; libraries 8656/33237 (26.04%) -> 8659/33237 (26.05%).
  • Host-only change; no console run.

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:5102429085 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14202). Originally posted by [rooklz](https://github.com/rooklz) on 2026-10-31T23:13:34Z. --- ### What `docs/dev/debt/libSceSystemService.md` says the console's results for a title ID other than the running title are unknown, so `sceSystemServiceGetAppId`, `sceLncUtilGetAppId` and `sceLncUtilIsAppLaunched` throw for them. The shared `RunningAppId` helper in `Export.cpp` still did that through `NotImplemented_nid_no_patch`, while its sibling rejection helpers (`CopyRunningTitleId`, `AnswerForRunningApp`, `ListRunningBigApp`) already throw explicitly. This replaces that marker with an explicit `std::runtime_error` carrying the same message. The running-title answers, the invalid-title `-1` / `0x80940005` answers and the null-output checks are unchanged; calls for another title still throw. ### Tested - `cmake -S . -B build-systemservice -G Ninja -DCMAKE_BUILD_TYPE=Release -DANYPS5_RELINKER_ONLY=ON -DBUILD_TESTING=ON` and `cmake --build build-systemservice --parallel`: rc 0. - `ctest --test-dir build-systemservice --output-on-failure`: 542/542 passed, 0 failed (119.96 s). - `g++ -std=c++20 -fsyntax-only` on `core/libs/prx/libSceSystemService/Export.cpp` and `core/libs/tests/GuestSystemService.cpp`: rc 0. - `python3 tools/progress.py`: libSceSystemService done 93 -> 96, todo 491 -> 488; libraries 8656/33237 (26.04%) -> 8659/33237 (26.05%). - Host-only change; no console run. ### 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: none - [x] GPUs tested: n/a - [x] AI-assisted: yes
MarcZX10 commented 2026-11-21 10:16:24 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T10:16:24Z.

Review: APPROVED


Reviewed — looks good

The reviewed change replaces the unknown-title marker with an explicit exception while preserving the existing result for malformed IDs and the running title.

What I ran

Reviewed head 30696995c4fd2a08a7b503eb6a8184fbf1af0df9. Read the prepared description, commit summary, manifest, diff, and the changed function plus its neighboring helpers in Export.cpp. No commands or tests were run.

Results

Check Result Note
Diff review passed One changed line
Build and tests not run No commands run during review

Findings

Blocking

None.

Non-blocking

None.

Not verified

files.json and a directory listing of the prepared files/ bundle were not available through the reader; the manifest lists one changed file, and its relevant source range was read. Build, test, and console behavior were not verified during this review. The author's reported checks were not rerun.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6004572786 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/14202#pullrequestreview-6004572786). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-21T10:16:24Z. **Review:** APPROVED --- # Reviewed — looks good The reviewed change replaces the unknown-title marker with an explicit exception while preserving the existing result for malformed IDs and the running title. ## What I ran Reviewed head `30696995c4fd2a08a7b503eb6a8184fbf1af0df9`. Read the prepared description, commit summary, manifest, diff, and the changed function plus its neighboring helpers in `Export.cpp`. No commands or tests were run. ## Results | Check | Result | Note | |---|---|---| | Diff review | passed | One changed line | | Build and tests | not run | No commands run during review | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified `files.json` and a directory listing of the prepared `files/` bundle were not available through the reader; the manifest lists one changed file, and its relevant source range was read. Build, test, and console behavior were not verified during this review. The author's reported checks were not rerun. ## To get this to a good state Nothing is required.

Pull request closed

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!14202
No description provided.