Skip to content

feat(libSceNpWebApi2): implement sceNpWebApi2PushEventAbortHandle - #4375

Closed
milescoviello wants to merge 1 commit into
boykopovar:mainfrom
milescoviello:carry/npwebapi2-push-event-abort-4174
Closed

milescoviello wants to merge 1 commit into
boykopovar:mainfrom
milescoviello:carry/npwebapi2-push-event-abort-4174

Conversation

@milescoviello

@milescoviello milescoviello commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

What

Fixes #4174. Carries @screamm's fix branch from that issue (screamm:feat/npwebapi2-push-event-abort, 2d9c2e45), keeping the commit and its authorship as is, as the issue invites. It is cherry-picked onto current main; besides the commit's own code, only its TechnicalDebt edit changed, to follow the move to one file per library (#4411): the stub entry leaves docs/dev/debt/libSceNpWebApi2.md's Unknown function info and the new entry goes under that file's Functional section.

sceNpWebApi2PushEventAbortHandle (NID 1OLgvahaSco) threw NotImplemented; Planet Coaster (PPSA01736) imports it (import evidence from merged #3399). From the issue:

  • Push-event handles are now registered per library context on the existing context map and mutex, following shadPS4 np_web_api2_internal.cpp (abortPushEventHandle), np_web_api2_context.cpp and np_web_api2_push_event.cpp at e0a46675: CreateHandle returns LIB_CONTEXT_NOT_FOUND (0x80553404) for an unknown context and registers the handle; AbortHandle returns LIB_CONTEXT_NOT_FOUND / HANDLE_NOT_FOUND (0x8055340D) for an unknown context or handle and otherwise marks the handle aborted (idempotent, 0); CreateFilter on an aborted handle returns ABORTED (0x80553409); DeleteHandle validates the same way and removes the handle; Terminate drops the context's handles. In shadPS4 the only effect of abort is that ABORTED result, so registered callbacks are left alone; handle timeouts are not modelled. The codes are PS4 numbering, unverified on PS5 (TechnicalDebt). Note for reviewers: CreateHandle, DeleteHandle and CreateFilter previously accepted any id and now return these errors; the sibling GetMemoryPoolStats still throws for an unknown context, and the existing SCE_NP_WEBAPI2_ERROR_UNAVAILABLE (0x80553406) is shadPS4's REQUEST_NOT_FOUND, left unchanged.
  • guest_np_web_api2 covers two handles (abort one twice, filter creation ABORTED on it and unaffected on the other), the wrong-context, unknown-handle and unknown-context codes, delete then abort/delete again, and abort after Terminate.

Tested

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 in TechnicalDebt
  • 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
  • Unblocks: none
  • AI-assisted: yes

@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Progress report (1acfa7f → 2efa438)

📈 System libraries: 86.39% (+0.03%, +1 implemented functions)

✅ 1 implemented
Library Name
libSceNpWebApi2 sceNpWebApi2PushEventAbortHandle

@xXPBSXx

xXPBSXx commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Windows test: head 13d9cdd04 merged onto current main 3d8ffeb27 (clean merge, no conflicts). Windows 10, MinGW GCC (WinLibs), Ninja Release, -j4: full build 0 errors; ctest with the filter guest_np_web_api2: guest_np_web_api2 passed (1 test(s), 0 failed); python tools/check_conventions.py --base upstream/main passed. I did not run the new tests against main without the change.

AI-assisted (Claude Code).

Planet Coaster (PPSA01736) imports sceNpWebApi2PushEventAbortHandle
(NID 1OLgvahaSco, confirmed with tools/nid_names.py and aerolib); the
import audit in boykopovar#3399 resolves the NID to the throwing stub. No title
execution was captured.

Push event handles are now kept per library context: CreateHandle
registers them, DeleteHandle and Terminate drop them, AbortHandle marks
one as aborted and CreateFilter on an aborted handle returns ABORTED.
An unknown context returns LIB_CONTEXT_NOT_FOUND and an unknown handle
HANDLE_NOT_FOUND. Semantics and codes follow shadPS4
e0a466753a1aacbc8db8253be685bf7ab4d9daae (np_web_api2_internal.cpp
abortPushEventHandle, np_web_api2_context.cpp, np_web_api2_push_event.cpp,
np_error.h), PS4 and unverified on the PS5.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@github-actions github-actions Bot added needs rebase Conflicts with main, rebase needed labels Oct 12, 2026
@milescoviello
milescoviello force-pushed the carry/npwebapi2-push-event-abort-4174 branch from 13d9cdd to 2efa438 Compare October 12, 2026 18:45
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 12, 2026
@oneandonlydean oneandonlydean self-assigned this Oct 12, 2026
@github-actions

github-actions Bot commented Oct 12, 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
#4834 core/libs/tests/GuestNpWebApi2.cpp L17
docs/dev/debt/libSceNpWebApi2.md L5-6

@oneandonlydean

Copy link
Copy Markdown
Collaborator

Closing: PPSA01736 imports sceNpWebApi2PushEventAbortHandle but #4174 says the call has not been seen executing, and the commit also changes what CreateHandle, DeleteHandle and CreateFilter return for every title, from PS4 codes. #4188 carries the same commit. Reopen with the log line where a title stops at it on main.

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.

libSceNpWebApi2: sceNpWebApi2PushEventAbortHandle throws (Planet Coaster); fix branch ready

4 participants