Skip to content

feat(libSceNpCppWebApi): implement session leader account ID accessor - #15808

Open
JJenkx wants to merge 1 commit into
boykopovar:mainfrom
JJenkx:feat/npcwa-session-account-id-20261104
Open

JJenkx wants to merge 1 commit into
boykopovar:mainfrom
JJenkx:feat/npcwa-session-account-id-20261104

Conversation

@JJenkx

@JJenkx JJenkx commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

What

SessionManager2V1::LeaderWithOnlineId::getAccountId (sW6h+-un80k) now returns the model's full 64-bit account ID. It previously threw and had a placeholder int() declaration. The declaration and definition now take the implicit object as const void* and return std::uint64_t; memcpy reads the word without imposing host alignment or aliasing assumptions.

Static, NID-resolved comparison of the normalized libSceNpCppWebApi modules bundled with PPSA21564 and PPSA05347 shows the same complete five-byte getter: an unconditional 64-bit load from object+0x10 and return, with no calls or writes. The compiled Release implementation is byte-identical to both. Original container/normalized ELF/function hashes are in the evidence; no SDK binaries or extracted instructions are published. This is static reference analysis, not a console measurement or execution of the original modules.

The debt note records why nearby model fields still need investigation: PlayerSessionForRead::customData1IsSet has different offsets in those two modules (+0x1a0/+0x1e0). This patch adds no model construction, online response production, title unblock or performance claim.

Tested

Arch Linux x86-64, GCC 16.2.1, Release. Base main b11c7bf84f5d2f636ff60166cc3371bd071e24d5, change e3640c5c860e4490a1c974b4ae73de9ecefc1050.

  • Main and change: all 11 NpCppWebApi CTest groups pass, zero skips. The updated matchmaking fixture checks seven account IDs (including zero, values above 32 bits, the high bit and all bits set) and unchanged object/guard bytes.
  • Negative control: that new fixture against main's library fails at this exact export's not implemented refusal.
  • Public-header audit passes: 406 libraries / 28,350 exports. Conventions and diff checks pass.
  • Build scope: a scoped CMake harness includes the repository's current NpCppWebApi CMakeLists.txt and the three root-registered fixture owners, reusing an existing libc provider whose hash is recorded. This is not a fresh whole-project rebuild. An initial incomplete harness omitted an alias test's owning executable; that run is excluded and preserved, and both qualified arms include it.
  • Windows and title execution: not run for this change. No GPU execution or FPS claim.

Reference summaries, source diff, compiled-function comparison, build recipe, full logs and negative control, SHA-256 176f616f874b48084cbab63e3a12cb09f211ce505fc609f687cf7755e9459a51.

Overlap: checked 1,876 open heads. No confirmed duplicate/overlap was reported. The tool failed closed for #13486's inherited NpCppWebApi changes and #14212's debt formatting. I inspected the still-refusing account getter in #13486 and compared main+peer against change+peer for both branches; reversing only this topic's exact unique text blocks leaves their pre-existing merge conflicts unchanged (only conflict-label lines normalized). Those comparison receipts are attached; no combined runtime result is claimed. Related accessor stacks #14122/#14136/#14273 also still refuse this getter at their inspected heads and are not dependencies.

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

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown

Progress report (b11c7bf → e3640c5)

📈 System libraries: 26.71% (+0.0027%, +1 implemented functions)

✅ 1 implemented
Library Name
libSceNpCppWebApi _ZNK3sce2Np9CppWebApi14SessionManager2V118LeaderWithOnlineId12getAccountIdEv

Changed libraries (implemented exports)

Library Before After Change
libSceNpCppWebApi 884/1372 (64.43%) 885/1372 (64.50%) +0.07%

@JJenkx

JJenkx commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

Windows check for the scheduled cross-platform review, at head e3640c5c86 merged onto main b611e634f7 (a8c586445d, clean merge).

Setup: Windows 11 Enterprise 22621, WinLibs GCC 15.2 UCRT, Release. The hosted Windows check does not run this test on pull requests.

  • guest_np_cpp_web_api_matchmaking passes in 3 of 3 runs.

AI-assisted: yes.

@github-actions

github-actions Bot commented Nov 7, 2026

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 15998 core/libs/prx/libSceNpCppWebApi/Export.cpp L3166-3168 _ZNK3sce2Np9CppWebApi14SessionManager2V118LeaderWithOnlineId12getAccountIdEv
PR 16052 docs/dev/debt/libSceNpCppWebApi.md L18

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 14212 docs/dev/debt/libSceNpCppWebApi.md
PR 15029 core/libs/prx/libSceNpCppWebApi/Export.cpp
core/libs/tests/GuestNpCppWebApiMatchmaking.cpp
docs/dev/debt/libSceNpCppWebApi.md
PR 16436 core/libs/prx/libSceNpCppWebApi/Export.cpp

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant