Skip to content

docs(dev): point the call-site example at a stub that still throws - #12534

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
dantdmdarealguy:docs/re-call-site-example
Oct 28, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
dantdmdarealguy:docs/re-call-site-example

Conversation

@dantdmdarealguy

Copy link
Copy Markdown
Contributor

What

docs/dev/REVERSE_ENGINEERING.md ("What a call site settles") cites libSceAudioIn as the example of an export whose signature came from a call site and which still throws because the result's meaning did not. When the guide was merged (#9021, 2026-10-21) that was sceAudioInIsPadEmbeddedMic: its debt entry said the signature came from the PPSA26344 call site in #2355 and that it "still throws rather than invent one". #8938 (merged 2026-10-22, commit 99255c6) implemented it, so it now returns 0 for every open port and its entry moved to Functional. The only call-site note left in that file is for sceAudioInAsyncOpen (#10093), which is implemented too (core/libs/prx/libSceAudioIn/Export.cpp, sceAudioInAsyncOpen). Nothing in libSceAudioIn matches the sentence any more.

The example now points to libSceNpManager. There, sceNpGetSandboxInfo takes its signature from PPSA28416's call site (one pointer to a 0x50-byte stack buffer that the title then reads as a string). The string the library writes and the console's error codes are unknown, so the export still calls NotImplemented_nid_no_patch (core/libs/prx/libSceNpManager/Export.cpp). The sentence now reads "what the library writes into the buffer did not" instead of "the meaning of the result did not", to match that entry. The lesson stays the same, and the paragraph is rewrapped to 120 columns.

Tested

Windows 11 Pro, Intel Core i9-14900K, 128 GB RAM, NVIDIA GeForce RTX 5080 (driver 32.0.16.1742), WinLibs GCC 15.2.0, Release build. Documentation only.

  • cmake --build and cmake --build --target libs succeed.
  • ctest -R "conventions_doc_links|patched_libraries": 2/2 passed.
  • python tools/check_test_registration.py <build>: 1513 test executables, none new.
  • python tools/check_conventions.py --base origin/main: all checks pass.
  • python tools/pr_overlap.py : no overlap with the 1342 open pull requests.

No test can tell main and this change apart: the old link target still exists, so conventions_doc_links passes on both.

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, some AI assistance was used

@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.

Reviewed — looks good

This documentation-only change replaces an example that no longer throws with sceNpGetSandboxInfo, whose output contract is still unknown.

What I ran

Reviewed head a7f94de45cdcf7c069b4e81b3f97f534d2b5aa37 against base 319621ba2e578bd053b0baba2877fe70520e0737; the merge tree is clean. Environment: Linux checkout. No build or runtime test was needed for this documentation-only change.

git diff --check upstream/main...pr/12534
git merge-tree $(git merge-base upstream/main pr/12534) upstream/main pr/12534 | head -2
git show pr/12534:docs/dev/REVERSE_ENGINEERING.md | sed -n '38,45p'
git show pr/12534:docs/dev/debt/libSceNpManager.md | grep -n -A1 'sceNpGetSandboxInfo'
git show pr/12534:core/libs/prx/libSceNpManager/Export.cpp | grep -n -A4 -B1 'sceNpGetSandboxInfo'

Results

Check Result
git diff --check Pass; no output
Merge tree onto current main Clean (merged)
Documentation conventions CI Pass
Intake, labels, eligibility CI Pass
Build and runtime tests Not applicable to this docs-only diff
Command output
$ git diff --check upstream/main...pr/12534
(no output)

$ git merge-tree $(git merge-base upstream/main pr/12534) upstream/main pr/12534 | head -2
merged
  result 100644 eb930289cce82e09f41f6b1486eb3b190f525c99 docs/dev/REVERSE_ENGINEERING.md

$ git show pr/12534:docs/dev/REVERSE_ENGINEERING.md | sed -n '38,45p'
A call site doesn't settle what the library writes, which error codes it returns, its side effects, or the values a
title happens to accept. "The title continues if it gets 0" is not "the console returns 0". Everything that the call
site and the other sources leave open throws (`NotImplemented_nid_no_patch`), as in
[libSceNpManager](debt/libSceNpManager.md): the signature came from a call site, what the library writes into the
buffer did not, so the export still throws. A silent stub is allowed only when it affects the UI
([CONTRIBUTING](../../CONTRIBUTING.md)): a read that always reports no data, or a write that drops its data, is not UI.

$ git show pr/12534:core/libs/prx/libSceNpManager/Export.cpp | grep -n -A4 -B1 'sceNpGetSandboxInfo'
1031:int APS5_VABI sceNpGetSandboxInfo(void* sandbox_info) {
1032-    (void)sandbox_info;
1033-    NotImplemented_nid_no_patch(__func__);
1034-    return 0;
1035-}

Negative control

Not applicable: documentation only.

Findings

Blocking

None found.

Non-blocking

None.

Sources

Not verified

No runtime behavior was tested; no runtime code changed.

@adriadam10
adriadam10 merged commit ff17aa8 into boykopovar:main Oct 28, 2026
10 checks passed
@adriadam10

Copy link
Copy Markdown
Collaborator

Checked that sceNpGetSandboxInfo still calls NotImplemented_nid_no_patch and that its debt entry in libSceNpManager.md matches the new sentence, and that the link target exists; docs-only, Conventions green; merged.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants