feat(prx): declare the missing libSceAppInstUtil and libSceAudioIn exports #12539

Merged
juanpimg merged 3 commits from upstream-pr/12539 into main 2026-10-30 09:52:34 +00:00
juanpimg commented 2026-10-28 18:46:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by juanpimg on 2026-10-28T18:46:45Z.


What

Declares 13 PS5 3.20 system exports that AnyPS5 does not provide, across 2 libraries: libSceAppInstUtil (7) and libSceAudioIn (6).

AnyPS5 resolves a title's imports by NID, so a title that imports a system function that no AnyPS5 library provides fails to load with an unresolved import. Declaring them as throwing stubs lets those titles load and reach their next blocker.

Every declaration calls NotImplemented_nid_no_patch and returns 0; none of them implements the function. All 13 are declared without parameters, which resolves the import without making an ABI claim. The technical-debt files record the limitation per library.

The list is the intersection of the export table of the console's library (function symbols only), the pinned aerolib names and the functions not yet defined anywhere in the repo (verified per symbol with tools/nid_names.py). It was computed with tools/export_gap.py (#8588), which recognises what a module already provides through an APS5_VABI declaration, a _nid_postfix name, an APS5_EXPORT binding or a macro, and which reports the missing exports whose name the module calls itself.

tools/pr_overlap.py reports no shared export with any open pull request.

tools/progress.py reports system libraries changing from 6653/14205 (46.84%) to 6653/14218 (46.79%). These are pending declarations, so the implemented count is unchanged.

Tested

CachyOS Linux, kernel 7.2.9-2-cachyos, GCC 16.2.1, CMake 3.31.6, Ninja 1.12.1, Release build.

  • cmake --build build --target libSceAppInstUtil libSceAudioIn: builds and links cleanly.
  • No dedicated tests exist for these declarations (the project does not add tests that only check that a symbol is exported; missing exports already fail at startup).
  • python3 tools/check_conventions.py --base origin/main: all conventions checks passed.
  • git diff --check: clean.
  • No title was run: the contributor has no PS5 and no game dumps.

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:5055882237 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12539). Originally posted by [juanpimg](https://github.com/juanpimg) on 2026-10-28T18:46:45Z. --- ### What Declares 13 PS5 3.20 system exports that AnyPS5 does not provide, across 2 libraries: `libSceAppInstUtil` (7) and `libSceAudioIn` (6). AnyPS5 resolves a title's imports by NID, so a title that imports a system function that no AnyPS5 library provides fails to load with an unresolved import. Declaring them as throwing stubs lets those titles load and reach their next blocker. Every declaration calls `NotImplemented_nid_no_patch` and returns 0; none of them implements the function. All 13 are declared without parameters, which resolves the import without making an ABI claim. The technical-debt files record the limitation per library. The list is the intersection of the export table of the console's library (function symbols only), the pinned [aerolib](https://github.com/zecoxao/sce_symbols/blob/2883963a0a514ba6e77407a08ef4730a65e88254/aerolib.csv) names and the functions not yet defined anywhere in the repo (verified per symbol with `tools/nid_names.py`). It was computed with `tools/export_gap.py` (#8588), which recognises what a module already provides through an `APS5_VABI` declaration, a `_nid_postfix` name, an `APS5_EXPORT` binding or a macro, and which reports the missing exports whose name the module calls itself. `tools/pr_overlap.py` reports no shared export with any open pull request. `tools/progress.py` reports system libraries changing from 6653/14205 (46.84%) to 6653/14218 (46.79%). These are pending declarations, so the implemented count is unchanged. ### Tested CachyOS Linux, kernel 7.2.9-2-cachyos, GCC 16.2.1, CMake 3.31.6, Ninja 1.12.1, Release build. - `cmake --build build --target libSceAppInstUtil libSceAudioIn`: builds and links cleanly. - No dedicated tests exist for these declarations (the project does not add tests that only check that a symbol is exported; missing exports already fail at startup). - `python3 tools/check_conventions.py --base origin/main`: all conventions checks passed. - `git diff --check`: clean. - No title was run: the contributor has no PS5 and no game dumps. ### 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-10-28 19:29:25 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-28T19:29:25Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

The 13 new exported functions have definitions but no declarations in either library's public headers, so the required public_headers audit fails on this head.

What I ran

Reviewed head 4792cc3607c3dbc19383c853bd2111844d66c55e against current main 319621ba2e578bd053b0baba2877fe70520e0737; the merge tree is clean. Environment: Debian 12 x86_64, Python 3.11. I ran the repository's public_headers audit on both the PR head and its base as a negative control, and inspected the two public headers and the relevant contribution rule.

git diff --check refs/review/current-main...refs/review/12539
git merge-tree --write-tree refs/review/current-main refs/review/12539
python3 core/libs/tests/test_public_headers.py --audit-only

The audit command was run from /dev/shm/AnyPS5-review-12539 at the PR head and /dev/shm/AnyPS5-base-12539 at the base.

Results

Check Result
Merge with current main Clean
Diff check Passed; no output
Base public_headers audit Passed: 369 libraries, 13,071 exports
PR-head public_headers audit Failed: all 13 newly defined exports have zero header declarations
Hosted conventions, eligibility, intake, labels, report Passed
Hosted Windows Job passed, but test selection and CTest were skipped; host-only test executables linked
Hosted Linux, register-context, relinker, ASan, write-watch Skipped by workflow
Raw output
8421c132edbe9d521e10fbef6856547a8f7233e0
369 libraries, 13071 exports: unique declarations and umbrella coverage verified
RuntimeError: sceAppInstUtilAppInstallCloudGame: expected exactly one header declaration; found 0:
sceAppInstUtilAppInstallRequestAddcontFromDisc: expected exactly one header declaration; found 0:
sceAppInstUtilAppInstallMediaPlayer: expected exactly one header declaration; found 0:
sceAppInstUtilAppSetSavedataUploadStatus: expected exactly one header declaration; found 0:
sceAppInstUtilAppGetCustomThemeInfo: expected exactly one header declaration; found 0:
sceAppInstUtilAppConvertAppDiscToDownload: expected exactly one header declaration; found 0:
sceAppInstUtilAppGetInstallAddcontFromDiscStatus: expected exactly one header declaration; found 0:
sceAudioInExtOpen: expected exactly one header declaration; found 0:
sceAudioInExtSetAecMode: expected exactly one header declaration; found 0:
sceAudioInSetFocusForUser: expected exactly one header declaration; found 0:
sceAudioInExtClose: expected exactly one header declaration; found 0:
sceAudioInSetConnectionsForUser: expected exactly one header declaration; found 0:
sceAudioInExtInput: expected exactly one header declaration; found 0:

Hosted Windows job output:

Link changed host-only core/libs test executables	success
Run cmake --build build --target libs	skipped
Run python tools/select_tests.py ctest build --output-on-failure --timeout 120 --parallel 4 --output-log ctest.log --output-junit ctest.xml	skipped

Negative control

Assertion Change made to code under test Did the new test fail?
Each exported APS5_VABI function has exactly one declaration in a public header reachable through its library umbrella. Ran the same audit on base 319621ba2e578bd053b0baba2877fe70520e0737, then on PR head 4792cc3607c3dbc19383c853bd2111844d66c55e. Base passed; PR head failed for all 13 new functions.

Findings

Blocking: CONTRIBUTING.md requires every exported APS5_VABI function to have exactly one declaration in a header reachable through its library umbrella. libSceAppInstUtil/include/Api.hpp and libSceAudioIn/include/AudioIn.hpp contain none of these new declarations. Add one declaration for each export in its library's public header, following the repository-approved convention for signatures whose prototypes remain unknown, and keep the technical-debt entries explicit that callers must not rely on an unverified ABI. Then rerun public_headers and header compilation.

Non-blocking: The hosted Windows job linked changed host-only targets but skipped CTest, which is why its green result does not cover this public-header audit failure.

Sources

Not verified

I did not independently validate all 13 NIDs against console exports or the pinned aerolib database, and I did not build either full library locally. Their hosted Windows build steps linked the changed host-only test targets but skipped the full library build and CTest.

To get this to a good state

Add the required public declarations in the two headers and rerun python3 core/libs/tests/test_public_headers.py --audit-only plus the public-header compile test. I will rerun those checks on the updated head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5688521582 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12539#pullrequestreview-5688521582). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-28T19:29:25Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested The 13 new exported functions have definitions but no declarations in either library's public headers, so the required `public_headers` audit fails on this head. ### What I ran Reviewed head `4792cc3607c3dbc19383c853bd2111844d66c55e` against current `main` `319621ba2e578bd053b0baba2877fe70520e0737`; the merge tree is clean. Environment: Debian 12 x86_64, Python 3.11. I ran the repository's `public_headers` audit on both the PR head and its base as a negative control, and inspected the two public headers and the relevant contribution rule. ```sh git diff --check refs/review/current-main...refs/review/12539 git merge-tree --write-tree refs/review/current-main refs/review/12539 python3 core/libs/tests/test_public_headers.py --audit-only ``` The audit command was run from `/dev/shm/AnyPS5-review-12539` at the PR head and `/dev/shm/AnyPS5-base-12539` at the base. ### Results | Check | Result | |---|---| | Merge with current `main` | Clean | | Diff check | Passed; no output | | Base `public_headers` audit | Passed: 369 libraries, 13,071 exports | | PR-head `public_headers` audit | Failed: all 13 newly defined exports have zero header declarations | | Hosted conventions, eligibility, intake, labels, report | Passed | | Hosted Windows | Job passed, but test selection and CTest were skipped; host-only test executables linked | | Hosted Linux, register-context, relinker, ASan, write-watch | Skipped by workflow | <details><summary>Raw output</summary> ```text 8421c132edbe9d521e10fbef6856547a8f7233e0 ``` ```text 369 libraries, 13071 exports: unique declarations and umbrella coverage verified ``` ```text RuntimeError: sceAppInstUtilAppInstallCloudGame: expected exactly one header declaration; found 0: sceAppInstUtilAppInstallRequestAddcontFromDisc: expected exactly one header declaration; found 0: sceAppInstUtilAppInstallMediaPlayer: expected exactly one header declaration; found 0: sceAppInstUtilAppSetSavedataUploadStatus: expected exactly one header declaration; found 0: sceAppInstUtilAppGetCustomThemeInfo: expected exactly one header declaration; found 0: sceAppInstUtilAppConvertAppDiscToDownload: expected exactly one header declaration; found 0: sceAppInstUtilAppGetInstallAddcontFromDiscStatus: expected exactly one header declaration; found 0: sceAudioInExtOpen: expected exactly one header declaration; found 0: sceAudioInExtSetAecMode: expected exactly one header declaration; found 0: sceAudioInSetFocusForUser: expected exactly one header declaration; found 0: sceAudioInExtClose: expected exactly one header declaration; found 0: sceAudioInSetConnectionsForUser: expected exactly one header declaration; found 0: sceAudioInExtInput: expected exactly one header declaration; found 0: ``` Hosted Windows job output: ```text Link changed host-only core/libs test executables success Run cmake --build build --target libs skipped Run python tools/select_tests.py ctest build --output-on-failure --timeout 120 --parallel 4 --output-log ctest.log --output-junit ctest.xml skipped ``` </details> ### Negative control | Assertion | Change made to code under test | Did the new test fail? | |---|---|---| | Each exported `APS5_VABI` function has exactly one declaration in a public header reachable through its library umbrella. | Ran the same audit on base `319621ba2e578bd053b0baba2877fe70520e0737`, then on PR head `4792cc3607c3dbc19383c853bd2111844d66c55e`. | Base passed; PR head failed for all 13 new functions. | ### Findings **Blocking:** `CONTRIBUTING.md` requires every exported `APS5_VABI` function to have exactly one declaration in a header reachable through its library umbrella. `libSceAppInstUtil/include/Api.hpp` and `libSceAudioIn/include/AudioIn.hpp` contain none of these new declarations. Add one declaration for each export in its library's public header, following the repository-approved convention for signatures whose prototypes remain unknown, and keep the technical-debt entries explicit that callers must not rely on an unverified ABI. Then rerun `public_headers` and header compilation. **Non-blocking:** The hosted Windows job linked changed host-only targets but skipped CTest, which is why its green result does not cover this public-header audit failure. ### Sources - [Public-header requirement at the reviewed base](https://github.com/boykopovar/AnyPS5/blob/319621ba2e578bd053b0baba2877fe70520e0737/CONTRIBUTING.md#L5) - [Audit implementation at the reviewed base](https://github.com/boykopovar/AnyPS5/blob/319621ba2e578bd053b0baba2877fe70520e0737/core/libs/tests/test_public_headers.py#L105) - [New AppInstUtil definitions at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/4792cc3607c3dbc19383c853bd2111844d66c55e/core/libs/prx/libSceAppInstUtil/Export.cpp#L576) - [AppInstUtil public header at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/4792cc3607c3dbc19383c853bd2111844d66c55e/core/libs/prx/libSceAppInstUtil/include/Api.hpp) - [New AudioIn definitions at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/4792cc3607c3dbc19383c853bd2111844d66c55e/core/libs/prx/libSceAudioIn/Export.cpp#L370) - [AudioIn public header at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/4792cc3607c3dbc19383c853bd2111844d66c55e/core/libs/prx/libSceAudioIn/include/AudioIn.hpp) ### Not verified I did not independently validate all 13 NIDs against console exports or the pinned aerolib database, and I did not build either full library locally. Their hosted Windows build steps linked the changed host-only test targets but skipped the full library build and CTest. ### To get this to a good state Add the required public declarations in the two headers and rerun `python3 core/libs/tests/test_public_headers.py --audit-only` plus the public-header compile test. I will rerun those checks on the updated head.
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!12539
No description provided.