Skip to content

feat(libc): export the versioned std::__sce_v2 filesystem primitives - #10989

Merged
oneandonlydean merged 7 commits into
boykopovar:mainfrom
edubox:feat/libc-sce-v2-filesystem
Nov 2, 2026
Merged

oneandonlydean merged 7 commits into
boykopovar:mainfrom
edubox:feat/libc-sce-v2-filesystem

Conversation

@edubox

@edubox edubox commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

What

The std::__sce_v2 filesystem primitives are missing from libc.prx. PPSA28416 imports all seven from it (_Stat Pr1S2l2SpPE, _Open_dir XQgLZdwqACM, _Read_dir YaXPSk7yIqY, _Close_dir 2voXFbF1zkU, _Current_get 3y6Rg-iaDY8, and the two _Xfilesystem_error overloads PA+HkSsicW8/MxYQlfxPQzY).

  • Move the directory primitives' shared implementation from libSceLibcInternal/Filesystem.cpp into libc/include/GuestFilesystemPrimitives.hpp; the unversioned exports keep their behaviour and guest_libc_filesystem still passes.
  • _Stat cannot use that shared helper: it calls stat_nid_postfix, which only libkernel.prx defines, and a libkernel import in libc.prx makes every host target that links only libc.prx fail to link (agc_shader_replay, agc_shader_replay_requests, host_libstdcxx_exception and the libc test executables). The versioned _Stat resolves the guest path and reads the type and permission bits with the host filesystem instead; guest_sce_v2_filesystem still cross-checks type, permission bits and errno against stat_nid_postfix.
  • Export the versioned five from libc/src/VersionedFilesystem.cpp. The console's libc.prx bundled with PPSA28416 shows the same semantics: _Stat (0xcb9b0, 0xd7 bytes) maps the type from st_mode and keeps the same four not-found errors, _Open_dir (0xcb640, 0xe9) and _Read_dir (0xcb730, 0x15b) filter dot entries and report file type 8, _Close_dir (0xcb890, 0x2b) closes the handle, and _Current_get (0xcb8c0, 8) writes "/" and returns true. The versioned _Current_get uses that measured value; the unversioned call still returns the current directory.
  • Export both _Xfilesystem_error overloads as NotImplemented_nid_no_patch, like the unversioned pair, so the imports resolve; std::__sce_v2::filesystem_error does not exist yet.
  • New guest_sce_v2_filesystem test (GuestSceV2Filesystem.cpp) covers stat types and permission bits, missing paths, empty and missing directories, entry enumeration, close, and the two-byte "/" write of _Current_get.

Tested

  • Linux (CachyOS, kernel 7.3.0-3-cachyos, GCC 16.2.1, Release): ctest --test-dir build -R 'guest_sce_v2_filesystem|guest_libc_filesystem' → 2/2 passed.
  • nid_patcher libc on the built unpatched/libc.prx exports all seven NIDs (Pr1S2l2SpPE, XQgLZdwqACM, YaXPSk7yIqY, 2voXFbF1zkU, 3y6Rg-iaDY8, PA+HkSsicW8, MxYQlfxPQzY).
  • Console evidence is the libc.prx bundled with PPSA28416 (disassembly; sizes and offsets above).
  • Not run on Windows or macOS, and not exercised by a title: PPSA28416 still stops in sceNpGetSandboxInfo and still imports the versioned locale exports, so these calls were not reached at runtime.
  • Full ninja (2992 targets) and ctest -j16 (2218 tests) on the rebased head: 2217 passed. The only failure is progress_history, which asserts the English git message and fails under a Spanish locale; it passes with LC_ALL=C.
  • python3 tools/check_conventions.py --base origin/main passes. tools/pr_overlap.py --branch feat/libc-sce-v2-filesystem --jobs 32: no PR exports the same NIDs or creates the same files; the only shared file is docs/dev/debt/libc.md (textual append).

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: PPSA28416 STAR WARS: Galactic Racer (PPSA28416) #3086 (partial: 7 of its 22 missing libc.prx exports; the 15 versioned locale exports remain)
  • GPUs tested: n/a
  • AI-assisted: yes

@github-actions github-actions Bot added the unblocks title Names a title ID on the Unblocks line label Oct 25, 2026
@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Progress report (e67cc81 → 72775e6)

📈 System libraries: 26.24% (+0.01%, +5 implemented, +2 declared functions)

✅ 5 implemented
Library Name
libc _ZNSt8__sce_v210filesystem10_Close_dirEPv_nid_postfix
libc _ZNSt8__sce_v210filesystem12_Current_getERA260_c_nid_postfix
libc _ZNSt8__sce_v210filesystem5_StatEPKcPNS0_5permsEPi_nid_postfix
libc _ZNSt8__sce_v210filesystem9_Open_dirERA260_cPKcRiRNS0_9file_typeE_nid_postfix
libc _ZNSt8__sce_v210filesystem9_Read_dirERA260_cPvRNS0_9file_typeE_nid_postfix
🆕 2 declared as stubs
Library Name
libc _ZNSt8__sce_v210filesystem18_Xfilesystem_errorEPKcNS_10error_codeE_nid_postfix
libc _ZNSt8__sce_v210filesystem18_Xfilesystem_errorEPKcRKNS0_4pathENS_10error_codeE_nid_postfix

Changed libraries (implemented exports)

Library Before After Change
libc 1484/1500 (98.93%) 1489/1507 (98.81%) -0.13%

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

Requesting one blocking fix before merge: the new GuestFilesystem::StatType helper is compiled into the base libc by VersionedFilesystem.cpp, but it calls stat_nid_postfix, which is declared in prx/libkernel/include/Api.hpp and defined in libkernel/File/src/Stdio.cpp. The base libc target does not link libkernel; only the other PRX targets do (see core/libs/CMakeLists.txt). This leaves an unresolved kernel symbol in the Windows libc.prx link. The PR reports no Windows build, and the hosted Windows job here is only the relinker job, not the libc product build.

I confirmed the changed source files pass C++20 syntax checks, but a MinGW object compile of VersionedFilesystem.cpp leaves stat_nid_postfix undefined. MinGW also rejects a shared-library link with an unresolved symbol. Please keep the kernel-dependent stat operation in a target that already links libkernel, or provide a Windows link arrangement that resolves it without introducing a target cycle, and validate the Windows libc link/test before resubmitting.

My exact-head local checks were check_conventions.py, git diff --check, and syntax checks for both filesystem exports and the new test; those passed. They do not cover this link dependency.

@github-actions

github-actions Bot commented Oct 25, 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 6565 docs/dev/debt/libc.md L278

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 5021 core/libs/prx/libc/CMakeLists.txt
docs/dev/debt/libc.md
PR 7081 core/libs/prx/libc/CMakeLists.txt
docs/dev/debt/libc.md
PR 7386 docs/dev/debt/libc.md
PR 7447 core/libs/prx/libc/CMakeLists.txt
docs/dev/debt/libc.md
PR 7715 core/libs/prx/libc/CMakeLists.txt
docs/dev/debt/libc.md
PR 8150 core/libs/prx/libc/CMakeLists.txt
docs/dev/debt/libc.md
PR 8965 core/libs/prx/libc/CMakeLists.txt
docs/dev/debt/libc.md
PR 9087 docs/dev/debt/libc.md
PR 9340 docs/dev/debt/libc.md
PR 9371 docs/dev/debt/libc.md
PR 9447 docs/dev/debt/libc.md
PR 9526 docs/dev/debt/libc.md
PR 9929 core/libs/prx/libc/CMakeLists.txt
docs/dev/debt/libc.md
PR 9935 docs/dev/debt/libc.md
PR 9964 docs/dev/debt/libc.md
PR 10113 docs/dev/debt/libc.md
PR 10226 docs/dev/debt/libc.md
PR 10245 docs/dev/debt/libc.md
PR 10250 docs/dev/debt/libc.md
PR 10253 docs/dev/debt/libc.md
PR 10265 docs/dev/debt/libc.md
PR 10274 docs/dev/debt/libc.md
PR 10315 docs/dev/debt/libc.md
PR 10325 docs/dev/debt/libc.md
PR 10328 docs/dev/debt/libc.md
PR 10345 docs/dev/debt/libc.md
PR 10349 docs/dev/debt/libc.md
PR 10405 docs/dev/debt/libc.md
PR 10506 docs/dev/debt/libc.md
PR 10510 docs/dev/debt/libc.md
PR 10512 docs/dev/debt/libc.md
PR 10565 docs/dev/debt/libc.md
PR 10987 docs/dev/debt/libc.md
PR 11332 docs/dev/debt/libc.md
PR 11831 core/libs/prx/libc/CMakeLists.txt
core/libs/prx/libc/include/Api.hpp
docs/dev/debt/libc.md
PR 12122 docs/dev/debt/libc.md
PR 12514 docs/dev/debt/libc.md
PR 12560 docs/dev/debt/libc.md
PR 12574 docs/dev/debt/libc.md
PR 12622 docs/dev/debt/libc.md
PR 12627 docs/dev/debt/libc.md
PR 13793 core/libs/prx/libc/CMakeLists.txt
docs/dev/debt/libc.md
PR 13809 core/libs/prx/libc/CMakeLists.txt
docs/dev/debt/libc.md
PR 14212 docs/dev/debt/libc.md

@edubox
edubox force-pushed the feat/libc-sce-v2-filesystem branch from 21e3fba to e17ffc2 Compare October 25, 2026 13:43
@edubox

edubox commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor Author

Rebased onto e05ba6feeb and added e17ffc265a: _Stat no longer imports stat_nid_postfix.

While verifying this branch with a clean build I found that the previous head broke the default build whenever BUILD_TESTING=ON: libc.prx gained an unresolved import of stat_nid_postfix (only defined by libkernel.prx), so every host target that links libc.prx alone failed to link:

/usr/bin/ld: core/libs/libs/unpatched/libc.prx: referencia a `stat_nid_postfix' sin definir

in agc_shader_replay, agc_shader_replay_requests_tests, host_libstdcxx_exception_tests and the libc test executables (guest_binary_word_tests, guest_floating_point_tests, guest_safe_error_tests, ...). The PR checks do not catch it because the linux/windows full builds are skipped; only conventions and relinker run.

Linking libkernel into all of those targets would be about 80 edits and does not match how the rest of the tree consumes libc, so the fix is on our side: libc.prx already defines opendir_, readdir_r_, closedir_ and getcwd_nid_postfix itself, so only stat was missing. _Stat now resolves the guest path with ResolvePathError_nid_no_patch and reads type and permission bits with std::filesystem::status, keeping the same guest errno mapping; guest_sce_v2_filesystem still cross-checks the permission bits against stat_nid_postfix (perms == (status.st_mode & 07777)) and the not-found codes.

Verification on the rebased head:

  • nm -D --undefined-only unpatched/libc.prx shows no *_nid_postfix imports.
  • Full ninja (2992 targets) succeeds; the clean build is what exposed the problem.
  • ctest -j16: 2217/2218 pass. The single failure, progress_history, asserts the English git message and fails under a Spanish locale (LC_ALL=C passes), unrelated to this PR.

@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 head addresses my earlier stat_nid_postfix link concern: VersionedFilesystem.cpp now uses host filesystem status instead, and the compiled object has no undefined stat_nid_postfix reference.

One blocking semantic issue remains in the new StatType error branch. When std::filesystem::status sets failure, the code always returns TypeNotFound (lines 46–52). The existing GuestFilesystem::StatType contract returns TypeNotFound only for NoSuchFile, NotDirectory, Invalid and NameTooLong; other failures return TypeNone. Therefore errors such as permission denied or a symlink loop are currently reported as “not found” even though errno carries another error. Please use IsNotFound(code) to choose between TypeNotFound and TypeNone after mapping the failure, and add a regression for a non-not-found status error where the host platform permits a deterministic fixture. The successful-path type and permission checks and the missing-path checks do not exercise this case.

@ycbuzi

ycbuzi commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

Windows confirmation of the fix. WinLibs MinGW-w64 GCC 15.2.0 (ucrt-posix-seh r7), Release, Windows 11 Home 10.0.26200:

  • The previous head 21e3fbae1e, merged onto main 1ee8f4bec1, failed to link libc.prx itself here (VersionedFilesystem.cpp: undefined reference to 'stat_nid_postfix'), the same unresolved import you found on Linux.
  • e17ffc265a (on main e05ba6feeb): libc.prx links, objdump -p shows no reference to stat_nid_postfix, and guest_sce_v2_filesystem, guest_libc_filesystem and guest_floating_point (a libc-only test executable) pass both runs of ctest --repeat until-fail:2.

Not run: a title. AI-assisted: yes (Claude Code)

@github-actions github-actions Bot added libc build docs prx needs rebase Conflicts with main, rebase needed labels Oct 25, 2026
@edubox
edubox force-pushed the feat/libc-sce-v2-filesystem branch from e17ffc2 to a6fb580 Compare October 25, 2026 17:33
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 25, 2026
@edubox

edubox commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor Author

Pushed 16f50714bd, which fixes the remaining StatType issue.

The status failure branch now maps the guest code through IsNotFound():
TypeNotFound only for NoSuchFile, NotDirectory, Invalid and
NameTooLong; every other failure (permission denied, symlink loop, ...)
returns TypeNone, leaves perms untouched and still reports the mapped
code in errno/error.

Regression: TestStatError creates a self-referential loop symlink and
skips when the host cannot create symlinks or when its
std::filesystem::status does not report
too_many_symbolic_link_levels; otherwise it requires TypeNone,
error == 62 (guest ELOOP) and perms == 1234.

Verification:

  • With the source fix reverted, the new test aborts with
    sce v2 filesystem: a symlink loop is not reported as not found;
    with the fix it passes.
  • guest_sce_v2_filesystem, guest_libc_filesystem and
    guest_sce_v2_exceptions pass.
  • python3 tools/check_conventions.py --base origin/main: clean.

Could you re-review when you have a moment?

@wachi35676

Copy link
Copy Markdown
Contributor

Windows run of head 16f50714bd merged onto main aeff26bd9. Windows 11 10.0.26300, WinLibs GCC 15.2.0, Release.

  • libc.prx links. guest_sce_v2_filesystem and guest_libc_filesystem pass, 2 runs.
  • Windows long paths: the versioned _Stat doesn't match the unversioned one. I created a 7-byte file at a 326-character path through \\?\, then called both on the plain path in one process:
    versioned _Stat: type=-1 error=2 (perms untouched)
    stat_nid_postfix: 0, st_mode=0100666, st_size=7
    
    std::filesystem::_Stat goes through GuestFilesystem::StatType → stat_nid_postfix, which finds the file because libkernel's stat uses the \\?\ form for long paths (NativeMetadataPath, ee5ff02). The new StatType in VersionedFilesystem.cpp calls std::filesystem::status(native) on the plain path, so on Windows it reports not found past MAX_PATH. Converting native to the extended form before status() would make the two agree. Linux isn't affected.
    _Open_dir fails for the same directory with error 2, but that's the shared helper, so the unversioned export already does the same on main.

AI-assisted: yes (Claude Code); results above were run on this machine.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 26, 2026
@edubox
edubox force-pushed the feat/libc-sce-v2-filesystem branch from 16f5071 to a2a18bd Compare October 26, 2026 00:50
@edubox

edubox commented Oct 26, 2026

Copy link
Copy Markdown
Contributor Author

Pushed a2a18bd84f, rebased onto current main, for the Windows long-path issue.

_Stat now converts the resolved host path to the extended \\?\ form before std::filesystem::status when the absolute native path reaches MAX_PATH, matching libkernel NativeMetadataPath. Linux is unchanged.

guest_sce_v2_filesystem and guest_libc_filesystem pass on Linux; conventions are clean. I could not run the 326-character path check on Windows here. Could you re-run it on the new head?

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

ycbuzi commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

A Windows rerun of the new head a2a18bd84f, merged onto main 84e91df418 with no conflicts: Windows 11 Home 10.0.26200, WinLibs GCC 15.2.0 r7 (MinGW-w64 UCRT), Release, plain ctest --repeat until-fail:2.

  • guest_sce_v2_filesystem passes, 2 of 2. No negative control, since the functions live in the new VersionedFilesystem.cpp. The only build warning is main's known Signals.cpp:25 one.

AI-assisted: yes (Claude Code)

@edubox

edubox commented Oct 26, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto current main (518d36eaec); head is now 73cc10b94e. The StatType failure branch now uses IsNotFound(code) to choose between TypeNotFound and TypeNone, and TestStatError covers the non-not-found case with a symlink loop (deterministic on Linux; the test returns early if the host cannot create the symlink). Rebuilt and ran guest_sce_v2_filesystem and guest_libc_filesystem on the rebased head: both pass. check_conventions.py --base origin/main: all checks passed.

@edubox
edubox force-pushed the feat/libc-sce-v2-filesystem branch from a2a18bd to 73cc10b Compare October 26, 2026 16:13
@ycbuzi

ycbuzi commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

@edubox A Windows rerun of the rebased head 73cc10b94e, merged onto main bd1b31548c with no conflicts: Windows 11 Home 10.0.26200, WinLibs GCC 15.2.0 r7 (MinGW-w64 UCRT), Release, plain ctest --repeat until-fail:3.

  • guest_sce_v2_filesystem and guest_libc_filesystem pass, 3 of 3. The only build warning is main's known Signals.cpp:25 one.
  • The new symlink-loop case in TestStatError didn't run here. This process can't create symlinks: mklink and CreateSymbolicLinkW fail with ERROR_PRIVILEGE_NOT_HELD (1314), because Developer Mode is off and the process isn't elevated. So create_symlink fails and the case returns early, as designed. The non-not-found StatType branch is therefore only covered by your Linux run so far, not on Windows.

AI-assisted: yes (Claude Code)

@edubox

edubox commented Oct 26, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto current main (88795ed448); head is now 518d2914fd. The change itself is unchanged. Rebuilt and ran guest_sce_v2_filesystem and guest_libc_filesystem on the rebased head: both pass. check_conventions.py --base origin/main and git diff --check are clean. Could you re-check the exact head?

@edubox
edubox force-pushed the feat/libc-sce-v2-filesystem branch from 518d291 to a93848d Compare October 26, 2026 21:39
@edubox

edubox commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto current main (98ddd9c179) and force-pushed with lease; head is now a70b1ec16ab0. No code changes: the three conflicts were in the libc debt file against the newer ANYPS5_LOG_FILE entries, resolved by keeping both. Verified on this head: guest_sce_v2_filesystem passes, check_conventions.py --base origin/main and git diff --check clean.

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 30, 2026
@oneandonlydean oneandonlydean self-assigned this Oct 30, 2026
@edubox

edubox commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

Watchdog status on a70b1ec16ab: the only failing checks are the two write-watch jobs, and they fail while configuring main, not in this patch. core/libs/tests/write_watch/CMakeLists.txt on current main (91db3f79f7) still registers write_watch_execute-fault and write_watch_read-fault twice (the foreach(mode execute-fault read-fault) block at lines 36 and 41, added by #12117 and again by #12435), so CMake aborts with add_test given test NAME ... which already exists. This PR does not touch that file; #13220 removes the duplicate and its write-watch jobs pass. The branch is approved and left unchanged here: no rebase or push.

The two should-fix items from the 2026-10-28 review remain addressed on this head (_Stat maps a null path to TypeNone/Fault before path resolution, and the versioned-filesystem debt entry is under the length limit), and guest_sce_v2_filesystem passes there.

AI-assisted: yes

@oneandonlydean

Copy link
Copy Markdown
Collaborator

@edubox thanks, the versioned _Stat now answers for archived entries and the tests cover them, so the earlier point is resolved. One thing left, in the debt file.

docs/dev/debt/libc.md now has the "Versioned std::__sce_v2::filesystem primitives" entry three times, on consecutive lines (256 to 258). The first two are earlier wordings, and they say _Stat uses the unversioned implementation, which is no longer true and contradicts the third. Could you keep only the last entry (the one that describes the archive reader and the host std::filesystem::status for disk entries) and drop the other two?

@edubox

edubox commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

@oneandonlydean done. docs/dev/debt/libc.md now keeps only the last Versioned std::__sce_v2::filesystem primitives entry (the one describing the app0.zar archive reader and host std::filesystem::status for disk entries); the two earlier wordings at lines 256-257 are dropped. Head is now ff3783ffea (single docs commit on top of a70b1ec16a; not rebased, the PR is approved).

Verified on this exact head (Linux x86-64, GCC 16.2.1, Release):

  • ctest --test-dir build -R '^(guest_sce_v2_filesystem|guest_libc_filesystem)' passes 2/2.
  • python3 tools/check_conventions.py --base origin/main: All conventions checks passed.
  • git diff --check origin/main...HEAD: clean.

The write-watch (macos-15) / write-watch (macos-15-intel) failures are unchanged: macOS configures core/libs/tests/write_watch, where main registers execute-fault/read-fault twice (#12117 and #12435); #13220 removes the duplicate block and fixes them for every PR.

AI-assisted: yes

@edubox

edubox commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

Watchdog status on ff3783ffeac: the PR is approved, so it is not rebased. Nothing is pushed.

  • The duplicate debt entries are gone; only the archive/host-status entry for Versioned std::__sce_v2::filesystem primitives remains (903 characters, under the 1000-character limit).
  • guest_sce_v2_filesystem and guest_libc_filesystem pass; check_conventions.py --base origin/main and git diff --check are clean.
  • The two write-watch failures are not from this patch: main registers write_watch_execute-fault and write_watch_read-fault twice in core/libs/tests/write_watch/CMakeLists.txt. test(libc): register the macOS write watch fault tests once #13220 fixes that registration and is owned by another author.

@edubox

edubox commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

Watchdog re-check on ff3783ffeac: no change since the last status on this head, so nothing is pushed.

  • The PR is approved, so it is not rebased.
  • The duplicate debt entries are gone; only the archive/host-status Versioned std::__sce_v2::filesystem primitives entry remains (903 characters).
  • guest_sce_v2_filesystem and guest_libc_filesystem pass; check_conventions.py --base origin/main and git diff --check are clean.
  • The two write-watch failures are not from this patch: main registers write_watch_execute-fault and write_watch_read-fault twice in core/libs/tests/write_watch/CMakeLists.txt. test(libc): register the macOS write watch fault tests once #13220 fixes that registration and is owned by another author.

@edubox

edubox commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

Watchdog re-check on ff3783ffea: the PR is approved, so it is not rebased, and the head has not changed since the last status. Nothing is pushed.

  • @oneandonlydean's debt request is satisfied: only one Versioned std::__sce_v2::filesystem primitives entry remains (the app0.zar archive reader plus host std::filesystem::status wording), 903 characters.
  • guest_sce_v2_filesystem and guest_libc_filesystem pass; check_conventions.py --base origin/main and git diff --check are clean.
  • The two write-watch failures are not from this patch: main still registers write_watch_execute-fault and write_watch_read-fault twice in core/libs/tests/write_watch/CMakeLists.txt. test(libc): register the macOS write watch fault tests once #13220 (e9f09f54fa, open) fixes that registration; this branch is left untouched.

AI-assisted: yes

@edubox

edubox commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

Watchdog re-check on ff3783ffea against origin/main 474030e584: the PR is approved and the review points are satisfied, so it is not rebased and nothing is pushed.

  • @oneandonlydean's debt request is satisfied: only one Versioned std::__sce_v2::filesystem primitives entry remains, 903 characters (under the 1000-character limit), describing the app0.zar archive reader plus host std::filesystem::status for disk entries.
  • @fogydes' null-path point is covered by the head: CopyGuestPath_nid_no_patch returns 14 for a null path, so _Stat returns TypeNone with errno 14, and TestStatInvalidPath asserts it.
  • guest_sce_v2_filesystem and guest_libc_filesystem rebuilt and pass; python3 tools/check_conventions.py --base origin/main and git diff --check are clean.
  • The two write-watch failures are not from this patch: main registers write_watch_execute-fault and write_watch_read-fault twice in core/libs/tests/write_watch/CMakeLists.txt. test(libc): register the macOS write watch fault tests once #13220 (e9f09f54fa, open) fixes that registration; this branch is left untouched.

AI-assisted: yes

@edubox

edubox commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

Watchdog status on approved head ff3783ffea (not rebased, no code changes).

  • ctest --test-dir build -R '^guest_(sce_v2|libc)_filesystem$': 2/2 pass.
  • python3 tools/check_conventions.py --base origin/main and git diff --check: clean.
  • @oneandonlydean's debt request stays satisfied: docs/dev/debt/libc.md has a single Versioned std::__sce_v2::filesystem primitives entry.
  • The write-watch failures are upstream duplicate add_test names in core/libs/tests/write_watch/CMakeLists.txt on main; test(libc): register the macOS write watch fault tests once #13220 fixes them.

Nothing is pushed.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Nov 1, 2026
edubox and others added 7 commits November 1, 2026 11:51
_Stat now resolves the guest path and reads the type and permissions
through the host filesystem, so libc.prx no longer imports
stat_nid_postfix from libkernel.prx. That import broke every host target
that links only libc.prx (agc_shader_replay, agc_shader_replay_requests,
host_libstdcxx_exception and the libc test executables) with an undefined
reference to stat_nid_postfix.

Types, permission bits and guest errno keep matching stat_nid_postfix,
which guest_sce_v2_filesystem still cross-checks.
@edubox
edubox force-pushed the feat/libc-sce-v2-filesystem branch from ff3783f to 72775e6 Compare November 1, 2026 10:52
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 1, 2026
@github-actions github-actions Bot added the review queue Next in the maintainer review queue: checks pass, no open change request, no conflict label Nov 2, 2026
@oneandonlydean
oneandonlydean merged commit ce49d53 into boykopovar:main Nov 2, 2026
18 checks passed
@github-actions github-actions Bot removed the review queue Next in the maintainer review queue: checks pass, no open change request, no conflict label Nov 2, 2026
@edubox
edubox deleted the feat/libc-sce-v2-filesystem branch November 2, 2026 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build docs libc prx unblocks title Names a title ID on the Unblocks line

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants