Repository navigation
chore(deps): update fs-safe to 0.25.0 - #167476
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: needs maintainer review before merge. What this changesUpdates fs-safe to 0.25.0 across OpenClaw and bundled plugins, adjusts affected test fixtures, and documents Linux workspace publication fallback. Example: Start an SSH sandbox on a Linux volume that rejects RENAME_NOREPLACE.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This PR remains useful: current main still uses fs-safe 0.24.2. The earlier findings are resolved, and no actionable patch defect remains; the documented publication tradeoff has owner approval. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherOpenClaw uses fs-safe for guarded filesystem operations, including capturing plugin dependencies and publishing uploaded sandbox workspaces. OpenClaw retains transport and lifecycle authority while the dependency owns filesystem primitives. flowchart TD
A[Plugin loading] --> B[Guarded dependency capture]
C[SSH sandbox startup] --> D[Upload complete workspace]
B --> E[fs-safe filesystem operations]
D --> E
E --> F{Native no-replace rename supported?}
F -->|Yes| G[Publish workspace]
F -->|Linux rejection| H[Check target and use bounded fallback]
H --> G
Technical reviewBest possible solution: Keep filesystem fixes in fs-safe and consume the released version while preserving OpenClaw's transport, capture integrity, and lifecycle ownership contracts. Do we have a high-confidence way to reproduce the issue? Yes: current main imports the 0.24.2 guest helper, and the reported selective RENAME_NOREPLACE rejection reaches its directory hard-link failure; contributor and upstream traces establish the before/after path. Is this the best way to solve the issue? Yes: updating the shared filesystem owner fixes the guest path without adding a competing OpenClaw fallback, and the consumer adaptations preserve existing behavior tests. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 56e0b789bece. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource 0, Tests +4, Docs +5, Config 0, Other 0. Total +9 across 21 files. Added test files: 0. View PR surface stats
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes: No label changes. Label justifications:
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 HistoryReview history (9 earlier review cycles; latest 8 shown)
Reviewed October 8, 2026, 10:47 PM ET / October 9, 2026, 02:47 UTC (Revision 10). |
|
|
|
The remaining I ran the unchanged full test file in separate physical worktrees and frozen installs on the same AWS m7a.xlarge lease, with Node 24.19.0, pnpm 12.5.1, two-CPU affinity, two workers, and 16,373,194,752 bytes of reported RAM. Both private-QA builds passed. The test's 120,000 ms recovery wait and assertions were unchanged.
Both outputs have the same failure sequence (timestamps and bundled paths normalized; the bracketed line summarizes repetitions): The sole outbound event is the recovery-failure notice, not a successful resumed reply. This matches the first CI failure and its one unchanged QA rerun (job 113618473743). It establishes inheritance of this failure; it does not claim the underlying recovery bug is fixed. Each case used: pnpm install --frozen-lockfile
CI=1 OPENCLAW_BUILD_ALL_NO_PNPM=1 OPENCLAW_BUILD_PRIVATE_QA=1 \
NODE_OPTIONS=--max-old-space-size=8192 taskset -c 0,1 pnpm build qaRuntime
export CI=1 OPENCLAW_BUILD_ALL_NO_PNPM=1 NODE_OPTIONS=--max-old-space-size=8192
export OPENCLAW_VITEST_MAX_WORKERS=2 OPENCLAW_VITEST_WORKER_CACHE=1
export OPENCLAW_E2E_USE_PREBUILT_DIST=1 OPENCLAW_CI_TEST_RUNTIME_POLICY=bun-compatible
export OPENCLAW_NODE_TEST_TARGETS_JSON='["extensions/qa-lab/src/gateway-kill-restart-send.e2e.test.ts"]'
export OPENCLAW_NODE_TEST_PLAN_CONCURRENCY=1 OPENCLAW_NODE_TEST_PLAN_CONTINUE_ON_FAILURE=1
export OPENCLAW_VITEST_FS_MODULE_CACHE_WRITER=0 OPENCLAW_NODE_COMPILE_CACHE_WRITER=0
export NODE_COMPILE_CACHE_PORTABLE=1
# Each worktree has its own OPENCLAW_VITEST_FS_MODULE_CACHE_ROOT and NODE_COMPILE_CACHE.
taskset -c 0,1 node --import tsx scripts/ci-run-node-test-shard.mtsProvider: Android is separate: both controlled native-test replays passed 3,689 tests with identical generated assets, but they did not reproduce its original 20-minute CI deadline. Its one targeted CI retry is still pending; no inherited-failure exception is claimed for Android. Landing remains through |
* chore(deps): update fs-safe to 0.25.0 * test: align fs-safe consumers with native publication and release * test(codex): control required-result contract timing
The fs-safe 0.25.0 upgrade in ca31b89 (#167476) exposes the Windows service fixture passing a POSIX native binding through Windows ABI calls. The first artifact lock fails with binding.fstatIdentity missing and leaves ownership behind. Keep real artifact admission, baseline capture, database restoration, and lock cleanup on the actual host while the caller retains its simulated service platform. Preserve all filesystem and rollback behavior; no native-backend disablement or fake success results.
The fs-safe 0.25.0 upgrade in aecaad3 (openclaw#167476) exposes the Windows service fixture passing a POSIX native binding through Windows ABI calls. The first artifact lock fails with binding.fstatIdentity missing and leaves ownership behind. Keep real artifact admission, baseline capture, database restoration, and lock cleanup on the actual host while the caller retains its simulated service platform. Preserve all filesystem and rollback behavior; no native-backend disablement or fake success results.
What Problem This Solves
Plugin loading spends too long capturing dependency files, and SSH workspace seeding fails on Linux volumes that reject
RENAME_NOREPLACE.Closes #167231. Related: #167033 (left open for appliance-specific confirmation).
User Impact
Consumes the filesystem performance, guest-publication, lock-release, and temporary-directory diagnostic improvements in fs-safe 0.25.0. The installed-OTEL full-flow case passes in 110.859 seconds against its unchanged 180-second deadline. SSH sandbox workspace seeding now succeeds under a selective Linux no-replace-rename failure.
The guest directory fallback preserves targets present at its absence check and refuses nonempty directory/file competitors. An empty directory created after that check can be replaced; this is the upstream documented fallback contract.
Why This Change Was Made
Update all 13 direct pins, regenerate the seven native package locks and npm lock mirrors, and rotate the eight reviewed-release exceptions with a removal date. The regenerated lockfile changes only the fs-safe family; platform constraints and the independent transitive 0.12.0 family remain intact.
Release notes: 0.25.0 changelog.
Evidence
pnpm tsgo:alllanes, targeted lint, docs formatting/link audit, andgit diff --checkpassed. The controlled installed-OTEL comparison and explicit child-process profiles passed on both versions. All 19 focused Linux plugin suites passed (444 tests; conditional APFS and Bun cases skipped).~entry. No caller adaptation.Historical retained observations reported by fs-safe #878: 119.383 s passing before capture migration; 252.762 s afterward, exceeding the unchanged 180 s limit;
copyRootFileSyncattributed 20.428 s per load. These are historical observations, not current candidate results. Fresh measurements below use the canonical current test on the same Linux Blacksmith Testbox (effective CPU count was not captured for that timing lease); the historical hardware/trace artifacts were unavailable, so these are not a claim of identical historical hardware.Thanks @valkyriweb and @joequant for the filesystem reports.
Plugin-load measurement
Command:
CI=1 OPENCLAW_VITEST_MAX_WORKERS=1 OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=900000 node scripts/run-vitest.mjs run --config test/vitest/vitest.e2e.config.ts test/e2e/qa-lab/runtime/diagnostics-otel-install-runtime.e2e.test.ts -t 'installs the exact package and exports with config precedence, sampling, and flush' --maxWorkers=1. The test deadline remains 180,000 ms; the no-output process watchdog covers cold build/setup and does not change that test deadline.Provider:
blacksmith-testbox, leasetbx_01m4etdgdckmyy37bexy0v135v, runner, Linux x64, Node 24.19.0, pnpm 12.5.1. Candidate is5f671e5063f82e502c49cc93ce4436e4805777a0; baseline is its pre-bump main ancestore09e5ddfa52cfeac2ff7a77a5c419bf43d64cf77, installed separately.Copy-path attribution
A separate diagnostic fixture retained the same assertions and 180-second deadline and passed profiling flags explicitly through the child command. The hermetic test environment still removes ambient
NODE_OPTIONS. Onblacksmith-testboxleasetbx_01m4ex15p7m3dr54asbxscbdbn(runner),nprocand affinity verified four available CPUs; Node 24.19.0 and pnpm 12.5.1 matched across versions.copyRootFileSynctimeplugins inspect diagnostics-otel --runtime --jsonprocessassertCurrentin that processThe aggregate is not per-load time. Metadata bound the inspection profiles to their actual command/PID and copy frames to
capturePluginGenerationArtifact. The parser covers both the oldcopy-root-file-sync.jsand newcopy-path-admission.jscheck layouts. Paired raw-profile hashes and metrics were independently verified. Both performance leases are stopped. Both profiling cases passed: 123.713 s on 0.24.2 and 102.420 s on 0.25.0. Uninstrumented timings above remain the performance comparison.SSH sandbox reproduction
Provider:
blacksmith-testbox, leasetbx_01m4es8wdpr4ek0dcsh61whpqp, runner, Linux x64, Node 24.19.0, pnpm 12.5.1. Lease stopped.A compiled seccomp filter returned EINVAL only for
renameat2(RENAME_NOREPLACE). An independent probe confirmed ordinary rename, flags-zero renameat2 and link/unlink remained allowed. The actualRemoteShellSandboxBackend.runShellCommandpath exercised workspace initialization, the real session and tar upload, and guest publication through a local-shell transport. This simulates the reported syscall failure; it is not a new real-runsc claim.The candidate seeded complete primary and agent workspaces, preserved existing empty/nonempty/file targets, avoided reseeding, and left no staging directories. The tested bump commit
7fc95fc2ad5b4f6a9f6c3c25c4c78a816779c127differs from the current head only in the documented error wording and consumer fixtures/docs.CI investigation
Exact head
5f671e5063f82e502c49cc93ce4436e4805777a0, CI run 37852582162, attempt 2 had 158 passing jobs, 18 skipped jobs, two failing shards and the aggregate gate. The single dynamic-tools retry in attempt 3 failed with the same timeout. No admin merge has been attempted or qualified for that failure. The fixture-clock repair below passed its new-head CI bundle.The first-attempt Telegram join-introduction QA case timed out at 120 s. Its one requested rerun passed unchanged in 118.028 s (job); this is recorded as a transient failure, not a claimed code fix. The exact CI merge
02a3df93bd2dfb83cf0075d3571fae16f71216e5and its main parent6ae2aee12eb0641b623e8c34840b47de9cff2022were compared in isolated frozen installs on Linux/Node 24.19.0, two CPU affinity and two workers (runner, stopped leasetbx_01m4eww7evbvw10avpany0fgc9):2147000000ms ignored enqueue elapsed time; actual values were2146999999.990242(0.25.0) and2146999999.993057(0.24.2). Main later fixed the assertion in fix(test): compaction worker clamp test fails on main after queue-anchored deadlines #167513 (7e80556f503d26ddde64e274bfb50cbbec7830f5). This failure is proven inherited.Required-command fixture timing repair
The first dynamic-tool contract test originally started its five-second attempt watchdog on real time, then installed fake timers only after the command began. Slow fixture startup can therefore expire the attempt while the test is still waiting for the mocked command. The neighboring process-poll contract already owns its clock from startup through settlement.
The repair owns
Date,setTimeout, andclearTimeoutbefore starting the attempt, keeps that clock through terminal-result collection, and explicitly configures a 10 ms yield window before advancing 20 ms. It preserves the single-spawn/single-turn, pending-call, complete-result, and successful-terminal assertions. The five-second attempt budget and 120-second test limit are unchanged. Production execution and cancellation behavior are unchanged.A diagnostic negative control with
awaitResults: falsereturnedCommand still runningand failed the preservedREQUIRED_NATIVE_RESULTassertion. The early pending assertion itself passed because asynchronous projection delivered later. A separate synthetic six-secondturn/startreply delay exhausted the old fixture's real five-second attempt deadline and leftcommand.startedunresolved until the unchanged 120-second test timeout. With clock ownership, that same injected delay passed. This establishes the fixture mechanism and its repair, not a reproduction or inheritance qualification of the original CI failure. Diagnostic logging and delay injection are not part of the patch.Independent Codex review of the fixture change is clean at P0–P2; formatting, focused lint, and the extension test typecheck passed. The exact-patch Linux validation passed all 20 standalone full-file runs (six tests each), all three original six-file shards (55 tests each; 94.440/73.435/80.685 s whole commands), and all 101 tests across five owner sibling files. The runner verified file SHA-256
7140e0f8a374d25f1f708617dd608cbf4016993df1738900d932dbb4a8bc0a62, Node 24.21.0, four CPUs, three shard workers, and read-only transform caches.pnpm test extensions/codex/src/app-server/run-attempt.dynamic-tools.test.ts --maxWorkers=1took 42.383–88.824 s (median 49.125 s) per Linux invocation; the loaded Mac's cold command took 227.15 s, including compilation. This existing integration contract crosses production host capabilities, execution ownership, and dynamic-tool response collection; a helper-only assertion cannot protect that end-to-end pending-result handoff. No new process boots, sleeps, or test timeout increases were added.Provider:
blacksmith-testbox, leasetbx_01m4eyhp6fte1m9werggt5wmz7(runner). New-head CI run 37865563961 has passed all extension bundles including the repaired dynamic-tool group. The QA restart-recovery test inchecks-node-changed-2timed out at 120 seconds after restart on its first attempt and its one unchanged rerun (retry job); both logs show recovery dispatch aborting after startup-scope shutdown. Android third-party JVM tests independently reached their 20-minute job deadline. The QA failure is now proven inherited by the exact tested-merge/main-parent A/B below. Android passed its one targeted retry. The sole remaining failure is the independently qualified QA case; the matching main/candidate failures are documented below. The merge is verified on upstream main.Inherited QA failure: same-environment A/B
The unchanged
extensions/qa-lab/src/gateway-kill-restart-send.e2e.test.tsfails on both the actual CI main parent and tested merge on one AWS m7a.xlarge lease (cbx_ccb7e7b30b6e, proof run). Both private-QA builds and frozen installs passed. Node 24.19.0, pnpm 12.5.1, two-CPU affinity/two workers, and reported RAM of 16,373,194,752 bytes were held constant. The original 120-second recovery wait and every assertion remain unchanged.c9a0c00b8691bda5bd7a38ee494b5edd8ecb9254dfbaea58c5477c4886667bf2cf50a8274d3a2a65Both mark one startup orphan, fail all three recovery attempts with
AbortErrorfromAsyncWorkScope.beginClose → startupOperations.close, tombstone the recovery, and exhaust the 120,000 ms wait with bus kinds[inbound-message,outbound-message]. The outbound message is the failure notice. This independently qualifies the QA failure as inherited, while leaving its underlying lifetime bug unresolved. The earlier queued lease and an 8 GiB build OOM produced no QA test results and do not contribute to that conclusion.Android deadline investigation
The original Android JVM task reached its 20-minute CI deadline without an assertion log. Four examined scheduled-main counterparts passed; no inherited failure is claimed. Native source/configuration inputs are unchanged across the baseline and candidate, and all 31 generated protocol, i18n, Mermaid, and Sodium assets match byte-for-byte.
A corrected controlled replay on Blacksmith Testbox (
tbx_01m4f4b060xrpg3tzswj87tjc3, run, released) passed 3,689 tests / 278 suites on each version: 292.988 s on main and 296.794 s on the tested merge. Fresh JUnit reports verify actual unit-test execution. No assertions, the warning policy, or the 20-minute budget were relaxed. The first diagnostic observer itself violated Gradle's deprecation policy; that initial command outcome is excluded.The replay had 15.418 GiB RAM, controlled two-CPU affinity, and warmed variant-owned caches; original CI had 7.654 GiB and its sticky caches. Original runner metrics recorded earlier memory pressure and later low CPU, but no OOM and no retained Java stacks. These facts do not identify the stall. The single targeted retry is job 113638141092, on a GitHub-hosted runner at the unchanged head; it passed unchanged in 13 minutes 34 seconds. That GitHub-hosted retry used one JVM fork versus the original Blacksmith job’s two. No inherited-failure exception is claimed for Android.
Final exact-head CI (run 37865563961, attempt 3): 160 successful jobs, 18 conditional skips, one inherited QA failure and its downstream aggregate; no cancelled jobs. The QA result is carried from its executed attempt-2 retry; it is not a third QA failure. The public A/B evidence supports only that exception. Android's unchanged retry passed on a GitHub-hosted runner. All task-owned proof leases are released. Merged as ca31b89d2217. Upstream main verification confirms all 13 direct pins/importers and seven platform locks at exactly 0.25.0, with no 0.24.2 family entries. The separate transitive 0.12.0 family remains intact.