Repository navigation
fix: restore POSIX Root lock error normalization - #1081
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs maintainer review before merge. What this changesThis PR restores normalized POSIX async Root lock errors while preserving Windows fallback error identity. Example: On POSIX with native mode off, creating state.lock fails with EACCES.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Regression provenancePossible regression — probable (reviewed change; known regression link). No predecessor PR is attributed. Merge readiness✅ Ready for maintainer review Keep open: current main still bypasses the documented POSIX Root write-error contract, and this PR provides a focused repair with no concrete correctness or security finding. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherRoot-backed lock acquisition sends an owner record through guarded sidecar publication; the Root write boundary classifies failures before returning them to the caller. flowchart TD
A[Lock caller] --> B[Sidecar acquisition]
B --> C[Root create]
C --> D[Guarded sidecar publication]
D --> E[Root error boundary]
E --> F[Caller receives classified failure]
Technical reviewBest possible solution: Land the existing platform-specific unwrap repair once the Windows package-smoke failure is understood and required checks are satisfied. Do we have a high-confidence way to reproduce the issue? Source directly shows fallback sidecar failures bypassing the documented normalizer on main; the PR reports failing-before Root-lock cases and published-version comparisons, but this read-only review executed no reproduction. Is this the best way to solve the issue? The repair is the smallest complete change: unwrap the sidecar failure, preserve Windows identity, and reuse the existing POSIX classification without changing publication, cleanup, or authority owners. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against f5ad136ac5b2. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 7, 2026, 8:34 PM ET / November 8, 2026, 01:34 UTC. |
Problem
The crash-safe sidecar publication path introduced in 0.28.0 bypasses the existing POSIX Root write-error normalizer. Root-backed lock acquisition therefore exposes raw
EACCES/EIOerrors where 0.27.1 and 0.27.2 returnFsSafeErrorwith the compatibilityinvalid-pathcode and the original error incause. This breaks OpenClaw's lock acquisition failure handling and ownership tests.Change
Route POSIX async Root sidecar failures through the existing normalizer. Keep Windows fallback error identity, raw and sync lock paths, classified policy errors, and post-publication verification behavior. This changes no public API, lock publication, ownership admission, or cleanup authority.
Regression tests cover exclusive-open and write failures through public Root/lock APIs, the established Windows and raw-lock contracts, directory persistence failure, and a combined persistence/cleanup failure that retains the cause graph and orphan stage without retrying acquisition.
Validation
pnpm checkcompleted build, WASM allocator and documentation checks; the full test run recorded 14,460 passes, 317 failures and 4,514 skips. Of the failures, 314 were temporary-workspace fixtures correctly rejecting a0775nonsticky ancestor on the selected external volume. Rerunning only the 31 failed files with macOS's normal private temporary directory left just the 3 obsolete raw-error assertions, which this change updates. The final affected publication file then passed. Native-specific cases are left to hosted CI; this source change is confined to the JavaScript fallback error path.pnpm pack:checkandgit diff --checkpassed.