fix: allow symlinked workspace write parents#85818
Conversation
|
Codex review: needs maintainer review before merge. Latest ClawSweeper review: 2026-05-24 02:30 UTC / May 23, 2026, 10:30 PM ET. Workflow note: Future ClawSweeper reviews update this same comment in place. How this review workflow works
PR Surface View PR surface stats
Summary Reproducibility: yes. at source level: the linked report gives a concrete Linux PR rating Rank-up moves:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. Real behavior proof Risk before merge
Maintainer options:
Next step before merge Security Review detailsBest possible solution: Land the bounded parent-canonicalization fix after maintainer filesystem-boundary review and current-head required checks, leaving the linked bug open until the merge closes it. Do we have a high-confidence way to reproduce the issue? Yes, at source level: the linked report gives a concrete Linux Is this the best way to solve the issue? Yes, with maintainer boundary approval: the patch keeps the lexical workspace check, canonicalizes only the existing parent, and still relies on fs-safe for final-file, hardlink, and outside-root enforcement. Label justifications:
Acceptance criteria:
What I checked:
Likely related people:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 029472c6defd. |
cb3394e to
4a4b562
Compare
|
ClawSweeper PR egg ✨ Hatched: 🥚 common Gilded Proofling Hatch commandComment Hatchability rules:
Rarity: 🥚 common. What is this egg doing here?
|
4a4b562 to
039743f
Compare
039743f to
0443b85
Compare
Summary
@openclaw/fs-safe.Fixes #84696.
Verification
OPENCLAW_VITEST_MAX_WORKERS=1 OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=900000 CI=1 node scripts/run-vitest.mjs src/agents/pi-tools.workspace-paths.test.ts src/agents/pi-tools.workspace-only-false.test.ts src/infra/fs-safe.test.ts src/agents/sandbox/fs-bridge.anchored-ops.test.tsgit diff --check HEAD~1 HEADcorepack pnpm exec oxfmt --check --threads=1 CHANGELOG.md src/agents/pi-tools.read.ts src/agents/pi-tools.workspace-paths.test.tscorepack pnpm exec oxlint src/agents/pi-tools.read.ts src/agents/pi-tools.workspace-paths.test.tscodex review --base origin/main-> no discrete regression identifiedblacksmith-testbox, idtbx_01ksb7fefnehdfdn2kme3h9d9w, Actions run https://github.com/openclaw/openclaw/actions/runs/26342424451, commandpnpm check:changed, exit 0Real behavior proof
Behavior addressed: workspace-only host
writeandeditnow work through in-workspace symlink directory parents such asmemory -> oc_system/memoryinstead of surfacingdirectory component must be a directory.Real environment tested: WSL Ubuntu 24.04 durable checkout, branch
fix-84696-symlink-write-parent, local headcb3394edd7; broad validation on Blacksmith Testbox through Crabbox.Exact steps or command run after this patch: focused Vitest command above, diff/format/lint checks, Codex review, and Testbox
pnpm check:changedvianode scripts/crabbox-wrapper.mjs run --provider blacksmith-testbox ....Evidence after fix: regression tests create real Linux symlink parents and prove
write("memory/2026-05-20.md")and edit throughmemory/...land in the real target directory; companion tests prove outside-workspace symlink parents are rejected and final file symlinks are still not followed.Observed result after fix: 7 focused test files passed with 98 tests; local static checks passed; Codex review found no discrete regression; Testbox
pnpm check:changedpassed with exit 0.What was not tested: a live model-driven OpenClaw agent session after context compaction was not run; the failing filesystem/tool path is covered directly through the host write/edit tool operations and the broad changed gate.