Skip to content

feat(libSceNpCppWebApi): answer abort, getId and getResponse of never-started transactions as the module does - #12447

Closed
simnJS wants to merge 1 commit into
boykopovar:mainfrom
simnJS:feat/npcppwebapi-never-started-userprofile
Closed

simnJS wants to merge 1 commit into
boykopovar:mainfrom
simnJS:feat/npcppwebapi-never-started-userprofile

Conversation

@simnJS

@simnJS simnJS commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

What

Ten libSceNpCppWebApi exports on never-started transactions threw on main. They now give the answers the library's own module code gives for that state. A transaction never starts here: start and the API calls fail, so the two words its constructor zeroes stay null.

What stays throwing, from the same comment: start of these two transactions and DataApi::getMultiDataStatusesByUser. Past the LibContext checks, their answer comes from libSceNpWebApi2 and the service, which nothing measured shows. #10832 was closed for giving them NOT_SIGNED_IN without a source; this PR does not touch them.

Debt: the UserProfile entry no longer lists abort/getId as throwing, and a new entry records what is not read (the four UserProfile instantiations) and what still throws (the two starts and getMultiDataStatusesByUser).

tools/progress.py: libSceNpCppWebApi 484/751 → 494/751.

Tested

Windows 11 Pro 10.0.26200, WinLibs GCC 15.2.0 r7 (x86_64-ucrt-posix-seh), Release, BUILD_TESTING=ON, on main 750cf6cf48; the branch merges cleanly into the current main f3eb573e6f, whose newer commits do not touch libSceNpCppWebApi. No title run.

  • guest_np_cpp_web_api_signed_out (extended) and the library's other three tests, guest_np_cpp_web_api_offline, guest_np_cpp_web_api_intrusive_ptr and guest_np_cpp_web_api_string: pass, 20 runs each on this head (ctest --repeat until-fail:10 twice, with a rebuild in between).
  • The new checks cover:
    • the four UserProfile aborts returning 0x80553508 and the four getIds returning 0, next to the instantiations already checked;
    • getResponse on each of the two transactions after construction and finish: 0x80553508, a 0x18-byte response filled with a sentinel left untouched, and the transaction's 0x10 zeroed bytes and the bytes after them unchanged.
  • Control: each of the ten functions put back alone to main's throwing body (same declaration, so the test compiles) makes guest_np_cpp_web_api_signed_out fail with <that symbol> not implemented (exit 0xc0000409): 10 of 10, one rebuild each.
  • public_headers and public_headers_compile_*: 65/65 pass.
  • Full suites on GitHub runners at this head, from my fork:
    • Windows, the upstream build.yml in full mode: run 40718036566, build and every test pass.
    • Linux, Ubuntu 24.04 (a fork-only workflow): run 40718010092, 2721 tests. Two fail, neither from this change: conventions_ci_gate rejects that fork-only workflow file, and precise_wait also fails on the fork's main.
  • python tools/check_conventions.py --base origin/main with this title and body: all checks pass.
  • python tools/pr_overlap.py --branch feat/npcppwebapi-never-started-userprofile: only feat(libSceNpCppWebApi): track the remaining SessionManager V1 parameter lifecycles as the module does #11644, in docs/dev/debt/libSceNpCppWebApi.md. It rewrites the line just above the UserProfile entry this PR cuts, so git reports an adjacent conflict; keeping both edits resolves it. This PR goes after feat(libSceNpCppWebApi): track the remaining SessionManager V1 parameter lifecycles as the module does #11644 and will merge main once it lands. None of the seven open libSceNpCppWebApi PRs touches these ten functions.

Checklist

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The implementation scope and focused regression coverage are clear. One repository-required overlap follow-up remains: the PR itself reports an adjacent conflict with open #11644 in docs/dev/debt/libSceNpCppWebApi.md, and an exact git merge-tree --write-tree of the current heads confirms that this is the only conflict. CONTRIBUTING.md requires the authors to agree which overlapping PR goes first and record that order with Depends on.

Please coordinate the order with #11644's author and update the checklist line to match (for example, Depends on: #11644 if #11644 is to land first). The body currently says Depends on: none, so the recorded prerequisite does not reflect the known conflict. I found no code correctness issue in the reviewed hunks. This request is for the required merge-order coordination only.

@MarcZX10

Copy link
Copy Markdown
Contributor

Independent test follow-up on exact head ae0d01f4be: GuestNpCppWebApiSignedOut.cpp compiles with GCC 12/C++20, and the standalone test linked against the PR Export.cpp and passed (a temporary throwing handler was supplied only for unrelated no-patch exports). The sentinel response and transaction checks pass. This confirms the code path; my changes-requested review remains only for the #11644 debt-file merge-order agreement and checklist entry.

@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Progress report (4f41f4c → 596c792)

📈 System libraries: 26.67% (+0.03%, +10 implemented functions)

✅ 10 implemented
Library Name
libSceNpCppWebApi _ZN3sce2Np9CppWebApi6Common15TransactionBaseINS2_12IntrusivePtrINS1_11UserProfile2V118GetFriendsResponseEEENS4_INS2_18ResponseHeaderBaseEEEE5abortEv
libSceNpCppWebApi _ZN3sce2Np9CppWebApi6Common15TransactionBaseINS2_12IntrusivePtrINS1_11UserProfile2V124GetBlockingUsersResponseEEENS4_INS2_18ResponseHeaderBaseEEEE5abortEv
libSceNpCppWebApi _ZN3sce2Np9CppWebApi6Common15TransactionBaseINS2_12IntrusivePtrINS1_11UserProfile2V125GetBasicPresencesResponseEEENS4_INS2_18ResponseHeaderBaseEEEE5abortEv
libSceNpCppWebApi _ZN3sce2Np9CppWebApi6Common15TransactionBaseINS2_12IntrusivePtrINS1_11UserProfile2V125GetPublicProfilesResponseEEENS4_INS2_18ResponseHeaderBaseEEEE5abortEv
libSceNpCppWebApi _ZNK3sce2Np9CppWebApi6Common11TransactionINS2_12IntrusivePtrINS1_17TitleCloudStorage2V132GetMultiDataStatusesResponseBodyEEENS4_INS2_18ResponseHeaderBaseEEEE11getResponseERS8_
libSceNpCppWebApi _ZNK3sce2Np9CppWebApi6Common11TransactionINS2_12IntrusivePtrINS2_6VectorINS4_INS1_13InGameCatalog2V59ContainerEEEEEEENS4_INS2_18ResponseHeaderBaseEEEE11getResponseERSB_
libSceNpCppWebApi _ZNK3sce2Np9CppWebApi6Common15TransactionBaseINS2_12IntrusivePtrINS1_11UserProfile2V118GetFriendsResponseEEENS4_INS2_18ResponseHeaderBaseEEEE5getIdEv
libSceNpCppWebApi _ZNK3sce2Np9CppWebApi6Common15TransactionBaseINS2_12IntrusivePtrINS1_11UserProfile2V124GetBlockingUsersResponseEEENS4_INS2_18ResponseHeaderBaseEEEE5getIdEv
libSceNpCppWebApi _ZNK3sce2Np9CppWebApi6Common15TransactionBaseINS2_12IntrusivePtrINS1_11UserProfile2V125GetBasicPresencesResponseEEENS4_INS2_18ResponseHeaderBaseEEEE5getIdEv
libSceNpCppWebApi _ZNK3sce2Np9CppWebApi6Common15TransactionBaseINS2_12IntrusivePtrINS1_11UserProfile2V125GetPublicProfilesResponseEEENS4_INS2_18ResponseHeaderBaseEEEE5getIdEv
⚪ 10 behaviourally empty (constant return or throw)
Library Name
libSceNpCppWebApi _ZN3sce2Np9CppWebApi6Common15TransactionBaseINS2_12IntrusivePtrINS1_11UserProfile2V118GetFriendsResponseEEENS4_INS2_18ResponseHeaderBaseEEEE5abortEv
libSceNpCppWebApi _ZN3sce2Np9CppWebApi6Common15TransactionBaseINS2_12IntrusivePtrINS1_11UserProfile2V124GetBlockingUsersResponseEEENS4_INS2_18ResponseHeaderBaseEEEE5abortEv
libSceNpCppWebApi _ZN3sce2Np9CppWebApi6Common15TransactionBaseINS2_12IntrusivePtrINS1_11UserProfile2V125GetBasicPresencesResponseEEENS4_INS2_18ResponseHeaderBaseEEEE5abortEv
libSceNpCppWebApi _ZN3sce2Np9CppWebApi6Common15TransactionBaseINS2_12IntrusivePtrINS1_11UserProfile2V125GetPublicProfilesResponseEEENS4_INS2_18ResponseHeaderBaseEEEE5abortEv
libSceNpCppWebApi _ZNK3sce2Np9CppWebApi6Common11TransactionINS2_12IntrusivePtrINS1_17TitleCloudStorage2V132GetMultiDataStatusesResponseBodyEEENS4_INS2_18ResponseHeaderBaseEEEE11getResponseERS8_
libSceNpCppWebApi _ZNK3sce2Np9CppWebApi6Common11TransactionINS2_12IntrusivePtrINS2_6VectorINS4_INS1_13InGameCatalog2V59ContainerEEEEEEENS4_INS2_18ResponseHeaderBaseEEEE11getResponseERSB_
libSceNpCppWebApi _ZNK3sce2Np9CppWebApi6Common15TransactionBaseINS2_12IntrusivePtrINS1_11UserProfile2V118GetFriendsResponseEEENS4_INS2_18ResponseHeaderBaseEEEE5getIdEv
libSceNpCppWebApi _ZNK3sce2Np9CppWebApi6Common15TransactionBaseINS2_12IntrusivePtrINS1_11UserProfile2V124GetBlockingUsersResponseEEENS4_INS2_18ResponseHeaderBaseEEEE5getIdEv
libSceNpCppWebApi _ZNK3sce2Np9CppWebApi6Common15TransactionBaseINS2_12IntrusivePtrINS1_11UserProfile2V125GetBasicPresencesResponseEEENS4_INS2_18ResponseHeaderBaseEEEE5getIdEv
libSceNpCppWebApi _ZNK3sce2Np9CppWebApi6Common15TransactionBaseINS2_12IntrusivePtrINS1_11UserProfile2V125GetPublicProfilesResponseEEENS4_INS2_18ResponseHeaderBaseEEEE5getIdEv

Changed libraries (implemented exports)

Library Before After Change
libSceNpCppWebApi 873/1363 (64.05%) 883/1363 (64.78%) +0.73%

@simnJS

simnJS commented Oct 28, 2026

Copy link
Copy Markdown
Contributor Author

@MarcZX10 Thanks. I proposed the order on #11644 (comment): its stack lands first, and the checklist here now says Depends on: #11644. Once it is in, I'll merge main, keep its line and drop nothing else.

@adriadam10 adriadam10 self-assigned this Oct 28, 2026

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved at exact head ae0d01f4be. My earlier changes-requested point is resolved: the checklist now names Depends on: #11644, and the authors have agreed that #12447 lands first in that stack. I reviewed the ten state-specific exports and sentinel-preserving response tests, independently syntax-compiled the exact test source and ran it against the PR Export.cpp (the temporary handler only covered unrelated no-patch exports); it passed. Hosted Windows, conventions, intake, eligibility, labels and report checks are green; platform build jobs are workflow-skipped. No console run is claimed, and the #11644 dependency remains open.

@JJenkx

JJenkx commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Windows run of this head (ae0d01f4be), merged onto main 3a2b919816 (clean merge, local only). Windows 11 Enterprise 10.0.22621, Ryzen 9 5950X, WinLibs GCC 15.2.0 UCRT r7, Ninja, Release, BUILD_TESTING=ON, no Vulkan driver visible.

  • This PR: guest_np_cpp_web_api_signed_out passes 3 of 3 (ctest --repeat until-fail:3).
  • Negative control: not possible. With core/libs/prx/libSceNpCppWebApi/Export.cpp put back to main's version, the build fails against the rest of this PR, so there is no source-only control.

AI-assisted: yes (Claude Code).

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

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 13206 core/libs/prx/libSceNpCppWebApi/Export.cpp
core/libs/prx/libSceNpCppWebApi/include/Api.hpp
docs/dev/debt/libSceNpCppWebApi.md
PR 13486 core/libs/prx/libSceNpCppWebApi/Export.cpp
core/libs/prx/libSceNpCppWebApi/include/Api.hpp
docs/dev/debt/libSceNpCppWebApi.md
PR 14212 docs/dev/debt/libSceNpCppWebApi.md
PR 15029 core/libs/prx/libSceNpCppWebApi/Export.cpp
PR 15664 core/libs/prx/libSceNpCppWebApi/Export.cpp
PR 15808 core/libs/prx/libSceNpCppWebApi/Export.cpp
core/libs/prx/libSceNpCppWebApi/include/Api.hpp
docs/dev/debt/libSceNpCppWebApi.md
PR 15816 core/libs/prx/libSceNpCppWebApi/Export.cpp
core/libs/prx/libSceNpCppWebApi/include/Api.hpp
docs/dev/debt/libSceNpCppWebApi.md
PR 15823 core/libs/prx/libSceNpCppWebApi/Export.cpp
core/libs/prx/libSceNpCppWebApi/include/Api.hpp
docs/dev/debt/libSceNpCppWebApi.md
PR 15863 core/libs/prx/libSceNpCppWebApi/Export.cpp
core/libs/prx/libSceNpCppWebApi/include/Api.hpp
docs/dev/debt/libSceNpCppWebApi.md
PR 15885 core/libs/prx/libSceNpCppWebApi/Export.cpp
core/libs/prx/libSceNpCppWebApi/include/Api.hpp
docs/dev/debt/libSceNpCppWebApi.md
PR 16018 core/libs/prx/libSceNpCppWebApi/Export.cpp
core/libs/prx/libSceNpCppWebApi/include/Api.hpp
core/libs/tests/GuestNpCppWebApiSignedOut.cpp
docs/dev/debt/libSceNpCppWebApi.md
PR 16052 core/libs/prx/libSceNpCppWebApi/Export.cpp
core/libs/prx/libSceNpCppWebApi/include/Api.hpp
core/libs/tests/GuestNpCppWebApiSignedOut.cpp
docs/dev/debt/libSceNpCppWebApi.md
PR 16128 core/libs/prx/libSceNpCppWebApi/Export.cpp
core/libs/prx/libSceNpCppWebApi/include/Api.hpp
docs/dev/debt/libSceNpCppWebApi.md

@simnJS

simnJS commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

Merged current main (0836dfdf4f) to clear the conflict. The only conflict was docs/dev/debt/libSceNpCppWebApi.md: I kept the new "title-imported exports" entry from main unchanged, below this PR's two entries. Export.cpp, Api.hpp and GuestNpCppWebApiSignedOut.cpp merged without conflict, and each export this PR changes is still defined and declared once.

Tested on the merge (c736b324a4), Windows 11, WinLibs GCC 15.2.0, Release: the 9 guest_np_cpp_web_api_* tests pass 3 of 3 (ctest --repeat until-fail:3). check_conventions.py passes. The order with #11644 is unchanged.

@akkadbakkad89

Copy link
Copy Markdown
Contributor

Hi @simnJS — heads-up on landing order. Your dependency #11644 merged today, so this branch is now dirty against main and needs a rebase.

For the order we've agreed on the NpCppWebApi side (#10925 merged → #11221 → this → #14122 → #14136 → #14273), could you rebase onto current main — or, if you'd rather encode the order mechanically, onto #11221's head (4dce45f51830, open and clean)? I restacked #14122/#14136/#14273 on top of #11221 plus this PR's commit already, and the only conflict I hit cherry-picking it was a single debt-file entry — your TransactionBase and Transaction line next to the existing vector entries — so it should be a quick one.

Thanks!

@simnJS

simnJS commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

@akkadbakkad89 Rebased onto current main (6a62214), no longer conflicting. The only conflict was the debt entry you mentioned; guest_np_cpp_web_api_signed_out passes on Windows.

@simnJS
simnJS force-pushed the feat/npcppwebapi-never-started-userprofile branch from c736b32 to 6a62214 Compare November 2, 2026 21:58
@github-actions github-actions Bot added needs rebase Conflicts with main, rebase needed and removed needs rebase Conflicts with main, rebase needed labels Nov 2, 2026
@simnJS
simnJS force-pushed the feat/npcppwebapi-never-started-userprofile branch from 6a62214 to 596c792 Compare November 3, 2026 12:00
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 3, 2026
@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ AMD GPU test: passed

PR head 596c792 merged onto main 5b1d381 · tested 2026-11-04 11:44 UTC · 18 min

GPU AMD Radeon RX 6300 (RADV NAVI24), driver Mesa 25.2.8-0ubuntu0.24.04.4, Vulkan 1.4.318
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-42-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 1,130 passed · 4 failed (0 new, 3 also fail on main, 1 unstable on main) · 7 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 1,141 of 3,883 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (551 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.2 s, ⚠️ public_headers 79.0 s, ⚠️ agc_driver_image_sample_unnormalized 49.6 s, ⚠️ agc_driver_lazy_resolved_abi 44.3 s, ⚠️ agc_driver_sample_multisample_target 39.7 s
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_pipeline_journal: failed in 8 of the last 10 main runs
Failing on main too (3, not counted against this PR)
agc_driver_image_table
agc_driver_native_depth_bda_clear
agc_driver_native_multisample_depth
Passed on retry (1, failed in the parallel run, passed when re-run with a 360 s timeout; not counted against this PR)
vulkan_validation_gate_integration: Failed in the parallel run; also passed only on retry in 4 other runs in the last 7 days
Validation IDs already present on main (8 IDs in 469 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (469 tests): agc_driver_address_passes, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, agc_driver_bc_block_copy, agc_driver_bda_anchor_reads, agc_driver_bda_span_reads, agc_driver_bindless_images, and 461 more
VUID-vkCmdCopyImage-srcImage-01548 (4 tests): agc_driver_depth_clear_hle, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-vkCmdCopyImage-srcImage-01551 (4 tests): agc_driver_depth_clear_hle, agc_driver_depth_storage_dispatch, agc_driver_depth_surface_from_storage, agc_driver_dispatch_move_depth
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (2 tests): agc_driver_prepared_exports, agc_driver_srgb8_color_target
VUID-VkSamplerCreateInfo-addressModeU-01079 (1 test): agc_driver_image_gather_volume
VUID-VkSamplerCreateInfo-addressModeU-parameter (1 test): agc_driver_image_gather_volume
VUID-VkSamplerCreateInfo-addressModeV-parameter (1 test): agc_driver_image_gather_volume
VUID-VkSamplerCreateInfo-addressModeW-parameter (1 test): agc_driver_image_gather_volume
Skipped (7)
agc_driver_copied_writer_label_order: skipped, the device reports a minStorageBufferOffsetAlignment of 4, so the dispatch binds its record at +0x1004 in place and nothing is written back; the test needs an alignment above 4
agc_driver_float16_unused_nan_payloads: skipped, the device has no native f16 conversions with RTE rounding and kept f16 denormals
agc_driver_gcn_display_present: skipped, no display: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
agc_driver_linear_target_direct_write_completion: skipped, the device does not keep host imports write-watched, so no completion stamp over the target is tracked
agc_driver_ngg_vertex_wave_reduction: skipped, s3 describes a 32-lane wave only on 32-lane subgroups, and the device has 64 lanes
agc_driver_scattered_runs: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_sparse_dma_buf_import: skipped, host imports are unavailable: /dev/udmabuf is not accessible
Reproduce
git fetch origin 596c792ce611ef6196b1ca84c5b37f2977376ce8 5b1d381d5ad5d9f923326b18479c3bd889cdd588
git checkout 5b1d381d5ad5d9f923326b18479c3bd889cdd588 && git merge --no-ff 596c792ce611ef6196b1ca84c5b37f2977376ce8
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 12 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 16 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's AMD machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Nov 5, 2026
@simnJS simnJS closed this Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs needs rebase Conflicts with main, rebase needed prx

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants