Skip to content

fix(deps): adopt fs-safe 0.27.1 for responsive filesystem operations - #192996

Merged
vincentkoc merged 4 commits into
mainfrom
chore/fs-safe-0.27.1
Nov 4, 2026
Merged

vincentkoc merged 4 commits into
mainfrom
chore/fs-safe-0.27.1

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

What Problem This Solves

OpenClaw still uses fs-safe 0.27.0, whose native POSIX staged writes and awaited path traversal can block the Gateway event loop on slow storage.

User Impact

Adopts fs-safe 0.27.1, which moves those filesystem waits off the JavaScript thread while preserving confinement, identity checks, file modes, and durability. This addresses the affected operations, not every source of event-loop delay.

Why This Change Was Made

Update all 13 direct pins together, regenerate the pnpm lockfile, and replace the 11 exact-version release-age exemptions. The exemptions expire seven days after the final package publication. The independent acpx dependency on fs-safe 0.26.15 remains unchanged. The lockfile also contains one pnpm-generated normalization of existing [email protected] optional metadata; no unrelated dependency versions changed.

Five existing tests now observe the intended boundaries:

  • Memory I/O faults target async POSIX traversal or sync Windows traversal, preserving original EIO rejection without retry and EAGAIN recovery.
  • Directory-rebinding rejection uses the existing host-root escape classifier and retains the outside-file byte check.
  • Catalog cadence observes directory enumeration, excluding unrelated identity probes during thread upserts.
  • File-transfer EIO injection starts after real archive extraction, preserving the manifest error identity and absence of a successful audit.
  • The restart test now follows the crash-resume contract introduced by #190964 and bounded to the preceding Gateway lifetime by #190995. Its older idle-after-SIGKILL expectation was stale. It proves one ordinary resume input on the same persisted session without replaying the original prompt, explicitly aborts this isolated test's resumed wait, waits for idle, and proves a fresh message receives its own reply.

The narrow 60-line test allocation matches exact net growth for scoped fault injection, retry assertions, and the existing crash/restart lifecycle proof. No new test cases, production hooks, runtime source, timeouts, or OpenClaw release metadata changed.

Related: #190233
Upstream fixes: openclaw/fs-safe#1052, openclaw/fs-safe#1053, openclaw/fs-safe#1054

Evidence

  • Current ready-PR CI validates ba2fd98c0e89372decfbfa1005804574e80881dd. Its QA lane passed the changed real-Gateway restart test (16.15s test time, 53.84s Vitest wall time, 55.46s runner shard) and its sibling. The existing E2E process/restart boundary cannot be proved by a mocked helper; no new test case was added. The complete run, build, PostgreSQL conformance, and aggregate gate passed; required checks are green.

  • Upstream release run completed package integrity, signature, and provenance verification. All 11 new lockfile integrity values match the registry.

  • pnpm 12.15.0 lockfile-only resolution passed supply-chain policy verification for all 1,748 entries. All 13 manifests and importers agree; the 11 older package records and 11 older snapshots remain unchanged.

  • Native formatting and git diff --check passed. Independent review of the complete 21-file candidate against fc5fec19bdefeb475edbccaaf9d19557af59a9e0 found no P0–P2 defects in the working-tree repair; its index-only stale-assertion finding was resolved by staging that repair. A separate review caught and corrected empty-transcript polling during startup.

  • On f210fdaf6180db12f77a732182fdea33d4b5175e, ready-PR CI passed the build, catalog, and file-transfer lanes. Its QA failure demonstrated the obsolete no-resume assertion; the current patch corrects that contract. That failure is corrected and the replacement-head run above passed.

  • On previous head a52e5ae6fb0217493e0b929f9f2e58a0b90bb908, the exact-source build, memory lane, and agents-core tools lane passed. Preflight checkout logs bind that manual-run proof to the source SHA; its workflow ref differs. Subsequent ready-PR CI reported the catalog/file-transfer measurement failures and the stale SIGKILL expectation described above. These prior results are not presented as final-head proof or a green broad manual run.

  • Local runtime/build and focused Testbox proof were unavailable: the code-only worktree has no qualified dependency installation, and the wrapper correctly refused a stale tooling owner before allocation. The config-docs pre-commit check had the same setup gap; commits used the documented hook-skip route after separate native formatting proof. Hosted CI owns the missing checks.

The initial manual dispatch failed configuration preflight before build or runtime tests. Later dispatches used the documented default validation setting. No failures were hidden with ignores, snapshots, or retries.

@vincentkoc vincentkoc self-assigned this Nov 4, 2026
@clawsweeper

clawsweeper Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 4, 2026
@clawsweeper

clawsweeper Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

Updates all direct fs-safe dependencies to 0.27.1, refreshes the lockfile, and replaces the matching release-age exemptions.

Example: A POSIX Gateway writes a workspace file while storage is slow.

  • Before: Native staged creation and publication can block the JavaScript thread.
  • After: Those operations use asynchronous native tasks, allowing other Gateway work to progress.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful and narrowly scoped, with upstream behavioral support, but a confirmed consumer-test failure prevents merge readiness.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored PR is outside the ordinary contributor proof gate; upstream real-binding tests and measurements support the offload, while publication integrity and CI do not demonstrate Gateway responsiveness.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Slow filesystem operations can stall unrelated Gateway work despite callers awaiting promise-returning APIs.
Reason: The maintainer-authored adoption addresses observed stalls through the existing dependency owner while preserving the documented platform boundaries.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep this PR open: the dependency upgrade addresses verified filesystem stalls, but it breaks an existing memory-reader fault-injection regression.

Priority: P2
Reviewed head: 72843910904b95e3768a31f1458490b35a175233

Before merge

  • Move memory-read fault injection to asynchronous traversal (P2) - The dependency upgrade changes POSIX Root traversal from lstatSync to asynchronous lstat, but this consumer regression still injects EAGAIN and EIO only through lstatSync. The fault is bypassed, so the EIO case returns successful memory contents instead of rejecting, as confirmed by the linked CI annotation. Update the injection to the asynchronous traversal boundary and retain both transient-retry and permanent-error assertions.

Findings

  • [P2] Move memory-read fault injection to asynchronous traversal — packages/memory-host-sdk/src/host/read-file.test.ts:107-108

Tests

  • Missing end-to-end proof: The supplied evidence does not demonstrate an OpenClaw Gateway remaining responsive during the upgraded slow-filesystem operations.
Agent review details

How this fits together

OpenClaw filesystem adapters and bundled plugins pass confined read and write requests to fs-safe, which performs guarded filesystem operations and returns bytes, receipts, or errors.

flowchart LR
  A[Gateway and agent tools] --> B[OpenClaw filesystem adapters]
  C[Bundled plugins] --> D[fs-safe]
  B --> D
  D --> E[Async POSIX operations]
  D --> F[Identity and policy checks]
  E --> G[Filesystem]
  F --> G
Loading

Technical review

Best possible solution:

Retain the aligned dependency upgrade and update the memory-reader fault injection to exercise asynchronous traversal without weakening its retry and error assertions.

Do we have a high-confidence way to reproduce the issue?

Upstream identifies the blocking native operations and supplies parent-failing real-binding regressions; current main still consumes the affected version, and no target code was executed during this review.

Is this the best way to solve the issue?

Updating the shared filesystem dependency is the smallest complete adoption path; the existing consumer regression must follow its changed asynchronous I/O boundary.

Full review comments:

  • [P2] Move memory-read fault injection to asynchronous traversal — packages/memory-host-sdk/src/host/read-file.test.ts:107-108
    The dependency upgrade changes POSIX Root traversal from lstatSync to asynchronous lstat, but this consumer regression still injects EAGAIN and EIO only through lstatSync. The fault is bypassed, so the EIO case returns successful memory contents instead of rejecting, as confirmed by the linked CI annotation. Update the injection to the asynchronous traversal boundary and retain both transient-retry and permanent-error assertions.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.95

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against d0fc13b500f5.

Provenance checked

  • Aligned fs-safe manifests, lock records, and release-age exemptions keeps the original intent (b932008: The previous adoption aligned direct consumers and preserved directory modes using fs-safe's explicit preservation API.)
  • Retained independent acpx dependency keeps the original intent (b1a2aa2: The independent acpx package requires fs-safe 0.26.15; its package records and snapshots remain unchanged.)
  • escape-string-regexp optional metadata normalization changes intended behavior with a stated reason (unknown: The PR explains this as generated pnpm normalization with the package version unchanged; scoped history search encountered unavailable older lockfile contents.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

Acceptance criteria:

  • pnpm test packages/memory-host-sdk/src/host/read-file.test.ts
  • git diff --check

What I checked:

Likely related people:

  • Vincent Koc: Raw commit b2cb79b adds pnpm-workspace.yaml:17 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: b2cb79bfab75; files: pnpm-workspace.yaml)

PR surface

Config 0, Other -1. Total -1 across 15 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 0 0 0 0
Docs 0 0 0 0
Config 14 25 25 0
Generated 0 0 0 0
Other 1 70 71 -1
Total 15 95 96 -1

Labels

Label changes:

  • add P2: The upgrade addresses storage-induced Gateway stalls, with a focused consumer-test repair needed before merge.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P2: The upgrade addresses storage-induced Gateway stalls, with a focused consumer-test repair needed before merge.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 4, 2026, 3:44 PM ET / 20:44 UTC.

@openclaw-barnacle openclaw-barnacle Bot added the agents Agent runtime and tooling label Nov 4, 2026
@socket-security

socket-security Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​@​openclaw/​fs-safe@​0.27.0 ⏵ 0.27.199100100 +198100

View full report

@vincentkoc
vincentkoc marked this pull request as ready for review November 4, 2026 21:18
@github-actions github-actions Bot added the dependencies-changed PR changes dependency-related files label Nov 4, 2026
@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Dependency graph changes

This maintainer PR changes the dependency graph.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: ba2fd98c0e89372decfbfa1005804574e80881dd
  • Maintainer: @vincentkoc
  • Repository role: admin

These dependency graph changes were made:

  • pnpm-lock.yaml
  • pnpm-workspace.yaml
  • extensions/acpx/package.json
  • extensions/codex/package.json
  • extensions/cua-computer/package.json
  • extensions/file-transfer/package.json
  • extensions/knowledge/package.json
  • extensions/llama-cpp/package.json
  • extensions/matrix/package.json
  • extensions/memory-core/package.json
  • extensions/migrate-claude/package.json
  • extensions/openshell/package.json
  • extensions/qa-lab/package.json
  • extensions/signal/package.json
  • package.json

Carefully review these changes before merging.

@vincentkoc
vincentkoc enabled auto-merge (squash) November 4, 2026 21:25
@vincentkoc
vincentkoc disabled auto-merge November 4, 2026 21:37
@vincentkoc
vincentkoc merged commit 5b0e4e8 into main Nov 4, 2026
255 checks passed
@vincentkoc
vincentkoc deleted the chore/fs-safe-0.27.1 branch November 4, 2026 22:53
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

RomneyDa added a commit that referenced this pull request Nov 5, 2026
Resolve the conflict with #192996 by retaining its verified recovery test and removing this branch's superseded test-line allocation. The resulting tree is identical to main cc595f5.
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 5, 2026
…penclaw#192996)

* fix(deps): adopt fs-safe 0.27.1 for responsive filesystem operations

* test(fs): align fault injection with asynchronous traversal

* test(fs): measure filesystem effects at their owning boundaries

* test(qa): align hard-kill recovery with resume contract
github-actions Bot pushed a commit to clawhaven/openclaw that referenced this pull request Nov 23, 2026
…penclaw#192996)

* fix(deps): adopt fs-safe 0.27.1 for responsive filesystem operations

* test(fs): align fault injection with asynchronous traversal

* test(fs): measure filesystem effects at their owning boundaries

* test(qa): align hard-kill recovery with resume contract

Source: 5b0e4e8

Release adaptation: Adopted exact fs-safe 0.27.1 root and 12 bundled declarations from baseline 0.26.13, matching 13 lock importers and native package integrity/snapshot blocks copied from pinned source. Kept unrelated lock metadata and transitive entries. Four directly affected filesystem regressions retained; unrelated QA crash-resume test and allocation omitted. Existing async API only; no resolvePathPrefix/vendoring. Consistency assertion, JSON parse, formatting/diff pass. No install changed; native runtime proof remains pending. Later 0.28 update/rollback deliberately excluded.

Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit 2fde0641ff865f1d881b6ac4df10db02ab7f19d7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling channel: matrix Channel integration: matrix channel: signal Channel integration: signal dependencies-changed PR changes dependency-related files extensions: acpx extensions: codex extensions: llama-cpp extensions: memory-core Extension: memory-core extensions: openshell extensions: qa-lab P2 Normal backlog priority with limited blast radius. plugin: cua-computer plugin: file-transfer plugin: knowledge plugin: migrate-claude rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant