Skip to content

build: consume platform-specific fs-safe packages - #132240

Merged
RomneyDa merged 2 commits into
mainfrom
feat/fs-safe-platform-packages
Sep 3, 2026
Merged

RomneyDa merged 2 commits into
mainfrom
feat/fs-safe-platform-packages

Conversation

@RomneyDa

@RomneyDa RomneyDa commented Aug 29, 2026 •

Copy link
Copy Markdown
Member

Summary

  • verify that packaged OpenClaw installs resolve and load fs-safe's platform-native binding
  • cover root Docker assembly plus npm, pnpm, Bun, glibc, and Alpine/musl package installs
  • exercise the intentional optional-free JavaScript fallback in the update-channel Docker lane
  • lock the sealed-worker runtime ordering to the current fs-safe policy owner

The fs-safe dependency update, lockfile metadata, documentation, and worker runtime policy originally developed on this branch have since landed on main through #134068. This PR now contains only the remaining package/Docker verification and focused regression coverage.

Architecture

Normal Gateway, CLI, plugin, and container installs resolve a platform-specific optional package. The verifier performs a real sha256File operation in native-required mode and confirms that the loaded .node binding came from one of the installed fs-safe platform packages.

The update-channel fixture installs with npm --omit=optional. npm 11 global tarball installs can still retain the host fs-safe platform package in this package graph, so that disposable prefix explicitly relocates any retained platform package before running fallback verification. This makes the zero-package, zero-native-binding JavaScript path deterministic while the other install lanes retain native-required coverage.

Isolated workers contain no dependency tree and use fs-safe's bundled JavaScript implementation. The worker regression test verifies that this policy is selected through src/infra/fs-safe-defaults.ts before the runtime is registered.

Validation

  • pnpm check:changed: passed
  • pnpm build: passed
  • focused worker and package/Docker tooling tests: 375 passed, 2 skipped
  • verifier operation, targeted lint/format checks, dead-file analysis, and git diff --check: passed
  • candidate package tarball integrity validation: passed

Docker is not installed in this checkout, so real image execution is validated by exact-head CI.

@clawsweeper

clawsweeper Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts extensions: onepassword 1Password plugin size: S maintainer Maintainer-authored PR labels Aug 29, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. 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. labels Aug 29, 2026
@clawsweeper

clawsweeper Bot commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 2, 2026, 7:01 PM ET / 23:01 UTC.

ClawSweeper review

What this changes

Adds Docker and package-install checks that verify fs-safe loads a platform-native binding when present and uses its JavaScript fallback after optional platform packages are removed.

Merge readiness

⛔ Blocked before merge - 4 items remain

Keep open for maintainer review. The branch remains necessary because current main lacks this package/Docker verification; no introduced correctness defect was established. Direct fs-safe package source and the linked exact-head Actions job could not be retrieved because DNS was unavailable, so their contract and result need independent confirmation before merge.

Priority: P2
Reviewed head: 9debee62b4ff1a5ee70c8784c8176de1e0762284

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The focused verification design is consistent with existing package-boundary coverage, with direct upstream and hosted-job inspection remaining unavailable to this reviewer.
Proof confidence 🌊 off-meta tidepool Not applicable: This member-authored infrastructure PR is exempt from the external-contributor proof gate; its supplied exact-head CI links are relevant but could not be independently opened because DNS was unavailable.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This member-authored infrastructure PR is exempt from the external-contributor proof gate; its supplied exact-head CI links are relevant but could not be independently opened because DNS was unavailable.
Evidence reviewed 5 items Introduced verifier: The new verifier resolves fs-safe from the installed package, explicitly selects require or off mode, performs sha256File on a temporary fixture, and asserts the native-binding/cache outcome for the selected mode.
Dependency-contract signal: This PR directly resolves fs-safe package metadata and imports its config and durability exports, so fs-safe’s published export and loader contract is review-relevant.
Existing sibling coverage: Existing relocated-output coverage observes the same native module cache and tests native, fallback, and missing-package outcomes, supporting the verifier’s overall assertion shape.
Findings None None.
Security None None.

How this fits together

OpenClaw’s package and Docker lanes build an installable tarball and test it across package managers and Linux variants. The verifier resolves fs-safe from the installed package tree, performs a hash operation, and checks whether the selected native or fallback path matches the installation.

flowchart LR
  A[OpenClaw package tarball] --> B[Docker install lanes]
  B --> C[fs-safe verifier]
  C --> D{Platform package installed?}
  D -->|Yes| E[Load native binding]
  D -->|No| F[Use JavaScript fallback]
  E --> G[Verify hash operation]
  F --> G
Loading

Before merge

  • Resolve merge risk (P1) - The new verifier relies on fs-safe 0.7.0 package exports and native-loader/cache behavior, but this review environment could not retrieve the upstream package source or exact-head Docker job due DNS failure.
  • Complete next step (P2) - Before merge, independently inspect fs-safe 0.7.0’s package exports/native loader and the exact-head Docker package-install job.
  • Resolve review confidence - ClawSweeper must reach high confidence before merge readiness is known.
  • Add data-model compatibility proof - Confirm migration or upgrade compatibility proof before merge.
Agent review details

Security

None.

PR surface

Tests +67, Other +143. Total +210 across 12 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 3 67 0 +67
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 9 161 18 +143
Total 12 228 18 +210

Review metrics

Metric Value Why it matters
Production and test delta production/tooling +162/-18 (net +144), tests +67/-0 The growth is concentrated in package/Docker verification and its focused guards, with no OpenClaw runtime behavior added.

Stored data model

Persistent data-model change detected: serialized state: scripts/docker/verify-fs-safe-native.mjs, unknown-data-model-change: scripts/docker/verify-fs-safe-native.mjs. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Confirm the package contract before merge (recommended)
    Directly inspect fs-safe 0.7.0’s exported config/durability modules and the exact-head Docker job to confirm the verifier matches the installed-package contract.

Technical review

Best possible solution:

Retain the focused installed-package verifier and merge after a reviewer can directly confirm fs-safe’s published exports/native loader and the exact-head Docker lane’s native and fallback results.

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

Not applicable: this PR adds package and Docker verification rather than fixing a separately reported user-facing failure.

Is this the best way to solve the issue?

Unclear: the verifier follows existing fs-safe package-boundary and cache-observation coverage, but direct fs-safe 0.7.0 export/loader inspection was unavailable in this environment.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 4bb80002a2b5.

Labels

Label justifications:

  • P2: This is a bounded release-package verification improvement with limited direct user blast radius.
  • merge-risk: 🚨 automation: The PR changes Docker/package acceptance automation and depends on a native package-resolution contract that was not independently retrievable in this review.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This member-authored infrastructure PR is exempt from the external-contributor proof gate; its supplied exact-head CI links are relevant but could not be independently opened because DNS was unavailable.

Evidence

What I checked:

  • Introduced verifier: The new verifier resolves fs-safe from the installed package, explicitly selects require or off mode, performs sha256File on a temporary fixture, and asserts the native-binding/cache outcome for the selected mode. (scripts/docker/verify-fs-safe-native.mjs:31, 9debee62b4ff)
  • Dependency-contract signal: This PR directly resolves fs-safe package metadata and imports its config and durability exports, so fs-safe’s published export and loader contract is review-relevant. (scripts/docker/verify-fs-safe-native.mjs:33, 9debee62b4ff)
  • Existing sibling coverage: Existing relocated-output coverage observes the same native module cache and tests native, fallback, and missing-package outcomes, supporting the verifier’s overall assertion shape. (test/scripts/tsdown-config.test.ts:76, 9debee62b4ff)
  • Current-main necessity: Comparing the PR head with fetched current main shows the verifier, musl lane, and package-install hooks are absent from current main; the merged fs-safe update did not supersede this verification work. (scripts/e2e/docker-package-install.sh, 4bb80002a2b5)
  • Inspection limitation: Read-only GitHub and npm-registry requests failed with DNS resolution errors, preventing independent retrieval of the fs-safe 0.7.0 source/package metadata and the linked exact-head Actions job.

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Dallin Romney: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (7 earlier review cycles)
  • reviewed 2026-08-29T00:49:11.828Z sha 9569a20 :: found issues before merge. :: [P1] Refresh the resolved dependency metadata
  • reviewed 2026-08-29T02:56:23.698Z sha 9569a20 :: found issues before merge. :: [P1] Refresh the resolved fs-safe metadata | [P1] Stage the platform package for native-required workers
  • reviewed 2026-08-29T04:21:33.043Z sha e2500ca :: found issues before merge. :: [P1] Refresh the resolved fs-safe package metadata | [P2] Update secure-file-operation guidance for platform packages
  • reviewed 2026-09-02T21:35:35.696Z sha bd668c62297d38d94620b4b8fad0cc3798c1a843 :: blocked before merge. :: [P1] Allow Bun's installed libc package siblings
  • reviewed 2026-09-02T21:46:29.191Z sha ce96dd2 :: blocked before merge. :: [P1] Use fallback mode for the optional-free update install | [P1] Allow Bun's installed libc package siblings
  • reviewed 2026-09-02T22:10:05.338Z sha aafd118 :: blocked before merge. :: [P1] Use fallback mode for the optional-free update install
  • reviewed 2026-09-02T22:38:16.034Z sha 9debee6 :: blocked before merge. :: none

@clawsweeper clawsweeper Bot added merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. and removed merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. labels Aug 29, 2026
@RomneyDa
RomneyDa force-pushed the feat/fs-safe-platform-packages branch from 9569a20 to e2500ca Compare August 29, 2026 04:09
@openclaw-barnacle openclaw-barnacle Bot added docker Docker and sandbox tooling size: L and removed size: S labels Aug 29, 2026
@RomneyDa
RomneyDa force-pushed the feat/fs-safe-platform-packages branch from e2500ca to a9d0e74 Compare September 2, 2026 21:22
@RomneyDa
RomneyDa marked this pull request as ready for review September 2, 2026 21:22
@clawsweeper

clawsweeper Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@RomneyDa
RomneyDa force-pushed the feat/fs-safe-platform-packages branch from a9d0e74 to bd668c6 Compare September 2, 2026 21:28
@RomneyDa

RomneyDa commented Sep 2, 2026

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@RomneyDa
RomneyDa force-pushed the feat/fs-safe-platform-packages branch from bd668c6 to ce96dd2 Compare September 2, 2026 21:39
@clawsweeper clawsweeper Bot removed the merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. label Sep 2, 2026
@RomneyDa
RomneyDa force-pushed the feat/fs-safe-platform-packages branch from ce96dd2 to aafd118 Compare September 2, 2026 22:02
@RomneyDa

RomneyDa commented Sep 2, 2026

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Addressed the Bun layout finding: required mode now permits multiple installed platform-package siblings while still requiring exactly one loaded binding and proving that binding came from one of those installed packages.

Skipping the fallback-mode recommendation for update-channel-switch. The OpenClaw candidate tarball bundles its dependency tree, so npm omit-optional cannot remove the already-bundled fs-safe platform package. Exact-head CI run https://github.com/openclaw/openclaw/actions/runs/33686296305 proved this contract: docker-seed-e2e passed with required mode after fallback mode failed because the platform package was present.

@clawsweeper

clawsweeper Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

@clawsweeper

clawsweeper Bot commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. and removed merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. labels Sep 2, 2026
@RomneyDa

RomneyDa commented Sep 2, 2026

Copy link
Copy Markdown
Member Author

Addressed the remaining ClawSweeper blocker on 9debee62b4f:

  • the update fixture now relocates any fs-safe platform package retained by npm 11’s global tarball install after --omit=optional
  • it then runs --mode fallback, proving zero installed platform packages, zero loaded native bindings, and a real JavaScript sha256File operation
  • native-required coverage remains in the npm, pnpm, Bun, glibc, and musl package lanes
  • refreshed the PR description to match the rebased diff

Focused package/Docker tooling tests pass (374 passed, 2 skipped), and the worker regression test passes separately. Please re-review this exact head.

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed 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. labels Sep 2, 2026
@RomneyDa

RomneyDa commented Sep 2, 2026

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

Exact-head evidence is now complete for 9debee62b4ff1a5ee70c8784c8176de1e0762284:

The data-model checklist item is not applicable: scripts/docker/verify-fs-safe-native.mjs is a stateless CI executable that creates and removes a temporary fixture; it does not define, migrate, or persist an OpenClaw data model.

@clawsweeper

clawsweeper Bot commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@RomneyDa
RomneyDa merged commit 6d3a1b8 into main Sep 3, 2026
240 checks passed
@RomneyDa
RomneyDa deleted the feat/fs-safe-platform-packages branch September 3, 2026 20:26
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 4, 2026
* build: consume platform-specific fs-safe packages

* test: prove fs-safe optional fallback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docker Docker and sandbox tooling maintainer Maintainer-authored PR merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant