Repository navigation
fix: skip DrvFS preparation on non-9p filesystems - #1080
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 skips DrvFS recovery preparation on known non-9p filesystems using existing device identities and a negative-only native filesystem probe. Example: Repeatedly write config.json on Linux tmpfs with allowDrvfsRenameRecovery: true.
Review scores
ProductKind: Performance · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR removes unnecessary opt-in write overhead still present on main, with no actionable correctness or security defects found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherAtomic, callback, and Root writers stage caller content, publish it by rename, and verify filesystem identity before reporting success; this change filters preparation for the optional DrvFS recovery path. flowchart TD
A[Public write API] --> B[Existing parent identity]
B --> C[Negative filesystem filter]
C --> D[Ordinary staged publication]
C --> E[Prepare possible DrvFS recovery]
E --> D
D --> F[Verify publication]
F --> G[Full DrvFS checks after ENOENT]
Technical reviewBest possible solution: Keep the shared negative-only filter in the existing publication owners while preserving full recovery admission and strict fallback when observations are unavailable. Do we have a high-confidence way to reproduce the issue? Current-main source unconditionally prepares recovery for enabled Linux writes, including non-DrvFS filesystems; the added tests and counting fixture target that overhead, but this review executed no target code. Is this the best way to solve the issue? The optimization uses existing admitted descriptors and exact device identities, shares one filter across writers, and leaves unknown observations on the previous preparation path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 27c02f710f66. 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. 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:19 PM ET / November 8, 2026, 01:19 UTC. |
Enabling
allowDrvfsRenameRecoveryin 0.28.0 prepared retained parents and recovery snapshots before every Linux rename, even on filesystems that cannot be DrvFS. Skip that work using the existing exact device identity or one nativefstatfson an already-open parent, and cache only negative device observations. Atomic writes reuse their directory-mode descriptor; writers without one reuse their existing cold recovery-parent acquisition. A stale negative entry can only retain strict behavior. Full recovery-time mount, parent, identity, ownership, mode and content checks remain unchanged.The change adds no caller option or package export. Native probe absence/failure retains the previous preparation path on anonymous-device filesystems; Linux block-device filesystems are excluded without I/O. Cold-negative cleanup relinquishes parent ownership before closing, preventing a retry from closing a reused descriptor after a close error.
Validation includes failing-first async/sync regressions, callback/JSON writers, positive and unavailable observations, parent-close ownership, and existing recovery adversaries. Linux Node and the pinned OpenClaw Bun pass 41 focused tests. On ext4 and tmpfs, warmed async/sync success, EACCES and EIO paths add zero filesystem calls in two repetitions; native auto and forced-off modes match after warming the negative cache. The initial anonymous-filesystem observation adds one
fstatfsfor atomic writes. Independent Codex review is clean at P0–P2.The full local suite passed: 843 test files, 18,822 tests (42 files and 863 tests skipped).
pnpm pack:checkpassed after hydrating the unchanged Windows helper from the published 0.28.0 package and verifying its SHA-256;git diff --checkpassed. The fullpnpm checkreached that same package gate after its successful test suite; the missing build prerequisite was resolved separately without repeating the suite.