feat(libSceNpCommon): implement sce::np::MemoryStreamReader and MemoryStreamWriter #13281

Merged
hypermoist merged 3 commits from upstream-pr/13281 into main 2026-10-30 16:27:24 +00:00
hypermoist commented 2026-10-30 11:41:38 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by hypermoist on 2026-10-30T11:41:38Z.


What

Implements sce::np::MemoryStreamReader and sce::np::MemoryStreamWriter (12 exports) from libSceNpCommon.sprx of firmware 13.60 (read from disassembly, not measured on a console).

  • Already stubs on main: 6 had placeholder int (void) declarations: reader C1 and D0; writer D0, D1, D2 and Write.
  • Missing from AnyPS5: the other 6 are exported by the module but were not declared: reader C2, D1, D2 and Read; writer C1 and C2.

Layout (declared in Api.hpp as NpMemoryStreamReader / NpMemoryStreamWriter, 32 bytes): vtable, buffer pointer, size, position. The reader vtable is {0, 0, D1, D0, Read}, the writer one {0, 0, D1, D0, Write}.

  • C1/C2 (buffer, size): set the vtable, buffer and size, and position 0.
  • D1/D2: do nothing. D0 frees through the global operator delete(void*, size_t) with size 0x20 (libc's _ZdlPvm).
  • Read(Handle*, void* out, size_t n, size_t* read): copies min(n, size - position) bytes when the position is below the size, otherwise 0, and advances the position. It always writes the count through read and returns 0.
  • Write(Handle*, const void* data, size_t n, size_t* written):
    • with a buffer, the room is size - position unsigned, or 0 when the size is 0. If n exceeds it, it returns 0x80559E0D and changes nothing; otherwise it copies;
    • with a null buffer, it only counts;
    • it then advances the position by n and writes n through written when that is not null.
  • The Handle* argument is ignored by both.

The debt file records the asymmetries kept from the module: Read does not check its count pointer, and a position past a non-zero size is not refused by Write.

Tested

Linux (CachyOS, GCC 16.2, Release): ctest --test-dir build -R 'np_common|public_headers' --output-on-failure, 70/70 passed. The full suite passed apart from guest_freetype, which fails the same way here because my local 3rdparty/freetype checkout is not at the pinned commit; this PR does not touch FreeType.

Firmware differential: 13,400 cases, run from the module's code under unicorn and replayed through this implementation, with 0 mismatches.

  • Constructors: 2,400 cases over random pointers and sizes; the 24 bytes after the vtable are compared.
  • Read: 5,000 cases over sizes 0–127, positions below, at and past the end, and counts up to 150. The position, the reported count and the destination with an 8-byte 0xCC margin are compared.
  • Write: 6,000 cases, of which 1,946 are refused with 0x80559E0D. They cover null buffers, size 0, positions past the end, and calls with and without a count pointer. The position, the reported count and the whole stream buffer are compared.
  • The prior object state is an input column. A copy with 2% of the expected outputs corrupted gives 235 mismatches.
  • The generator is np_memory_stream_make_cases.py (with np_memory_stream_replay.cpp) in this gist, with the emucall.py runner. It needs a decrypted module, which is not attached.

Guest test: TestMemoryStreams in GuestNpCommonRuntime.cpp checks:

  • reads through the vtable, a read cut at the end, and an exhausted reader;
  • a write through the vtable, a refused write leaving the count and position alone, and an exact fill without a count pointer;
  • size 0 with a moved position;
  • a null-buffer writer that only counts;
  • the D1/D2 destructors leaving the objects untouched.

D0 is not run in the test: libc's global operator new needs the application heap's process parameters, which this test executable does not set up.

Mutation check: I changed 6 single lines, one at a time. The test and the differential both catch 5:

  • min dropped from Read;
  • <= for the room check;
  • the size-0 rule dropped;
  • the position not advanced in Write;
  • 0 reported as the written count.

The survivor, position <= size in Read, is equivalent: at the end it copies 0 bytes either way.

Windows not built. Not run on a console.

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.
    • This PR lands before #13120. #13120 declares 6 of these exports as NotImplemented stubs (reader C2, D1, D2, Read; writer C1, C2), so it drops them from InventoryExports.cpp after this lands. #13120 already does the same for #13130's exports and declares Depends on: #13130. Agreed with its author (comment): #13120 has removed these declarations and declares Depends on: #13130, #13270, #13277, #13281.
    • #12823, #12839, #12852, #12859, #12899, #12919, #13130, #13270 and #13277 touch neighbouring stub, declaration, test or debt lines and share no exports. Either order works; whichever lands second needs a trivial merge, and I will do it on mine.
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

Assisted With AI: Yes. All tests were run locally on computer hardware (AMD Ryzen 5 5600G, 32 GB RAM, NVIDIA GeForce RTX 3060, CachyOS Linux 7.3, GCC 16.2), not on an actual console.

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5083761869 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13281). Originally posted by [hypermoist](https://github.com/hypermoist) on 2026-10-30T11:41:38Z. --- ### What Implements `sce::np::MemoryStreamReader` and `sce::np::MemoryStreamWriter` (12 exports) from `libSceNpCommon.sprx` of firmware 13.60 (read from disassembly, not measured on a console). - **Already stubs on `main`:** 6 had placeholder `int (void)` declarations: reader `C1` and `D0`; writer `D0`, `D1`, `D2` and `Write`. - **Missing from AnyPS5:** the other 6 are exported by the module but were not declared: reader `C2`, `D1`, `D2` and `Read`; writer `C1` and `C2`. **Layout** (declared in `Api.hpp` as `NpMemoryStreamReader` / `NpMemoryStreamWriter`, 32 bytes): vtable, buffer pointer, size, position. The reader vtable is `{0, 0, D1, D0, Read}`, the writer one `{0, 0, D1, D0, Write}`. - **C1/C2 `(buffer, size)`:** set the vtable, buffer and size, and position 0. - **D1/D2:** do nothing. **D0** frees through the global `operator delete(void*, size_t)` with size `0x20` (libc's `_ZdlPvm`). - **`Read(Handle*, void* out, size_t n, size_t* read)`:** copies `min(n, size - position)` bytes when the position is below the size, otherwise 0, and advances the position. It always writes the count through `read` and returns 0. - **`Write(Handle*, const void* data, size_t n, size_t* written)`:** - with a buffer, the room is `size - position` unsigned, or 0 when the size is 0. If `n` exceeds it, it returns `0x80559E0D` and changes nothing; otherwise it copies; - with a null buffer, it only counts; - it then advances the position by `n` and writes `n` through `written` when that is not null. - The `Handle*` argument is ignored by both. The debt file records the asymmetries kept from the module: `Read` does not check its count pointer, and a position past a non-zero size is not refused by `Write`. ### Tested Linux (CachyOS, GCC 16.2, Release): `ctest --test-dir build -R 'np_common|public_headers' --output-on-failure`, 70/70 passed. The full suite passed apart from `guest_freetype`, which fails the same way here because my local `3rdparty/freetype` checkout is not at the pinned commit; this PR does not touch FreeType. **Firmware differential:** 13,400 cases, run from the module's code under unicorn and replayed through this implementation, with 0 mismatches. - **Constructors:** 2,400 cases over random pointers and sizes; the 24 bytes after the vtable are compared. - **`Read`:** 5,000 cases over sizes 0–127, positions below, at and past the end, and counts up to 150. The position, the reported count and the destination with an 8-byte `0xCC` margin are compared. - **`Write`:** 6,000 cases, of which 1,946 are refused with `0x80559E0D`. They cover null buffers, size 0, positions past the end, and calls with and without a count pointer. The position, the reported count and the whole stream buffer are compared. - The prior object state is an input column. A copy with 2% of the expected outputs corrupted gives 235 mismatches. - The generator is `np_memory_stream_make_cases.py` (with `np_memory_stream_replay.cpp`) in [this gist](https://gist.github.com/hypermoist/1834cf221fd737cdb4cca272cc1156d1), with the `emucall.py` runner. It needs a decrypted module, which is not attached. **Guest test:** `TestMemoryStreams` in `GuestNpCommonRuntime.cpp` checks: - reads through the vtable, a read cut at the end, and an exhausted reader; - a write through the vtable, a refused write leaving the count and position alone, and an exact fill without a count pointer; - size 0 with a moved position; - a null-buffer writer that only counts; - the D1/D2 destructors leaving the objects untouched. `D0` is not run in the test: libc's global `operator new` needs the application heap's process parameters, which this test executable does not set up. **Mutation check:** I changed 6 single lines, one at a time. The test and the differential both catch 5: - `min` dropped from `Read`; - `<=` for the room check; - the size-0 rule dropped; - the position not advanced in `Write`; - 0 reported as the written count. The survivor, `position <= size` in `Read`, is equivalent: at the end it copies 0 bytes either way. Windows not built. Not run on a console. ### 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. - **This PR lands before #13120.** #13120 declares 6 of these exports as `NotImplemented` stubs (reader `C2`, `D1`, `D2`, `Read`; writer `C1`, `C2`), so it drops them from `InventoryExports.cpp` after this lands. #13120 already does the same for #13130's exports and declares `Depends on: #13130`. Agreed with its author ([comment](https://github.com/boykopovar/AnyPS5/pull/13120#issuecomment-6522956813)): #13120 has removed these declarations and declares `Depends on: #13130, #13270, #13277, #13281`. - #12823, #12839, #12852, #12859, #12899, #12919, #13130, #13270 and #13277 touch neighbouring stub, declaration, test or debt lines and share no exports. Either order works; whichever lands second needs a trivial merge, and I will do it on mine. - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes Assisted With AI: Yes. All tests were run locally on computer hardware (AMD Ryzen 5 5600G, 32 GB RAM, NVIDIA GeForce RTX 3060, CachyOS Linux 7.3, GCC 16.2), not on an actual console. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MarcZX10 commented 2026-10-30 11:56:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-30T11:56:26Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

The implementation has extensive author-reported tests, but its landing order with #13120 is still awaiting agreement despite six identical exports.

What I ran

Reviewed head 38bd414bee3ca9de3a1483ccd05e69f1e392f35e against PR base 1c6b316cf762c7a8d34623907d62bc1cba2217b6; the current-main merge preview against 51c31ea17e9f66cb36fe9655ec31c81610bfcfc9 was clean. Environment: Debian 12 x86-64, Python 3.11.2, Git 2.39.5. I inspected the implementation and guest assertions but did not build or run C++ tests.

git diff --check 1c6b316cf762c7a8d34623907d62bc1cba2217b6...38bd414bee3ca9de3a1483ccd05e69f1e392f35e
python3 tools/check_conventions.py --base 1c6b316cf762c7a8d34623907d62bc1cba2217b6 --head 38bd414bee3ca9de3a1483ccd05e69f1e392f35e --title 'feat(libSceNpCommon): implement sce::np::MemoryStreamReader and MemoryStreamWriter' --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13281-38bd414bee3c/pr-body.md
python3 tools/pr_abi_audit.py --repo /marc/AnyPS5 --base 1c6b316cf762c7a8d34623907d62bc1cba2217b6 --head 38bd414bee3ca9de3a1483ccd05e69f1e392f35e --json > /tmp/abi-13281.json
python3 -c 'import json; d=json.load(open("/tmp/abi-13281.json")); print("status:", d["status"]); print("symbols:", len(d["symbols"])); print("findings:", d["findings"])'
git grep -n 'MemoryStream' 7f86a794b342b40790bd32bb8b9c2e91208f3fb0 -- core/libs/prx/libSceNpCommon/InventoryExports.cpp core/libs/prx/libSceNpCommon/PendingExportsRound7.cpp
python3 tools/pr_stack_check.py 13281 --repo boykopovar/AnyPS5 --output-dir /tmp/stack-13281-latest

Results

Check Result
Diff whitespace and conventions Passed.
ABI audit passed_with_warnings for 319 symbols; seven lexical warnings identify internal helper definitions without public-header declarations. The audit does not prove binary ABI correctness.
Current-main merge preview Clean at 51c31ea17e9f66cb36fe9655ec31c81610bfcfc9.
Test registration and implementation The guest test calls TestMemoryStreams; I inspected reader/writer bounds, return/count behavior, and the new assertions. I did not run these C++ tests.
Author-reported tests Linux/GCC Release `np_common
Hosted CI Conventions, intake, eligibility, and progress report passed; Windows and labels were pending. Linux and specialized jobs were skipped.
Unedited local output
All conventions checks passed.
status: passed_with_warnings
symbols: 319
findings: [{'symbol': 'CalloutThread', 'kind': 'public-declaration-not-found', 'message': 'No APS5_VABI declaration was found in a header; verify whether this is intentionally private or missing from the public interface.'}, {'symbol': 'HeapAllocate', 'kind': 'public-declaration-not-found', 'message': 'No APS5_VABI declaration was found in a header; verify whether this is intentionally private or missing from the public interface.'}, {'symbol': 'HeapReallocate', 'kind': 'public-declaration-not-found', 'message': 'No APS5_VABI declaration was found in a header; verify whether this is intentionally private or missing from the public interface.'}, {'symbol': 'HeapRelease', 'kind': 'public-declaration-not-found', 'message': 'No APS5_VABI declaration was found in a header; verify whether this is intentionally private or missing from the public interface.'}, {'symbol': 'MemoryHeapAllocate', 'kind': 'public-declaration-not-found', 'message': 'No APS5_VABI declaration was found in a header; verify whether this is intentionally private or missing from the public interface.'}, {'symbol': 'MemoryHeapReallocate', 'kind': 'public-declaration-not-found', 'message': 'No APS5_VABI declaration was found in a header; verify whether this is intentionally private or missing from the public interface.'}, {'symbol': 'MemoryHeapRelease', 'kind': 'public-declaration-not-found', 'message': 'No APS5_VABI declaration was found in a header; verify whether this is intentionally private or missing from the public interface.'}]

Findings

Blocking

The PR says Depends on: none, but it overlaps #13120 on six exact MemoryStream exports. The #13120 author has a current comment proposing that #13281 land first and that #13120 then drop those six stubs, and is explicitly awaiting agreement. The repository requires authors to agree on the order for overlapping exports and record the dependency/order on the checklist. Please confirm the proposed order with the #13120 author and record the agreed relationship; if #13120 lands first instead, update this PR against it and declare that dependency.

Non-blocking

The reported differential and focused test coverage is detailed, but it has not been independently reproduced here. The D0 destructor is also explicitly untested in the guest test because the test executable lacks the application heap setup.

Sources

Not verified

I did not build or run the C++ tests, reproduce the firmware differential, test Windows or console behavior, or observe hosted Windows CI completion. The isolated precheck could not run its ABI and test-quality helper scripts because they are absent from that checkout; I ran the ABI audit from the workspace. Linux and specialized hosted jobs were skipped.

To get this to a good state

Please get agreement on which PR lands first for the six shared exports and record that order and any dependency in the checklist. I will rerun the diff, conventions, ABI, and dependency checks on the updated head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5711880360 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13281#pullrequestreview-5711880360). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-30T11:56:26Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested The implementation has extensive author-reported tests, but its landing order with #13120 is still awaiting agreement despite six identical exports. ## What I ran Reviewed head `38bd414bee3ca9de3a1483ccd05e69f1e392f35e` against PR base `1c6b316cf762c7a8d34623907d62bc1cba2217b6`; the current-main merge preview against `51c31ea17e9f66cb36fe9655ec31c81610bfcfc9` was clean. Environment: Debian 12 x86-64, Python 3.11.2, Git 2.39.5. I inspected the implementation and guest assertions but did not build or run C++ tests. ```sh git diff --check 1c6b316cf762c7a8d34623907d62bc1cba2217b6...38bd414bee3ca9de3a1483ccd05e69f1e392f35e python3 tools/check_conventions.py --base 1c6b316cf762c7a8d34623907d62bc1cba2217b6 --head 38bd414bee3ca9de3a1483ccd05e69f1e392f35e --title 'feat(libSceNpCommon): implement sce::np::MemoryStreamReader and MemoryStreamWriter' --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13281-38bd414bee3c/pr-body.md python3 tools/pr_abi_audit.py --repo /marc/AnyPS5 --base 1c6b316cf762c7a8d34623907d62bc1cba2217b6 --head 38bd414bee3ca9de3a1483ccd05e69f1e392f35e --json > /tmp/abi-13281.json python3 -c 'import json; d=json.load(open("/tmp/abi-13281.json")); print("status:", d["status"]); print("symbols:", len(d["symbols"])); print("findings:", d["findings"])' git grep -n 'MemoryStream' 7f86a794b342b40790bd32bb8b9c2e91208f3fb0 -- core/libs/prx/libSceNpCommon/InventoryExports.cpp core/libs/prx/libSceNpCommon/PendingExportsRound7.cpp python3 tools/pr_stack_check.py 13281 --repo boykopovar/AnyPS5 --output-dir /tmp/stack-13281-latest ``` ## Results | Check | Result | |---|---| | Diff whitespace and conventions | Passed. | | ABI audit | `passed_with_warnings` for 319 symbols; seven lexical warnings identify internal helper definitions without public-header declarations. The audit does not prove binary ABI correctness. | | Current-main merge preview | Clean at `51c31ea17e9f66cb36fe9655ec31c81610bfcfc9`. | | Test registration and implementation | The guest test calls `TestMemoryStreams`; I inspected reader/writer bounds, return/count behavior, and the new assertions. I did not run these C++ tests. | | Author-reported tests | Linux/GCC Release `np_common|public_headers`: 70/70; author also reports 13,400 firmware-differential cases with zero mismatches and mutation results. These were not independently run. | | Hosted CI | Conventions, intake, eligibility, and progress report passed; Windows and labels were pending. Linux and specialized jobs were skipped. | <details> <summary>Unedited local output</summary> ```text All conventions checks passed. ``` ```text status: passed_with_warnings symbols: 319 findings: [{'symbol': 'CalloutThread', 'kind': 'public-declaration-not-found', 'message': 'No APS5_VABI declaration was found in a header; verify whether this is intentionally private or missing from the public interface.'}, {'symbol': 'HeapAllocate', 'kind': 'public-declaration-not-found', 'message': 'No APS5_VABI declaration was found in a header; verify whether this is intentionally private or missing from the public interface.'}, {'symbol': 'HeapReallocate', 'kind': 'public-declaration-not-found', 'message': 'No APS5_VABI declaration was found in a header; verify whether this is intentionally private or missing from the public interface.'}, {'symbol': 'HeapRelease', 'kind': 'public-declaration-not-found', 'message': 'No APS5_VABI declaration was found in a header; verify whether this is intentionally private or missing from the public interface.'}, {'symbol': 'MemoryHeapAllocate', 'kind': 'public-declaration-not-found', 'message': 'No APS5_VABI declaration was found in a header; verify whether this is intentionally private or missing from the public interface.'}, {'symbol': 'MemoryHeapReallocate', 'kind': 'public-declaration-not-found', 'message': 'No APS5_VABI declaration was found in a header; verify whether this is intentionally private or missing from the public interface.'}, {'symbol': 'MemoryHeapRelease', 'kind': 'public-declaration-not-found', 'message': 'No APS5_VABI declaration was found in a header; verify whether this is intentionally private or missing from the public interface.'}] ``` </details> ## Findings ### Blocking The PR says `Depends on: none`, but it overlaps #13120 on six exact MemoryStream exports. The #13120 author has a current comment proposing that #13281 land first and that #13120 then drop those six stubs, and is explicitly awaiting agreement. The repository requires authors to agree on the order for overlapping exports and record the dependency/order on the checklist. Please confirm the proposed order with the #13120 author and record the agreed relationship; if #13120 lands first instead, update this PR against it and declare that dependency. ### Non-blocking The reported differential and focused test coverage is detailed, but it has not been independently reproduced here. The D0 destructor is also explicitly untested in the guest test because the test executable lacks the application heap setup. ## Sources - [MemoryStream exports in #13120's exact current head](https://github.com/boykopovar/AnyPS5/blob/7f86a794b342b40790bd32bb8b9c2e91208f3fb0/core/libs/prx/libSceNpCommon/InventoryExports.cpp#L755-L775). - [The #13120 author's pending landing-order proposal](https://github.com/boykopovar/AnyPS5/pull/13120#issuecomment-6522025174). - [Repository rule for coordinating overlapping lines or exports](https://github.com/boykopovar/AnyPS5/blob/51c31ea17e9f66cb36fe9655ec31c81610bfcfc9/CONTRIBUTING.md#L64-L70). - [MemoryStream implementation and tests at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/38bd414bee3ca9de3a1483ccd05e69f1e392f35e/core/libs/prx/libSceNpCommon/Runtime.cpp#L846-L903) and [guest assertions](https://github.com/boykopovar/AnyPS5/blob/38bd414bee3ca9de3a1483ccd05e69f1e392f35e/core/libs/tests/GuestNpCommonRuntime.cpp#L524-L579). ## Not verified I did not build or run the C++ tests, reproduce the firmware differential, test Windows or console behavior, or observe hosted Windows CI completion. The isolated precheck could not run its ABI and test-quality helper scripts because they are absent from that checkout; I ran the ABI audit from the workspace. Linux and specialized hosted jobs were skipped. ## To get this to a good state Please get agreement on which PR lands first for the six shared exports and record that order and any dependency in the checklist. I will rerun the diff, conventions, ABI, and dependency checks on the updated head.
MarcZX10 commented 2026-10-30 12:22:53 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-30T12:22:53Z.

Review: CHANGES_REQUESTED


Re-checked — new head, changes still needed

At head c3d3296c56cff04d5705460d7cc67282dc56aaee, the MemoryStream implementation is unchanged, but its proposed landing order remains unconfirmed and the branch now conflicts with current main.

What I ran

Head: c3d3296c56cff04d5705460d7cc67282dc56aaee; PR base SHA reported by GitHub: 51c31ea17e9f66cb36fe9655ec31c81610bfcfc9. Current main at the check was 42d009f5f37c8f388b01fbfe38d2e704c792c46f. I used Linux x86_64 / Python 3.11.2. No local build or C++ tests were run.

python3 tools/check_conventions.py --base 51c31ea17e9f66cb36fe9655ec31c81610bfcfc9
python3 tools/pr_abi_audit.py --base 51c31ea17e9f66cb36fe9655ec31c81610bfcfc9 --head c3d3296c56cff04d5705460d7cc67282dc56aaee --json
git diff --check 51c31ea17e9f66cb36fe9655ec31c81610bfcfc9...c3d3296c56cff04d5705460d7cc67282dc56aaee
git merge-tree --write-tree 42d009f5f37c8f388b01fbfe38d2e704c792c46f c3d3296c56cff04d5705460d7cc67282dc56aaee
python3 tools/pr_stack_check.py 13281 --repo boykopovar/AnyPS5

Results

Check Result
Conventions Passed.
Diff check Passed.
ABI audit passed_with_warnings for 319 symbols; the seven warnings are the same private helper definitions previously inspected, not the 12 MemoryStream exports.
Current-main merge preview Conflicts in Runtime.cpp, include/Api.hpp, GuestNpCommonRuntime.cpp, and docs/dev/debt/libSceNpCommon.md. The isolated merge preview confirms content conflicts, so this is no longer only a behind-main condition.
Test-quality helper Unavailable in the isolated PR checkout because the local-only script is absent.
Author-reported recheck The author reports `np_common
Hosted CI At the latest snapshot, checks had been restarted for the new head; Linux and specialized jobs were skipped.
Unedited merge-conflict summary
CONFLICT (content): Merge conflict in core/libs/prx/libSceNpCommon/Runtime.cpp
CONFLICT (content): Merge conflict in core/libs/prx/libSceNpCommon/include/Api.hpp
CONFLICT (content): Merge conflict in core/libs/tests/GuestNpCommonRuntime.cpp
CONFLICT (content): Merge conflict in docs/dev/debt/libSceNpCommon.md

Negative control

No new negative control was run locally. The previous mutation results remain author-reported; the PR-specific files did not change between the previously reviewed head and this merge commit.

Findings

Blocking

  1. The proposed order with #13120 is not agreed yet. #13281's author says they proposed that it land before #13120 and that kyon-eth has not replied. The latest #13120 comment from #13281’s author repeats the request but says the reviewers are still waiting for an agreed order; it is not a confirmation from kyon-eth. Please get an explicit answer and record the agreed order; until then the duplicate exports can be selected by whichever PR lands first.
  2. The new head merges main only through 51c31ea, while current main is 42d009f. A clean merge preview now reports content conflicts in the four files listed above, including the files changed by this PR. Please update the branch and resolve them against current main before approval.

Non-blocking

The source and tests for the MemoryStream feature are unchanged in the new merge commit. The author reports rerunning the focused tests and firmware differential on this head; I did not independently reproduce them.

Sources

Not verified

I did not build or run the C++ tests, reproduce the firmware differential, run Windows tests, or test on a console. Linux and specialized hosted jobs were skipped. The ABI helper's warnings do not establish ABI correctness.

To get this to a good state

Please confirm the landing order with the #13120 author, record it in the checklist, and update this branch onto current main resolving the four conflicts. On the new head I will rerun conventions, ABI audit, diff check, and the dependency/mergeability check; the same focused test command and differential evidence should be reported for that head.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5712165272 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/13281#pullrequestreview-5712165272). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-30T12:22:53Z. **Review:** CHANGES_REQUESTED --- # Re-checked — new head, changes still needed At head `c3d3296c56cff04d5705460d7cc67282dc56aaee`, the MemoryStream implementation is unchanged, but its proposed landing order remains unconfirmed and the branch now conflicts with current `main`. ## What I ran Head: `c3d3296c56cff04d5705460d7cc67282dc56aaee`; PR base SHA reported by GitHub: `51c31ea17e9f66cb36fe9655ec31c81610bfcfc9`. Current `main` at the check was `42d009f5f37c8f388b01fbfe38d2e704c792c46f`. I used Linux x86_64 / Python 3.11.2. No local build or C++ tests were run. ```sh python3 tools/check_conventions.py --base 51c31ea17e9f66cb36fe9655ec31c81610bfcfc9 python3 tools/pr_abi_audit.py --base 51c31ea17e9f66cb36fe9655ec31c81610bfcfc9 --head c3d3296c56cff04d5705460d7cc67282dc56aaee --json git diff --check 51c31ea17e9f66cb36fe9655ec31c81610bfcfc9...c3d3296c56cff04d5705460d7cc67282dc56aaee git merge-tree --write-tree 42d009f5f37c8f388b01fbfe38d2e704c792c46f c3d3296c56cff04d5705460d7cc67282dc56aaee python3 tools/pr_stack_check.py 13281 --repo boykopovar/AnyPS5 ``` ## Results | Check | Result | |---|---| | Conventions | Passed. | | Diff check | Passed. | | ABI audit | `passed_with_warnings` for 319 symbols; the seven warnings are the same private helper definitions previously inspected, not the 12 MemoryStream exports. | | Current-main merge preview | Conflicts in `Runtime.cpp`, `include/Api.hpp`, `GuestNpCommonRuntime.cpp`, and `docs/dev/debt/libSceNpCommon.md`. The isolated merge preview confirms content conflicts, so this is no longer only a behind-main condition. | | Test-quality helper | Unavailable in the isolated PR checkout because the local-only script is absent. | | Author-reported recheck | The author reports `np_common|public_headers` 70/70, `guest_np_common_runtime` 3/3, and 13,400 differential cases with zero mismatches on this new head. These were not independently run here. | | Hosted CI | At the latest snapshot, checks had been restarted for the new head; Linux and specialized jobs were skipped. | <details><summary>Unedited merge-conflict summary</summary> ```text CONFLICT (content): Merge conflict in core/libs/prx/libSceNpCommon/Runtime.cpp CONFLICT (content): Merge conflict in core/libs/prx/libSceNpCommon/include/Api.hpp CONFLICT (content): Merge conflict in core/libs/tests/GuestNpCommonRuntime.cpp CONFLICT (content): Merge conflict in docs/dev/debt/libSceNpCommon.md ``` </details> ## Negative control No new negative control was run locally. The previous mutation results remain author-reported; the PR-specific files did not change between the previously reviewed head and this merge commit. ## Findings ### Blocking 1. The proposed order with #13120 is not agreed yet. #13281's author says they proposed that it land before #13120 and that kyon-eth has not replied. The latest #13120 comment from #13281’s author repeats the request but says the reviewers are still waiting for an agreed order; it is not a confirmation from kyon-eth. Please get an explicit answer and record the agreed order; until then the duplicate exports can be selected by whichever PR lands first. 2. The new head merges `main` only through `51c31ea`, while current `main` is `42d009f`. A clean merge preview now reports content conflicts in the four files listed above, including the files changed by this PR. Please update the branch and resolve them against current `main` before approval. ### Non-blocking The source and tests for the MemoryStream feature are unchanged in the new merge commit. The author reports rerunning the focused tests and firmware differential on this head; I did not independently reproduce them. ## Sources - [MemoryStream changes at the reviewed head](https://github.com/boykopovar/AnyPS5/tree/c3d3296c56cff04d5705460d7cc67282dc56aaee/core/libs/prx/libSceNpCommon) - [Current-main conflict and dependency request on #13120](https://github.com/boykopovar/AnyPS5/pull/13120#issuecomment-6522668428) - [Repository rule for agreeing on overlapping exports and declaring order](https://github.com/boykopovar/AnyPS5/blob/42d009f5f37c8f388b01fbfe38d2e704c792c46f/CONTRIBUTING.md#L64-L70) ## Not verified I did not build or run the C++ tests, reproduce the firmware differential, run Windows tests, or test on a console. Linux and specialized hosted jobs were skipped. The ABI helper's warnings do not establish ABI correctness. ## To get this to a good state Please confirm the landing order with the #13120 author, record it in the checklist, and update this branch onto current `main` resolving the four conflicts. On the new head I will rerun conventions, ABI audit, diff check, and the dependency/mergeability check; the same focused test command and differential evidence should be reported for that 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!13281
No description provided.