Repository navigation
Conversation
Add the BSD `strmode` export for the libc PRX, decoding a guest `mode_t` into the twelve-byte `ls -l` permissions string as FreeBSD 11.4 `lib/libc/string/strmode.c` does: a file-type character from the top four bits, three `rwx` triples, `s`/`S` and `t`/`T` for the setuid/setgid/sticky combinations with the matching execute bit, a space in the ACL slot and a trailing NUL. Extend the guest strings test to cover a directory, a regular file, a symlink, every special `s`/`S`/`t`/`T` combination and each non-regular file-type character. Document the export in `docs/dev/debt/libc.md` with the registry NID `Uo-nB2s+1+A`; console behavior is unverified. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
The implementation matches the cited FreeBSD 11.4 |
|
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.
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.
|
|
Fixed the debt-entry length in 1185982: the entry is now 942 characters, below the 1,000-character limit. The implementation is unchanged; the focused guest_strings test and conventions check passed locally. |
|
The macOS failure on this PR is in the `relinker (macos-latest, clang++, x86_64)` job: only `masked_store_lowering` failed (`Masked store stub changed the flags`, 309/310 passed) on exact head 1185982 (run 40438653738). How it compares:
I couldn't rerun the job because that needs admin rights. Could a maintainer rerun the failed job? I haven't changed the flags expectation. I don't have macOS hardware, so I couldn't reproduce the failure locally, and the evidence above doesn't prove the cause. AI disclosure: this analysis was written by Claude (an AI assistant) for B-Howell, using CI logs and git history. |
|
The failed The earlier diagnostic report records the same failure on an unrelated PR on 2026-10-25 (run 40216485859). The test's execution part runs only on that Rosetta job, and it passed 2,000 native runs on Linux (3.46M stub executions). Evidence is in #12284. #12286 makes the next failure report which flags changed. A rerun would provide fresh evidence; it is not guaranteed to clear the failure. The current head and its checks must be assessed separately from this historical result. AI-assisted: Claude Code; causal-claim clarification by Codex. |
|
Refreshed this existing branch onto main 750cf6c in ca2cbc3, preserving the published history. The only manual merge resolution keeps both the strmode debt entry and main's neighboring strtoq entry; the strmode implementation itself is unchanged from 1185982. A fresh Windows 11 / WinLibs GCC 15.2.0 Release build of guest_string_tests succeeds, and guest_strings passes all three executions with --repeat until-fail:3. Conventions and an independent static integration review pass. The description now distinguishes this new evidence from the earlier-head results. This does not claim new macOS/Rosetta execution or diagnose the historical masked_store_lowering failure. Keeping this PR a draft pending its refreshed CI/review. AI-assisted: Codex. |
|
Manual follow-up to the skipped comparisons in the overlap report (comment6432290956). Reviewed target head: I inspected the listed shared-file patches for all 26 candidates. No duplicate target export/implementation was found in this scoped review. The table records the specific shared-file changes and integration requirements; shared debt/header changes still need to preserve both sides. This is not a claim that every pair merges cleanly or that a combined branch has been built/tested. This follow-up addresses the skipped-comparison request only. Existing CI limitations, dependency ordering and outstanding re-review requirements remain in force; approvals or tests from older heads do not become current-head evidence through this audit. Update: the refreshed bot report added #10002 and #12397. Their listed debt patches are now included below at the recorded heads; the earlier24candidate assessment remains unchanged. This delta review does not close the separate landing-order coordination. Candidate heads, shared files and manual dispositions
AI-assisted: yes (Codex). Current-target delta addendum (October 28): target The refreshed skipped list adds two debt-only scopes:
Retained #7648 moved from The existing compared #10270 scope remains at AI-assisted: yes (Codex). |
|
Follow-up to the actual compared conflicts in overlap comment6432290956, for this PR at I inspected the listed shared-file patches for 1 compared candidate at the heads below. This is separate from the earlier skipped-comparison review.
These scoped findings do not establish clean pairwise merges or a successful combined build/test. They do not clear other review, CI, dependency or current-head verification obligations. @orezraey For the reported #10270 test insertion, I propose #11664 first, then #10270 retain the strmode assertions alongside CheckConstraintHandlerCalls. Please confirm or propose another order. This is not an existing agreement, and neither branch has been combined/tested by this audit. AI-assisted: yes (Codex). New compared-scope delta (October 28): #11664 target I reviewed #12560’s complete listed The Windows text describes DOS device names, trailing dots/spaces, verbatim paths, remaining host filesystem restrictions and relative-path normalization. This review covers that debt text only; it does not independently validate the candidate implementation, filesystem behavior or measurements. Preserve Adjacent documentation does not establish a semantic dependency or an agreed order with #12560. The separately confirmed #11664 → #10270 order from the author’s reply remains unchanged, with later integrated AI-assisted: yes (Codex). October 29 current-head #12560 follow-upCurrent strmode integration I re-read the complete listed Future composition must retain all three distinct entries: this PR's strmode console/register-width qualification, main's strtoq alias/unverified-console qualification, and the candidate's Windows device-name/trailing-dot/space/verbatim-prefix/relative-path qualifications. Preserve the lower-paragraph revision too. This is a complete review of the bot-listed debt patch, not a verdict on #12560's implementation or an independent repetition of its filesystem observations. No runtime dependency, new author-order agreement, clean whole-PR combination or combined test follows from this documentation scope. The existing confirmed #11664 -> #10270 order remains visible in #10270's current checklist at AI-assisted: yes (Codex). October 30 - additional scoped overlap follow-throughFrozen target #11664: The source heads that moved during preparation have been refreshed at the exact pins below, including additional actual shared paths discovered in complete file indices. Shared code/declarations and debt text are assessed separately. Retained references remain identified as retained. Shared code and declarationsRefreshed non-debt shared-header/test scopes for strmodeTarget #11664 remains
No selected patch changes StringExtensions.cpp or the twelve-byte strmode implementation. This fresh source check preserves the int/buffer contract, existing fixture checks and earlier null/console/register-width limits. It does not assert clean header compilation, foreign locale/allocator correctness, runtime, author-order/dependency agreement or whole-table readiness. Tests and approvals keep their original heads. Shared debt documentationRefreshed pinned shared libc debt scopes for #11664Target Preserve the target's debt contract verbatim:
Additional current shared-debt content (the affected candidate numbers are explicit):
The other functions' firmware/module samples do not settle strmode's unverified PS5 register width or console behavior; retain its own exact qualification.
The expm1f wording conflict was rechecked at #10229 All source identities use raw Git bytes with explicit UTF-8 decoding. Eleven heads and bases stayed stable across their bounded reads; four omitted primary patches were reconstructed from exact merge-base/head raw blobs and match complete pull-file counts. Existing runtime/console/reviewer evidence retains its original pins. No combined build, runtime, same-export, console/firmware validation, author consent, dependency or readiness conclusion follows from this shared-document review. No tests/code/cache/refs/public/central state were changed. These are pinned shared-source preservation findings only. Existing runtime evidence keeps its tested commits and platforms. No combined build/runtime, console measurement, whole-table clearance, author consent or new implementation dependency follows from sharing these files; unshared foreign implementations are outside this note. Other retained-head and review/CI obligations remain separate. AI-assisted: yes (Codex). Source-preservation follow-through for #11664 at
Owned contract retained: Require writes to stderr and aborts, including Release. Preserve the 12-byte strmode buffer, eleven rendered characters plus NUL, directory/regular/symlink modes, setuid/setgid lower/upper case, sticky lower/upper case, c/b/p/s/w types and unknown-mode output; preserve CheckMemcpyOverlap final return. Local buffers; no global handler changes in these two selected patches. Proof classes: 1 actual-merge-base raw reconstructions; 1 cached complete-primary patches. Existing published ABI/runtime evidence remains pinned to its original head/control/environment; no new build, test, merged composition, author ordering or whole-table approval is claimed. AI-assisted (Claude Code). Scoped libc API preservation follow-up — #11664Source-only review against owned Preserve exactly:
Apply declarations as scoped edits while preserving our own declarations; copying an older complete header could discard them. This does not establish implementation dependencies, agreed merge order, source compatibility of uninspected files, a successful merge/build, or runtime/console behavior. Other table paths and outstanding integration obligations remain separate. AI-assisted (Claude Code). Bounded libc debt-source supplement for #11664Target source Keep strmode's twelve-byte mode string, int/FreeBSD ABI rationale, undefined null-buffer behavior and unverified console/register-width expectations. The selected added/deleted debt paragraphs concern the following separate subjects; none replaces this target's own debt paragraph. During composition preserve both, and resolve overlapping foreign replacement paragraphs against the actual implementation rather than restoring stale text from hunk context.
Specific source distinctions:
This is AI-assisted source/documentation review. Shared prose supplies no new prerequisite, author consent or runtime qualification. Existing source/interface, CI and explicit dependency obligations remain separate. New captured #12622 intersections, source onlyAgainst owned
Compose fixture expectations with the corresponding candidate implementation when integrating; this shared-file review establishes no new strmode dependency, author order, foreign implementation approval or table-wide clearance. Historical test pins remain unchanged. AI-assisted (Codex). Current skipped-row source reconciliation — target
|
CI follow-through for
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What
Implement the BSD
strmodeexport incore/libs/prx/libc/src/StringExtensions.cpp, decoding the mode into the twelve-bytels -lpermissions string as FreeBSD 11.4lib/libc/string/strmode.cdoes: file-type character from the top four bits, threerwxtriples,s/Sandt/Tfor the setuid/setgid/sticky combinations with the matching execute bit, a space in the ACL slot and a trailing NUL. Declaration added tocore/libs/prx/libc/include/Api.hppbeside the other string exports.Signature takes
intto match the FreeBSD 11.4<string.h>prototypevoid strmode(/* mode_t */ int, char *)and the project's sibling guestchmodandfchmodexports; the consolemode_twidth and register-width expectations are unverified and the doc entry records that uncertainty.Extend
core/libs/tests/GuestStrings.cppto cover a directory, a regular file, a symlink, everys/S/t/Tsetuid/setgid/sticky combination against the matching execute bit, each non-regular file-type character (c,b,p,s,w) and the?fallback.Document the export in
docs/dev/debt/libc.mdwith the registry NIDUo-nB2s+1+A; console behavior is unverified.Tested
Main refresh at
22159353aa90Head
22159353aa90627dedc7e3fb501250e5940c9b48, tree235fc990fc5a31f682b1df7d23a9319c5ae28391, ordinarily mergese3c44ac2c60f26c7cbb0c42b447c4d4d61d0fd32with mainc0fb4a6aad1012b7e2abecaf2949e3d26c0e525d, observed at 2026-10-30 20:15:30 UTC; published6fc8bc373f486b49053870e519b0eba643784f37remains an ancestor. This is the documented main baseline for this refresh; later remote-main advances are not certified. The four owned contribution files and their additions remain unchanged. Earlier evidence below keeps its original pins.Fresh Windows/WinLibs GCC 15.2.0 r7 (CMake 4.4.4/Ninja 1.13.2) and WSL Ubuntu 22.04/GCC 11.4 (CMake 3.22.1/Ninja 1.10.1), Release: both configurations and
cmake --build <fresh-cache> --target guest_string_tests guest_formatting_tests nid_patcher --parallel 2pass.ctest --test-dir <fresh-cache> -R '^(guest_strings|guest_formatting|public_headers)$' -V -j1 --repeat until-fail:3 --timeout 30 --no-tests=errorpasses 18 selected executions at this exact head across both OS = 12 native guest runs + 6 audit-only header runs, with no failures/skips. Builds/OS arms were serial, at most two build jobs. Same-arm production-library binding and Release-active checks were verified, including the existing formatting regression and actual changed-kernel dependency.The #11664-before-#10270 order is author-confirmed. Reviewer acceptance, later combined validation and actual upstream landing remain separate. The historical hosted
web_releasetimeout and Darwin masked-store failure remain unresolved at their original heads; they are not results for22159353aa90.The audit-only case retains its generated 90-second timeout; the 64 header compile batches are excluded. At the 2026-10-30 exact-head readiness audit, 11 latest named checks completed successfully, Linux was skipped, and six macOS checks were queued; no current failed check was reported. Skipped or queued checks are not passes. No new console, GPU, title, macOS, whole-product or full-suite result is claimed.
Current-main integration
6fc8bc373f486b49053870e519b0eba643784f37, tree4da828c67c90715473314f535e208dc69583af0e, ordinarily merges frozen main3679074dd61aa6a899a00c19ce2e450b1cacfb60into published30abbd1be32adfe2ffe9f3f2de06dc053bad27a4. Owned strmode implementation, declaration and fixture additions are unchanged. Existing clean worktree-specific submodules were aligned to this main's committed pins before the build.Windows 11, WinLibs GCC 15.2.0 r7, Release:
cmake --build build --target guest_string_tests --parallel 2passes;ctest --test-dir build -R '^(guest_strings|public_headers)$' --repeat until-fail:3 -Vpasses 2/2 cases, each three repetitions (six passes, no skips), in 65.68 seconds. Conventions against this main pass. No new Linux, macOS/Rosetta, console, full-suite, title or GPU execution is claimed. Historical evidence below retains its exact source/toolchain limits.#11664-before-#10270 remains author-confirmed; any later combined-head validation is a separate integration step. The #12560 debt-only composition establishes no functional or author-order prerequisite. Current skipped-row source reconciliation is recorded in comment6475614264; it does not clear the compared #10270 scope or the entire overlap warning. Historical hosted outcomes remain at their original heads, and the older Darwin failure has no established current-head cause.
Earlier integrated-head evidence:
Current-main integration at
30abbd1be32adfe2ffe9f3f2de06dc053bad27a4, merging frozen main319621ba2e578bd053b0baba2877fe70520e0737by ordinary merge:cmake --build build --target guest_string_tests --parallel 2passed;ctest --test-dir build -R '^guest_strings$' --repeat until-fail:3 -Vpassed all three executions (test 517: 0.05, 0.01, 0.01 sec).python tools/check_conventions.py --base origin/mainpassed.Earlier current-main integration at
ca2cbc3baa, merging frozenmain750cf6cf48into the published branch without rewriting its history:Windows 11, WinLibs GCC 15.2.0, Release: a fresh
guest_string_testsbuild andctest -R '^guest_strings$' --repeat until-fail:3 -Vpass all three executions.The implementation is unchanged from
1185982eff; the only manual merge resolution preserves both the strmode debt entry and main's adjacent strtoq entry.Conventions and independent static integration review pass. The merge retains the declaration, implementation and all existing/new GuestStrings cases.
No new macOS/Rosetta execution is claimed. The historical masked-store failure and relinker: masked_store_lowering flakes under Rosetta with "Masked store stub changed the flags" #12284 investigation remain separate evidence; this local Windows run does not diagnose its cause.
Earlier-head evidence follows:
ninja guest_string_testsandctest -R '^guest_strings$'inbuild-focusedon Windows: pass. Console behavior is not exercised.tools/check_conventions.py --base origin/main: all checks passed.tools/pr_overlap.py --branch codex/libc-strmodecompleted. The historical overlap report flags conflicting lines in GuestStrings.cpp with fix(libc): bound and report the Annex K copies as measured on a PS5 #10270. Its author subsequently confirmed feat(libc): implement strmode #11664 before fix(libc): bound and report the Annex K copies as measured on a PS5 #10270 in comment6475839338; future combined validation remains outstanding. Other base-conflicted shared files were not fully compared by the tool.Built export
strmode_nid_postfixpresent inlibc.prx; registry NIDUo-nB2s+1+Amatches the symbol viatools/nid_names.py --name strmode.Historical hosted macOS relinker run: 309/310 passed; masked_store_lowering failed with 'Masked store stub changed the flags'. Cause is not yet established. This PR does not change relinker code. Native Linux comparison: Ubuntu 22.04/WSL, GCC 11.4, Release passed all 1728 masked-store executions, including flags checks, with the test/emitter/matcher sources identical to this PR head. This does not reproduce or clear the Rosetta failure; the historical Rosetta failure remains unexplained.
Write-watch CI prerequisite
This update merges the original #13220 commit (e9f09f5) as a second parent. It removes only the duplicate execute-fault and read-fault registrations from the shared write-watch CMake file; the function change remains the first-parent history. Historical function-test results retain their original source/binary pins as recorded above; they are not results on this merged head. A separate configure-only Windows/Linux comparison generated all 18 unique test registrations after the fix, with no fixture build or runtime tests. The hosted macOS checks on this updated head are pending; no macOS runtime result is claimed here.
Checklist
Based on current
main; no other open PR implements the same functionsOne 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 fileNo notes, investigation
.mdfiles 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: test(libc): register the macOS write watch fault tests once #13220
Fixes: none
Unblocks: none
GPUs tested: n/a
AI-assisted: yes