Repository navigation
fix: preserve file operations with fs-safe 0.13.1 - #150263
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. |
Dependency GuardThis PR changes dependency-related files. Maintainers should confirm these changes are intentional. Changed files:
Maintainer follow-up:
|
Dependency graph changes notedThis PR includes dependency graph changes. The dependency guard is informational because the PR author is a repository admin, a member of
Security review is still recommended before merge when the dependency graph change is intentional. |
|
Codex review: blocked before merge. Reviewed September 16, 2026, 8:09 PM ET / September 17, 2026, 00:09 UTC (Revision 6). ClawSweeper reviewWhat this changesUpgrades fs-safe to 0.13.1, enables automatic native filesystem helpers, preserves optional attachment filenames, and updates filesystem fault-injection tests and documentation. Merge readiness⛔ Blocked before merge - 2 items remain This adoption remains useful and is absent from current main. No blocking patch defect was found; the updated maintainer decision resolves the previous compatibility-choice blocker, and both Windows CI lanes now pass on the reviewed head. Priority: P2 Review scores
Verification
How this fits togetherOpenClaw uses fs-safe to guard local file operations for attachments, memory, migrations, and other runtime services. It translates bounded filesystem requests into native or JavaScript operations while preserving path, identity, and publication checks. flowchart TD
A[Attachments and runtime files] --> B[OpenClaw filesystem adapters]
B --> C[fs-safe policy and identity checks]
D[Explicit native mode] --> C
C --> E{Required primitive available?}
E -->|Yes| F[Guarded filesystem operation]
E -->|No| G[Documented fallback or refusal]
F --> H[Published file or verified read]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -74, Tests +391, Docs 0, Config +7, Other +7. Total +331 across 51 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep atomic publication and configuration precedence owned by fs-safe, preserve caller-visible filenames, and retain the documented recovery path under the recorded compatibility decision. Do we have a high-confidence way to reproduce the issue? No failing current-main runtime was executed during this read-only review; source inspection and the recorded native probes establish the relevant dependency behavior and adoption regressions. Is this the best way to solve the issue? Yes. Using the upstream configuration, atomic-move, and diagnostic owners removes duplicated policy while the targeted filename adaptations preserve existing behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a5be82716c08. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
Exercise the real secure-temp resolver for private-root creation and repair while preserving shared-parent permissions. Keep replaced staging inodes open through publication so Linux cannot immediately reuse their identities; retain the strict rejection and cleanup assertions.
Select an isolated log file while mocking the logical platform and restore the previous override through the logger owner. This keeps cold Windows runs from failing before the second port poll while preserving the existing environment and signal assertions.
Check the complete guarded Fish source block instead of searching for raw Windows paths. Preserve installation, idempotence, cache, and command-registration assertions, and verify a fixed Windows path against a literal quoted reload command.
Keep main’s canonical complete publisher-inventory equality checks when resolving the sole conflict. Preserve all remaining reviewed adoption files and all current-main changes.
|
Merged via squash.
|
Root reads in fs-safe 0.13.1 use dedicated final-admission hooks. Move the post-stat growth fixture to beforeRootReadFinalFence so its real read instrumentation and aggregate-budget assertions execute again. Related: openclaw#150263.
* fix: preserve file operations with fs-safe 0.13.0 * fix: preserve native filesystem consumer behavior * build: adopt verified fs-safe 0.13.1 artifacts * test: align release inventory with deferred plugins * test: make temp permissions and staging swaps deterministic Exercise the real secure-temp resolver for private-root creation and repair while preserving shared-parent permissions. Keep replaced staging inodes open through publication so Linux cannot immediately reuse their identities; retain the strict rejection and cleanup assertions. * test: isolate logs in diagnostic environment fixtures Select an isolated log file while mocking the logical platform and restore the previous override through the logger owner. This keeps cold Windows runs from failing before the second port poll while preserving the existing environment and signal assertions. * test: assert Fish-quoted completion profile paths Check the complete guarded Fish source block instead of searching for raw Windows paths. Preserve installation, idempotence, cache, and command-registration assertions, and verify a fixed Windows path against a literal quoted reload command.
…penclaw#150419) Root reads in fs-safe 0.13.1 use dedicated final-admission hooks. Move the post-stat growth fixture to beforeRootReadFinalFence so its real read instrumentation and aggregate-budget assertions execute again. Related: openclaw#150263.
What Problem This Solves
Adopts fs-safe 0.13.1 while keeping attachment staging, migration claims, Memory Wiki rollback, and completion installation working with native filesystem operations.
User Impact
Supported installations select the native helper automatically, so atomic moves preserve competing destinations and Worker-backed operations remain quiet during normal execution and error cleanup. Explicit native-mode settings and sealed workers' native-off policy remain honored.
Maintainer decision: retain atomic no-clobber semantics and accept the documented need for operator intervention when native support is disabled or absent. With effective native mode
off, or a missing helper inauto, a no-clobber move to an absent destination rejects withhelper-unavailable(native no-replace move is unavailable). Compiled-package tests verify unchanged source bytes and no destination file. An existing destination instead returnsalready-exists; these are separate outcomes.Operator recovery: change the effective explicit override to
autoor remove it, install OpenClaw with optional platform dependencies enabled on a supported runtime/filesystem, then restart and retry. Unsupported runtimes need a supported environment for these operations. No unsafe fallback or automatic mode override is added. The platform-defaults documentation records the modes, supported helpers, and refusal behavior.The upstream descriptor fix covers normal and error closure; descriptor reclamation after forced
Worker.terminate()remains unsupported.Missing or unusable attachment names stay omitted, and media without a usable original basename retains its UUID-only storage key.
Why This Change Was Made
Pins all four consumers to the verified 0.13.1 release, including the native descriptor-ownership correction found during adoption. Removes both implicit native-off defaults and the write-error decorator now supplied by fs-safe. The generated lockfile retains exact native package edges; eight version-specific cooldown exceptions expire seven days after actual publication.
Fault-injection tests now observe guarded publication and Root operations, retaining collision, authority, cancellation, content, durability, and ownership-aware cleanup assertions. Linux staging replacements keep the original inode open so immediate reuse cannot defeat the intended identity race. Temp-root tests exercise the real secure resolver; diagnostic fixtures isolate logging from their mocked platform; Fish completion tests assert shell-quoted paths. No production logging or shell behavior changes were needed.
Main's OnePassword publication preparation, bundled-plugin deferrals, catalog entries, packaged IMAP regression, and current publisher-inventory equality checks remain intact.
Evidence
6ed8ada97f4650410a297a8501fa409e62523b79: 161 successful jobs, 11 skipped, zero failures. Both Windows shards and the previously failing UI shard passed. UI source and assertions are unchanged.legacy-operator-statewithauto-authin 335 seconds. The selected published baseline is OpenClaw 2026.9.3, whose registry metadata pins fs-safe 0.8.5; candidate installation output confirms fs-safe 0.13.1. This lane uses the published updater and real Gateway against existing state, with a systemctl fixture; individual successful inner assertions are not printed. Its successful upgrade covers a supported installation with the helper available. Disabled/missing-helper behavior is separately covered by the compiled-package refusal and source/destination-preservation tests described above.