feat(libSceAppContent): expand /download0 and give the shrink exports their size argument #18116

Merged
eliasbruno124-dev merged 2 commits from upstream-pr/18116 into main 2026-11-15 10:51:44 +00:00
eliasbruno124-dev commented 2026-11-10 13:36:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by eliasbruno124-dev on 2026-11-10T13:36:48Z.


What

Call of Duty: Modern Warfare III (PPSA01649, 01.055.000) stops 11 s after its start with sceAppContentDownload0Expand not implemented. The export was declared without parameters and threw, like sceAppContentDownload0Shrink, sceAppContentDownload1Shrink and sceAppContentDownload2Shrink; their debt entry said that the signatures were unknown.

Two sources now give the signature:

  • The library's code: the libSceAppContent.sprx in the fakelib/ directory of that dump (SHA-256 b3e8cbe8f324ca1b9e0e9698311c269d92cd139365a82e2af4aeacd9a7a3affd, firmware not established, read from disassembly). Download0Shrink, Download0Expand, Download1Shrink and Download1Expand have one shape: return NOT_INITIALIZED (0x80d90001) when the library is not initialized, otherwise store rdi as an 8-byte value and forward it as the only input of a service request (commands 0x2001f to 0x20022), returning the service's result. Download2Shrink and Download2Expand (0x20023, 0x20024) do the same and return PARAMETER for 0 before the request.
  • The title's call site at 0x1952318: it holds a size in GiB (0, 20, 30, 40 or 50), shifts it left by 10 and passes it in rdi; it calls Download0Expand when the size it measures is smaller, Download0Shrink (0x195233a) when it is larger, requires 0, and after 0x80d90008 retries the expansion.

sceAppContentDownload0Expand therefore takes a size and, after the initialization check, raises the /download0 quota to that many MiB, as sceAppContentDownload1Expand and sceAppContentDownload2Expand already raise theirs; sceAppContentDownloadDataGetAvailableSpaceKb reports the larger of that and the title's downloadDataSize. A size of 0 throws, because the module sends it to the service and the answer is unknown. The three shrink exports get their size parameter and the checks the module makes, and still throw where the service starts: what shrinking does to stored data is not known.

Open points are in the debt file: the unit is taken from one title's call site, nothing here is measured on a console, the model never answers 0x80d90008, and dlc_emu declares a mount point for these exports, which the call site (an integer no larger than 51200) contradicts. The module does not check Download1Expand's size for 0 either, while this library answers PARAMETER there; that is recorded and left unchanged. The "pending exports" entry is removed, since its three exports now have signatures.

Tested

Windows 11 Pro 10.0.26300, MSYS2 UCRT64 GCC 16.2.0-6, Release. Current head 974994eb4a is the reviewed 78586d76da rebased onto main 439f320158 on 2026-11-12, after #17955 merged; the only conflict was in docs/dev/debt/libSceAppContent.md, where #17955's new entry and this branch's edited entry both stay, and git range-diff shows no other change. Full build of that head, nothing else merged.

  • guest_appcontent and the seven other guest_appcontent_* tests pass in 3 of 3 runs on 974994eb4a. The extended GuestAppContent.cpp covers: NOT_INITIALIZED from the five changed exports before initialization; /download0 reporting 0 KB before an expansion; Download0Expand(0) throwing and leaving the quota at 0; an expansion to 2 MiB reporting 2047 KB beside a 9-byte file; a later smaller expansion changing nothing; the file surviving; the three shrink exports throwing after their checks and Download2Shrink(0) returning PARAMETER. The new calls pass an argument, which main's parameterless declarations of three of these exports do not accept.
  • python tools/check_conventions.py --base origin/main and git diff --check pass.

Title runs of PPSA01649 01.055.000 on the same machine (NVIDIA GeForce RTX 3060 Laptop GPU, driver 621.01), converted with relinker --windows --to-intel --registry --module-dir ., no input. They were made on 2026-11-10 with the earlier head 78586d76da on main 39bac5d055 and were not repeated after the rebase:

  • main 39bac5d055 with #18086: the run ends after 11 s with sceAppContentDownload0Expand not implemented.
  • With this change added: the title goes on to open its /download0/xpak_cache files and ends after 16 s with sceHttp2SendRequestAsync not implemented, which #11630 implements.
  • With this change, #11630 (b17933dfd4) and #17570 (06457e01f1) merged: no stop within the 150 s limit; the window shows the intro video, 1,205 presents in 137 s.

These runs show how far start-up gets. No frame rate is claimed, and the menu and the size the title measures after the expansion were not checked.

Not tested: Linux and macOS, a console, and any other title that imports these exports.

Overlap: of the 1,990 open pull request heads fetched on 2026-11-10, five changed a file this branch changes. #17955 and #16591 have merged since and are part of the base now. #16797 has been closed. #13589 merged cleanly with this branch in a trial merge (git merge-tree) on 2026-11-10; #14212, which reformats every debt file, conflicts with main. #18516 and #18598, opened on 2026-11-11, guard output pointers of other exports in the same file and conflict with main themselves. None of them implements these exports. tools/pr_overlap.py --branch did not finish on this partial clone (dropped connections), so this comes from the file lists of the fetched heads and the overlap comment below.

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 (the title also needs #11630 to get past its next stop)
  • Fixes: none
  • Unblocks: PPSA01649 #18132 (the start-up stop at sceAppContentDownload0Expand; not playability)
  • GPUs tested: n/a (libSceAppContent; the title run used an NVIDIA GeForce RTX 3060 Laptop GPU, driver 621.01, Windows 11)
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5242229323 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18116). Originally posted by [eliasbruno124-dev](https://github.com/eliasbruno124-dev) on 2026-11-10T13:36:48Z. --- ### What Call of Duty: Modern Warfare III (PPSA01649, 01.055.000) stops 11 s after its start with `sceAppContentDownload0Expand not implemented`. The export was declared without parameters and threw, like `sceAppContentDownload0Shrink`, `sceAppContentDownload1Shrink` and `sceAppContentDownload2Shrink`; their debt entry said that the signatures were unknown. Two sources now give the signature: - The library's code: the `libSceAppContent.sprx` in the `fakelib/` directory of that dump (SHA-256 `b3e8cbe8f324ca1b9e0e9698311c269d92cd139365a82e2af4aeacd9a7a3affd`, firmware not established, read from disassembly). `Download0Shrink`, `Download0Expand`, `Download1Shrink` and `Download1Expand` have one shape: return `NOT_INITIALIZED` (`0x80d90001`) when the library is not initialized, otherwise store `rdi` as an 8-byte value and forward it as the only input of a service request (commands `0x2001f` to `0x20022`), returning the service's result. `Download2Shrink` and `Download2Expand` (`0x20023`, `0x20024`) do the same and return `PARAMETER` for 0 before the request. - The title's call site at `0x1952318`: it holds a size in GiB (0, 20, 30, 40 or 50), shifts it left by 10 and passes it in `rdi`; it calls `Download0Expand` when the size it measures is smaller, `Download0Shrink` (`0x195233a`) when it is larger, requires 0, and after `0x80d90008` retries the expansion. `sceAppContentDownload0Expand` therefore takes a size and, after the initialization check, raises the `/download0` quota to that many MiB, as `sceAppContentDownload1Expand` and `sceAppContentDownload2Expand` already raise theirs; `sceAppContentDownloadDataGetAvailableSpaceKb` reports the larger of that and the title's `downloadDataSize`. A size of 0 throws, because the module sends it to the service and the answer is unknown. The three shrink exports get their size parameter and the checks the module makes, and still throw where the service starts: what shrinking does to stored data is not known. Open points are in the debt file: the unit is taken from one title's call site, nothing here is measured on a console, the model never answers `0x80d90008`, and [dlc_emu](https://github.com/drakmor/dlc_emu/blob/fcf69b16d46a9850578bce19dc2c1b4dc867cbb5/src/dlc_modules/sceappcontent_exports.cpp#L233-L247) declares a mount point for these exports, which the call site (an integer no larger than 51200) contradicts. The module does not check `Download1Expand`'s size for 0 either, while this library answers `PARAMETER` there; that is recorded and left unchanged. The "pending exports" entry is removed, since its three exports now have signatures. ### 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. --> Windows 11 Pro 10.0.26300, MSYS2 UCRT64 GCC 16.2.0-6, Release. Current head `974994eb4a` is the reviewed `78586d76da` rebased onto `main` `439f320158` on 2026-11-12, after #17955 merged; the only conflict was in `docs/dev/debt/libSceAppContent.md`, where #17955's new entry and this branch's edited entry both stay, and `git range-diff` shows no other change. Full build of that head, nothing else merged. - `guest_appcontent` and the seven other `guest_appcontent_*` tests pass in 3 of 3 runs on `974994eb4a`. The extended `GuestAppContent.cpp` covers: `NOT_INITIALIZED` from the five changed exports before initialization; `/download0` reporting 0 KB before an expansion; `Download0Expand(0)` throwing and leaving the quota at 0; an expansion to 2 MiB reporting 2047 KB beside a 9-byte file; a later smaller expansion changing nothing; the file surviving; the three shrink exports throwing after their checks and `Download2Shrink(0)` returning `PARAMETER`. The new calls pass an argument, which `main`'s parameterless declarations of three of these exports do not accept. - `python tools/check_conventions.py --base origin/main` and `git diff --check` pass. Title runs of PPSA01649 01.055.000 on the same machine (NVIDIA GeForce RTX 3060 Laptop GPU, driver 621.01), converted with `relinker --windows --to-intel --registry --module-dir .`, no input. They were made on 2026-11-10 with the earlier head `78586d76da` on `main` `39bac5d055` and were not repeated after the rebase: - `main` `39bac5d055` with #18086: the run ends after 11 s with `sceAppContentDownload0Expand not implemented`. - With this change added: the title goes on to open its `/download0/xpak_cache` files and ends after 16 s with `sceHttp2SendRequestAsync not implemented`, which #11630 implements. - With this change, #11630 (`b17933dfd4`) and #17570 (`06457e01f1`) merged: no stop within the 150 s limit; the window shows the intro video, 1,205 presents in 137 s. These runs show how far start-up gets. No frame rate is claimed, and the menu and the size the title measures after the expansion were not checked. Not tested: Linux and macOS, a console, and any other title that imports these exports. Overlap: of the 1,990 open pull request heads fetched on 2026-11-10, five changed a file this branch changes. #17955 and #16591 have merged since and are part of the base now. #16797 has been closed. #13589 merged cleanly with this branch in a trial merge (`git merge-tree`) on 2026-11-10; #14212, which reformats every debt file, conflicts with `main`. #18516 and #18598, opened on 2026-11-11, guard output pointers of other exports in the same file and conflict with `main` themselves. None of them implements these exports. `tools/pr_overlap.py --branch` did not finish on this partial clone (dropped connections), so this comes from the file lists of the fetched heads and the overlap comment below. ### 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 (the title also needs #11630 to get past its next stop) <!-- #PR, or none --> - [x] Fixes: none <!-- issue it closes as Fixes #N, or none --> - [x] Unblocks: PPSA01649 #18132 (the start-up stop at `sceAppContentDownload0Expand`; not playability) <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> - [x] GPUs tested: n/a (libSceAppContent; the title run used an NVIDIA GeForce RTX 3060 Laptop GPU, driver 621.01, Windows 11) <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> - [x] AI-assisted: yes <!-- yes / no -->
PrivacyOnion commented 2026-11-10 20:27:00 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-10T20:27:00Z.

Review: CHANGES_REQUESTED


Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against 78586d76da:

  • Conventions: tools/check_conventions.py passed; git diff --check clean.
  • Build: guest_appcontent_tests built cleanly.
  • CTest (guest_appcontent_download_0, guest_appcontent_download_1, guest_appcontent_download_18014398509481983, guest_appcontent_download_18014398509481984, guest_appcontent_download_18446744073709551615, guest_appcontent, guest_appcontent_license, guest_appcontent_entitlements):
    1/8 Test #2771: guest_appcontent_download_0 ......................***Not Run   0.00 sec
    2/8 Test #2772: guest_appcontent_download_1 ......................***Not Run   0.00 sec
    3/8 Test #2773: guest_appcontent_download_18014398509481983 ......***Not Run   0.00 sec
    4/8 Test #2774: guest_appcontent_download_18014398509481984 ......***Not Run   0.00 sec
    5/8 Test #2775: guest_appcontent_download_18446744073709551615 ...***Not Run   0.00 sec
    6/8 Test #2777: guest_appcontent_license .........................***Not Run   0.00 sec
    7/8 Test #2778: guest_appcontent_entitlements ....................***Not Run   0.00 sec
    8/8 Test #2776: guest_appcontent .................................   Passed    0.03 sec
    13% tests passed, 7 tests failed out of 8
    
    The following tests FAILED:
    
  • Note: the AI-assisted checkbox can stay.

Requesting changes for the points above.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5848825885 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18116#pullrequestreview-5848825885). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-10T20:27:00Z. **Review:** CHANGES_REQUESTED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `78586d76da`: - **Conventions**: `tools/check_conventions.py` passed; `git diff --check` clean. - **Build**: `guest_appcontent_tests` built cleanly. - **CTest** (`guest_appcontent_download_0`, `guest_appcontent_download_1`, `guest_appcontent_download_18014398509481983`, `guest_appcontent_download_18014398509481984`, `guest_appcontent_download_18446744073709551615`, `guest_appcontent`, `guest_appcontent_license`, `guest_appcontent_entitlements`): ``` 1/8 Test #2771: guest_appcontent_download_0 ......................***Not Run 0.00 sec 2/8 Test #2772: guest_appcontent_download_1 ......................***Not Run 0.00 sec 3/8 Test #2773: guest_appcontent_download_18014398509481983 ......***Not Run 0.00 sec 4/8 Test #2774: guest_appcontent_download_18014398509481984 ......***Not Run 0.00 sec 5/8 Test #2775: guest_appcontent_download_18446744073709551615 ...***Not Run 0.00 sec 6/8 Test #2777: guest_appcontent_license .........................***Not Run 0.00 sec 7/8 Test #2778: guest_appcontent_entitlements ....................***Not Run 0.00 sec 8/8 Test #2776: guest_appcontent ................................. Passed 0.03 sec 13% tests passed, 7 tests failed out of 8 ``` ``` The following tests FAILED: ``` - Note: the AI-assisted checkbox can stay. Requesting changes for the points above.
PrivacyOnion commented 2026-11-11 18:53:18 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-11T18:53:18Z.

Review: APPROVED


Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against 78586d76da:

  • Conventions: tools/check_conventions.py passed; git diff --check clean.
  • Build: guest_appcontent_tests built cleanly.
  • CTest (guest_appcontent_download_0, guest_appcontent_download_1, guest_appcontent_download_18014398509481983, guest_appcontent_download_18014398509481984, guest_appcontent_download_18446744073709551615, guest_appcontent, guest_appcontent_license, guest_appcontent_entitlements):
    1/8 Test #2771: guest_appcontent_download_0 ......................   Passed    0.07 sec
    2/8 Test #2773: guest_appcontent_download_18014398509481983 ......   Passed    0.06 sec
    3/8 Test #2772: guest_appcontent_download_1 ......................   Passed    0.13 sec
    4/8 Test #2774: guest_appcontent_download_18014398509481984 ......   Passed    0.07 sec
    5/8 Test #2777: guest_appcontent_license .........................   Passed    0.06 sec
    6/8 Test #2775: guest_appcontent_download_18446744073709551615 ...   Passed    0.13 sec
    7/8 Test #2778: guest_appcontent_entitlements ....................   Passed    0.07 sec
    8/8 Test #2776: guest_appcontent .................................   Passed    0.17 sec
    100% tests passed, 0 tests failed out of 8
    
  • Negative control: with core/libs/prx/libSceAppContent/Export.cpp, core/libs/prx/libSceAppContent/include/Api.hpp reverted to main, the new tests do not build/link without the change; restoring it makes them build and pass.
  • Code reading:
    • core/libs/prx/libSceAppContent/Export.cpp: Verified that sceAppContentDownload0Expand, sceAppContentDownload0Shrink, sceAppContentDownload1Shrink, and sceAppContentDownload2Shrink check !initialized.load() first and return SCE_APP_CONTENT_ERROR_NOT_INITIALIZED (0x80D90001).
    • core/libs/prx/libSceAppContent/Export.cpp: Verified that sceAppContentDownload2Shrink returns SCE_APP_CONTENT_ERROR_PARAMETER (0x80D90002) for size == 0, and delegates non-zero sizes to NotImplemented_nid_no_patch(func), matching disassembled library behavior.
    • core/libs/prx/libSceAppContent/Export.cpp: Verified thread-safe atomic monotonic expansion in sceAppContentDownload0Expand using compare_exchange_weak on download0ExpandedMiB, ensuring race-free updates and no quota regressions on smaller expansion requests.
    • core/libs/prx/libSceAppContent/Export.cpp: Verified quota calculation in sceAppContentDownloadDataGetAvailableSpaceKb using std::max with GetAppDownloadDataSizeMiB_nid_postfix() and download0ExpandedMiB, preserving overflow check guards before converting MiB to KiB.
    • core/libs/prx/libSceAppContent/include/Api.hpp: Verified export declarations for sceAppContentDownload0Expand, sceAppContentDownload0Shrink, sceAppContentDownload1Shrink, and sceAppContentDownload2Shrink use size_t size with APS5_VABI calling convention, ensuring LP64 and LLP64 portability.
    • core/libs/tests/GuestAppContent.cpp: Verified test coverage exercising uninitialized errors, zero-size handling, monotonic expansion verification, directory/file preservation, and exception handling for NotImplemented paths.
    • AGENTS.md & docs/dev/debt/libSceAppContent.md: Verified zero comments added to source and test files, proper removal of the pending exports debt entry, and full documentation of unverified console behavior.
  • Note: the AI-assisted checkbox can stay.

Looks Good To Me

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5863900782 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18116#pullrequestreview-5863900782). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-11T18:53:18Z. **Review:** APPROVED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `78586d76da`: - **Conventions**: `tools/check_conventions.py` passed; `git diff --check` clean. - **Build**: `guest_appcontent_tests` built cleanly. - **CTest** (`guest_appcontent_download_0`, `guest_appcontent_download_1`, `guest_appcontent_download_18014398509481983`, `guest_appcontent_download_18014398509481984`, `guest_appcontent_download_18446744073709551615`, `guest_appcontent`, `guest_appcontent_license`, `guest_appcontent_entitlements`): ``` 1/8 Test #2771: guest_appcontent_download_0 ...................... Passed 0.07 sec 2/8 Test #2773: guest_appcontent_download_18014398509481983 ...... Passed 0.06 sec 3/8 Test #2772: guest_appcontent_download_1 ...................... Passed 0.13 sec 4/8 Test #2774: guest_appcontent_download_18014398509481984 ...... Passed 0.07 sec 5/8 Test #2777: guest_appcontent_license ......................... Passed 0.06 sec 6/8 Test #2775: guest_appcontent_download_18446744073709551615 ... Passed 0.13 sec 7/8 Test #2778: guest_appcontent_entitlements .................... Passed 0.07 sec 8/8 Test #2776: guest_appcontent ................................. Passed 0.17 sec 100% tests passed, 0 tests failed out of 8 ``` - **Negative control**: with `core/libs/prx/libSceAppContent/Export.cpp`, `core/libs/prx/libSceAppContent/include/Api.hpp` reverted to `main`, the new tests do not build/link without the change; restoring it makes them build and pass. - **Code reading**: - core/libs/prx/libSceAppContent/Export.cpp: Verified that sceAppContentDownload0Expand, sceAppContentDownload0Shrink, sceAppContentDownload1Shrink, and sceAppContentDownload2Shrink check !initialized.load() first and return SCE_APP_CONTENT_ERROR_NOT_INITIALIZED (0x80D90001). - core/libs/prx/libSceAppContent/Export.cpp: Verified that sceAppContentDownload2Shrink returns SCE_APP_CONTENT_ERROR_PARAMETER (0x80D90002) for size == 0, and delegates non-zero sizes to NotImplemented_nid_no_patch(__func__), matching disassembled library behavior. - core/libs/prx/libSceAppContent/Export.cpp: Verified thread-safe atomic monotonic expansion in sceAppContentDownload0Expand using compare_exchange_weak on download0ExpandedMiB, ensuring race-free updates and no quota regressions on smaller expansion requests. - core/libs/prx/libSceAppContent/Export.cpp: Verified quota calculation in sceAppContentDownloadDataGetAvailableSpaceKb using std::max with GetAppDownloadDataSizeMiB_nid_postfix() and download0ExpandedMiB, preserving overflow check guards before converting MiB to KiB. - core/libs/prx/libSceAppContent/include/Api.hpp: Verified export declarations for sceAppContentDownload0Expand, sceAppContentDownload0Shrink, sceAppContentDownload1Shrink, and sceAppContentDownload2Shrink use size_t size with APS5_VABI calling convention, ensuring LP64 and LLP64 portability. - core/libs/tests/GuestAppContent.cpp: Verified test coverage exercising uninitialized errors, zero-size handling, monotonic expansion verification, directory/file preservation, and exception handling for NotImplemented paths. - AGENTS.md & docs/dev/debt/libSceAppContent.md: Verified zero comments added to source and test files, proper removal of the pending exports debt entry, and full documentation of unverified console behavior. - Note: the AI-assisted checkbox can stay. Looks Good To Me
PrivacyOnion commented 2026-11-14 23:08:11 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-14T23:08:11Z.

Review: APPROVED


Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against 2c2efdb76b:

  • Conventions: tools/check_conventions.py passed; git diff --check clean.
  • Build: guest_appcontent_tests built cleanly.
  • CTest (guest_appcontent_download_0, guest_appcontent_download_1, guest_appcontent_download_18014398509481983, guest_appcontent_download_18014398509481984, guest_appcontent_download_18446744073709551615, guest_appcontent, guest_appcontent_license, guest_appcontent_entitlements):
    1/8 Test #3078: guest_appcontent_download_18014398509481984 ......   Passed    0.02 sec
    2/8 Test #3082: guest_appcontent_entitlements ....................   Passed    0.04 sec
    3/8 Test #3080: guest_appcontent .................................   Passed    0.03 sec
    4/8 Test #3081: guest_appcontent_license .........................   Passed    0.03 sec
    5/8 Test #3077: guest_appcontent_download_18014398509481983 ......   Passed    0.04 sec
    6/8 Test #3079: guest_appcontent_download_18446744073709551615 ...   Passed    0.03 sec
    7/8 Test #3076: guest_appcontent_download_1 ......................   Passed    0.05 sec
    8/8 Test #3075: guest_appcontent_download_0 ......................   Passed    0.03 sec
    100% tests passed, 0 tests failed out of 8
    
  • Negative control: with core/libs/prx/libSceAppContent/Export.cpp, core/libs/prx/libSceAppContent/include/Api.hpp reverted to main, the new tests do not build/link without the change; restoring it makes them build and pass.
  • Code reading:
    • core/libs/prx/libSceAppContent/Export.cpp: verified that sceAppContentDownload0Expand, sceAppContentDownload0Shrink, sceAppContentDownload1Shrink, and sceAppContentDownload2Shrink check initialized.load() first and return SCE_APP_CONTENT_ERROR_NOT_INITIALIZED (0x80D90001) prior to any parameter validation or filesystem operations.
    • core/libs/prx/libSceAppContent/Export.cpp: verified that sceAppContentDownload2Shrink accurately rejects size == 0 with SCE_APP_CONTENT_ERROR_PARAMETER (0x80D90002), whereas sceAppContentDownload0Expand(0), sceAppContentDownload0Shrink, and sceAppContentDownload1Shrink throw via NotImplemented_nid_no_patch(func) per AGENTS.md guidelines and documented technical debt.
    • core/libs/prx/libSceAppContent/Export.cpp: verified atomic lock-free monotonicity for download0ExpandedMiB via compare_exchange_weak in sceAppContentDownload0Expand, ensuring race-free updates and that smaller subsequent expansion requests do not lower the quota.
    • core/libs/prx/libSceAppContent/Export.cpp: verified that sceAppContentDownloadDataGetAvailableSpaceKb accurately incorporates download0ExpandedMiB via std::max against GetAppDownloadDataSizeMiB_nid_postfix() and preserves the overflow safety check against std::numeric_limitsstd::uint64_t::max() / 1024u before computing KiB values.
    • core/libs/prx/libSceAppContent/include/Api.hpp: verified signature consistency between Api.hpp and Export.cpp across LP64 and LLP64 platforms, with all four modified exports accepting size_t size under extern "C".
    • core/libs/tests/GuestAppContent.cpp: verified rigorous test coverage for pre-initialization returns, zero-size handling, directory creation, space reporting with existing regular files, quota monotonicity under smaller expansions, and reachesService verification for throwing paths.
    • docs/dev/debt/libSceAppContent.md: verified adherence to AGENTS.md requirements with zero in-code comments, removal of the obsolete pending-exports debt entry, and accurate documentation of unverified hardware service handling and /download0 quota units.
  • Note: the AI-assisted checkbox can stay.

Looks Good To Me

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5907743212 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18116#pullrequestreview-5907743212). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-14T23:08:11Z. **Review:** APPROVED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `2c2efdb76b`: - **Conventions**: `tools/check_conventions.py` passed; `git diff --check` clean. - **Build**: `guest_appcontent_tests` built cleanly. - **CTest** (`guest_appcontent_download_0`, `guest_appcontent_download_1`, `guest_appcontent_download_18014398509481983`, `guest_appcontent_download_18014398509481984`, `guest_appcontent_download_18446744073709551615`, `guest_appcontent`, `guest_appcontent_license`, `guest_appcontent_entitlements`): ``` 1/8 Test #3078: guest_appcontent_download_18014398509481984 ...... Passed 0.02 sec 2/8 Test #3082: guest_appcontent_entitlements .................... Passed 0.04 sec 3/8 Test #3080: guest_appcontent ................................. Passed 0.03 sec 4/8 Test #3081: guest_appcontent_license ......................... Passed 0.03 sec 5/8 Test #3077: guest_appcontent_download_18014398509481983 ...... Passed 0.04 sec 6/8 Test #3079: guest_appcontent_download_18446744073709551615 ... Passed 0.03 sec 7/8 Test #3076: guest_appcontent_download_1 ...................... Passed 0.05 sec 8/8 Test #3075: guest_appcontent_download_0 ...................... Passed 0.03 sec 100% tests passed, 0 tests failed out of 8 ``` - **Negative control**: with `core/libs/prx/libSceAppContent/Export.cpp`, `core/libs/prx/libSceAppContent/include/Api.hpp` reverted to `main`, the new tests do not build/link without the change; restoring it makes them build and pass. - **Code reading**: - core/libs/prx/libSceAppContent/Export.cpp: verified that sceAppContentDownload0Expand, sceAppContentDownload0Shrink, sceAppContentDownload1Shrink, and sceAppContentDownload2Shrink check initialized.load() first and return SCE_APP_CONTENT_ERROR_NOT_INITIALIZED (0x80D90001) prior to any parameter validation or filesystem operations. - core/libs/prx/libSceAppContent/Export.cpp: verified that sceAppContentDownload2Shrink accurately rejects size == 0 with SCE_APP_CONTENT_ERROR_PARAMETER (0x80D90002), whereas sceAppContentDownload0Expand(0), sceAppContentDownload0Shrink, and sceAppContentDownload1Shrink throw via NotImplemented_nid_no_patch(__func__) per AGENTS.md guidelines and documented technical debt. - core/libs/prx/libSceAppContent/Export.cpp: verified atomic lock-free monotonicity for download0ExpandedMiB via compare_exchange_weak in sceAppContentDownload0Expand, ensuring race-free updates and that smaller subsequent expansion requests do not lower the quota. - core/libs/prx/libSceAppContent/Export.cpp: verified that sceAppContentDownloadDataGetAvailableSpaceKb accurately incorporates download0ExpandedMiB via std::max against GetAppDownloadDataSizeMiB_nid_postfix() and preserves the overflow safety check against std::numeric_limits<std::uint64_t>::max() / 1024u before computing KiB values. - core/libs/prx/libSceAppContent/include/Api.hpp: verified signature consistency between Api.hpp and Export.cpp across LP64 and LLP64 platforms, with all four modified exports accepting size_t size under extern "C". - core/libs/tests/GuestAppContent.cpp: verified rigorous test coverage for pre-initialization returns, zero-size handling, directory creation, space reporting with existing regular files, quota monotonicity under smaller expansions, and reachesService verification for throwing paths. - docs/dev/debt/libSceAppContent.md: verified adherence to AGENTS.md requirements with zero in-code comments, removal of the obsolete pending-exports debt entry, and accurate documentation of unverified hardware service handling and /download0 quota units. - Note: the AI-assisted checkbox can stay. Looks Good To Me
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!18116
No description provided.