[codex] Extract filesystem safety primitives#77918
Merged
Conversation
2b740fc to
d6f9591
Compare
18 tasks
6 tasks
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
May 9, 2026
* refactor: extract filesystem safety primitives * refactor: use fs-safe for file access helpers * refactor: reuse fs-safe for media reads * refactor: use fs-safe for image reads * refactor: reuse fs-safe in qqbot media opener * refactor: reuse fs-safe for local media checks * refactor: consume cleaner fs-safe api * refactor: align fs-safe json option names * fix: preserve fs-safe migration contracts * refactor: use fs-safe primitive subpaths * refactor: use grouped fs-safe subpaths * refactor: align fs-safe api usage * refactor: adapt private state store api * chore: refresh proof gate * refactor: follow fs-safe json api split * refactor: follow reduced fs-safe surface * build: default fs-safe python helper off * fix: preserve fs-safe plugin sdk aliases * refactor: consolidate fs-safe usage * refactor: unify fs-safe store usage * refactor: trim fs-safe temp workspace usage * refactor: hide low-level fs-safe primitives * build: use published fs-safe package * fix: preserve outbound recovery durability after rebase * chore: refresh pr checks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@openclaw/fs-safe.copyIn(rel, source),Root/ReadResult/OpenResult,ensureRoot(),already-existshandling forcreate(), narrowedstoreexports, focused JSON API split, and reduced temp/secret surfaces.@openclaw/fs-safe@0.1.0instead of a local link or GitHub source tarball.The matching fs-safe package changes landed on
openclaw/fs-safe@mainthrough621d643d379533791ab5108e1cf639fc7d8e2c8cand were published to npm as@openclaw/fs-safe@0.1.0.Real behavior proof
@openclaw/fs-safenpm package, with the filesystem safety primitives moved out of OpenClaw internals and low-level lock/pinned-open APIs hidden behind narrower public wrappers.d6f9591be76eeb7967e3de411da20926dde8723f, installing@openclaw/fs-safe@0.1.0from the npm registry.@openclaw/fs-safe@0.1.0, verified registry availability withcurl https://registry.npmjs.org/%40openclaw%2Ffs-safe, ranpnpm --config.minimum-release-age=0 add -w @openclaw/fs-safe@^0.1.0, then ran the focused OpenClaw outbound/fs-safe/plugin SDK checks andpnpm build.@openclaw/fs-safefrom npm at0.1.0,package.jsonno longer uses a GitHub/local source pin, and the rebuilt OpenClaw runtime/plugin SDK output succeeds against the published package.Verification
Latest focused proof after publishing and rebasing:
pnpm buildpnpm checkpnpm test:coverage-> 85.16% lines/statements, 219 testspnpm docs:sitenpm pack --dry-runciandcoveragepassed for621d643d379533791ab5108e1cf639fc7d8e2c8cpnpm test src/infra/outbound/deliver.test.ts src/infra/outbound/delivery-queue.storage.test.ts src/infra/outbound/delivery-queue.recovery.test.ts src/infra/outbound/delivery-queue.reconnect-drain.test.tspnpm test src/plugin-sdk/file-lock.test.ts src/agents/session-write-lock.test.ts src/gateway/control-ui.http.test.ts src/infra/fs-safe-import-boundary.test.ts src/agents/skills.loadworkspaceskillentries.test.ts src/agents/skills-install.test.ts src/agents/sandbox/fs-bridge.boundary.test.ts src/agents/sandbox/fs-bridge.anchored-ops.test.tspnpm plugin-sdk:api:checkpnpm check:docspnpm buildgit diff --checkEarlier proof retained from this PR:
pnpm buildpnpm plugin-sdk:api:checkpnpm test src/infra/fs-safe.test.ts src/gateway/canvas-documents.test.ts src/agents/apply-patch.test.ts extensions/memory-wiki/src/vault.test.ts src/plugins/install.test.ts src/agents/acp-spawn-parent-stream.test.ts extensions/qa-lab/src/multipass.runtime.test.ts src/auto-reply/reply/commands-export-trajectory.test.ts src/trajectory/export.test.ts src/trajectory/cleanup.test.ts extensions/active-memory/index.test.ts src/infra/diagnostics-timeline.test.ts src/logging/logger-transport.test.ts src/logging/logger.settings.test.ts