Skip to content

docs(debt): note how a title uses the sceNetGetsockopt error value - #10097

Merged
adriadam10 merged 3 commits into
boykopovar:mainfrom
xXPBSXx:docs/debt-net-getsockopt-title
Oct 26, 2026
Merged

adriadam10 merged 3 commits into
boykopovar:mainfrom
xXPBSXx:docs/debt-net-getsockopt-title

Conversation

@xXPBSXx

@xXPBSXx xXPBSXx commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

What

The changed entry now reads:

sceNetGetsockopt (libSceNet) reads SO_ERROR from the host socket. Winsock does not clear a socket's pending error when it is read, so on Windows the library reports a pending error once and shows it again only after a new sceNetConnect; a second failure with the same code on the same socket without a sceNetConnect in between would be hidden. One title (PPSA02225) disassembled for this entry has one call site (0x1056d34), with level 0xffff, option 0x1007 (the FreeBSD values of SOL_SOCKET and SO_ERROR; the title holds only the numbers) and a length variable set to 4 beforehand, reached only after a helper called with the value 2 returned true. For a negative result it takes the thread's error code as the value; for a result of 0 or more with a value of 0 it reports the connection as made, and otherwise it turns the value into an error code of its own. The call does not show how often the title reads it per connection attempt or whether it keeps using the socket after an error.

Changed: docs/dev/debt/libSceNet.md. No code change.

Method: Ghidra 12.1.4 headless on the unwrapped executable of the title named; the addresses are the call sites in that executable as Ghidra maps it, read from the instruction listing (static reading only, nothing run on a console). The listing and decompiled code are game code and are not attached.

Fixes: #10096

Tested

Documentation only. tools/check_conventions.py --base upstream/main passes; git merge-tree against main is clean. #9523 and #9931, which edited the same file, are merged; this branch was refreshed from main after that. #9542, which also edited docs/dev/debt/libSceNet.md, is merged; this branch was refreshed from main after that (head 10624a6ad1ae9ec1efc026e4415e6d114f522f94). Every number in the sentence was recounted against the instruction listing. Not built, not run, no title run.

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 libSceNet debt: note how a title uses the sceNetGetsockopt error value #10096
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

AI-assisted (Claude Code).

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Oct 23, 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 5836 docs/dev/debt/libSceNet.md
PR 9932 docs/dev/debt/libSceNet.md
PR 9948 docs/dev/debt/libSceNet.md
PR 11272 docs/dev/debt/libSceNet.md

@github-actions github-actions Bot added docs fix error Closes an issue (Fixes #N) labels Oct 23, 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.

The shortened entry now stays within the checker’s debt-length guidance and distinguishes the call-site’s visible argument/result handling from behavior that cannot be inferred. The exact-head conventions checker and git diff --check pass; hosted eligibility, conventions and labels pass. This is documentation-only, so runtime tests do not apply; hosted product build jobs are skipped by path policy.

Please refresh this branch from current main and coordinate the debt-file order with #9523, #9542 and #9931. The exact-head sync check reports 2 ahead/111 behind, with docs/dev/debt/libSceNet.md changed on both sides since #9060. Pairwise merges of these three PR heads with this head each conflict in that file. Please agree an order with those authors, add Depends on where appropriate, and re-run the overlap/conventions checks after resolving it. I also checked the uncomparable overlap reports: #9578 merges cleanly with this head; #5836's diff is in peer-socket/setsockopt paths, but its stale pairwise merge conflicts in Export.cpp, GuestSceNet.cpp and the debt file, so please recheck that comparison after refreshing.

@xXPBSXx
xXPBSXx force-pushed the docs/debt-net-getsockopt-title branch from c4eb26b to 3b9a414 Compare October 23, 2026 10:50
@xXPBSXx

xXPBSXx commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

@MarcZX10 thanks. Depends on: none; the conflict in docs/dev/debt/libSceNet.md is on the sceNetGetsockopt entry itself. Order: #9523 (not a draft) should go first and I rebase this PR after it, rewording the sentence against the entry that is current then; #9542 and #9931 are drafts and do not hold this PR. Refreshed from current main (head 3b9a41495f, base main 812ed15875), conventions and git diff --check pass; the changed entry is 979 characters. I rechecked #5836 and #9578 on the new head: both conflict with main in the same files by themselves (Export.cpp, GuestSceNet.cpp and the debt file for #5836; the libkernel.md debt file for #9578), so the pairwise merge conflicts with this head come from those PRs against main, not from this one-line change in libSceNet.md.

AI-assisted (Claude Code).

@xXPBSXx

xXPBSXx commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

@MarcZX10 thanks. The checklist reads Depends on: #9523; the conflict in docs/dev/debt/libSceNet.md is on the sceNetGetsockopt entry itself. Order: #9523 (not a draft) should go first and I rebase this PR after it, rewording the sentence against the entry that is current then; #9542 and #9931 are drafts and do not hold this PR. Refreshed from current main (head 3b9a41495f, base main 812ed15875), conventions and git diff --check pass; the changed entry is 979 characters. I rechecked #5836 and #9578 on the new head: both conflict with main in the same files by themselves (Export.cpp, GuestSceNet.cpp and the debt file for #5836; the libkernel.md debt file for #9578), so the pairwise merge conflicts with this head come from those PRs against main, not from this one-line change in libSceNet.md.

AI-assisted (Claude Code).

@Queuse

Queuse commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

That order works for me: #9523 first, then this documentation update. I refreshed #9523 in 01b7dbaa7f and retained main's current debt wording around it. #9931 is now merged and #9542 is ready for review; neither needs to block this documentation follow-up after #9523 lands.

xXPBSXx and others added 2 commits October 25, 2026 22:27
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ength limit

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@xXPBSXx
xXPBSXx force-pushed the docs/debt-net-getsockopt-title branch from 7b78542 to 295bca0 Compare October 25, 2026 21:29
@xXPBSXx

xXPBSXx commented Oct 26, 2026

Copy link
Copy Markdown
Contributor Author

Head 295bca045563adf203fe54d372b07d576482ac8b: refreshed from main after #9523 and #9931 merged, so the conflicts with those two are gone and the checklist no longer needs Depends on: #9523; git merge-tree against current main 442c43a574 is clean. #9542 is still open and also edits docs/dev/debt/libSceNet.md; a merge of the two heads reports a content conflict there, and main is clean for each of them alone, so whichever lands second rebases and keeps both entries. Could you re-review that exact head?

AI-assisted (Claude Code).

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 26, 2026
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 26, 2026
@xXPBSXx

xXPBSXx commented Oct 26, 2026

Copy link
Copy Markdown
Contributor Author

Refreshed with a normal merge of main (head 10624a6ad1ae9ec1efc026e4415e6d114f522f94) after #9542 merged; the entry and the order notes are unchanged otherwise. Could you re-review?

AI-assisted (Claude Code).

@adriadam10 adriadam10 self-assigned this Oct 26, 2026
@adriadam10
adriadam10 dismissed MarcZX10’s stale review October 26, 2026 14:07

Dismissing a stale review: the requested changes were addressed after it (new head) and the merge queue blocks on it. Please request changes again if anything is still open.

@adriadam10
adriadam10 merged commit 51f5c57 into boykopovar:main Oct 26, 2026
11 checks passed
@adriadam10

Copy link
Copy Markdown
Collaborator

Checked the diff against the description, the conventions/labels/eligibility checks on this head, and that the earlier ordering request (#9523, #9542, #9931) is met now that all three are merged; docs-only, no code change; merged.

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

Labels

docs fix error Closes an issue (Fixes #N)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

libSceNet debt: note how a title uses the sceNetGetsockopt error value

4 participants