Repository navigation
fix: share fs-safe native assets across package graphs - #132193
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 28, 2026, 7:39 PM ET / 23:39 UTC. ClawSweeper reviewWhat this changesThe PR rewrites the sealed worker’s bundled fs-safe asset lookup to share one package-level native-binary directory and splits the UI test typecheck shard. Merge readinessNo concrete introduced correctness defect was found, but this maintainer-owned package-layout change needs exact-head package validation before merge because the locked dependency source and latest remote main were unavailable locally. Priority: P3 Review scores
Verification
How this fits togetherThe package build emits the normal runtime and sealed worker at different directory depths. Both must locate fs-safe native binaries in an installed npm package, while the typecheck shard list determines CI coverage. flowchart LR
A[Package build] --> B[Runtime bundle]
A --> C[Sealed worker bundle]
B --> D[Package native assets]
C --> E[Worker lookup rewrite]
E --> D
D --> F[Installed native behavior]
Decision needed
Why: The author is a repository member and the PR carries the protected maintainer label; the review environment cannot independently inspect the pinned dependency or current remote main. Before merge
Agent review detailsSecurityNone. PR surfaceTests +44, Other +17. Total +61 across 7 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one runtime-owned dist/native tree and verify the packed exact head resolves it correctly for the worker’s required-native and fallback modes before landing. Do we have a high-confidence way to reproduce the issue? Unclear: the checked-in test defines a focused relocated-package path, and the PR body reports it passing, but unavailable dependencies prevented an independent current-head run. Is this the best way to solve the issue? Unclear: one canonical asset tree plus a worker-only relative-path rewrite is coherent, but direct inspection of fs-safe 0.5.6 and the latest main artifact was unavailable in this checkout. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against a49da4208bc8. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
0c4619a to
ee7201b
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
ee7201b to
a93c579
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
* build: deduplicate fs-safe native assets * fix(ci): split oversized UI test typecheck shard
What Problem This Solves
Fixes an issue where npm packages contained two identical copies of every
fs-safenative binary after the sealed worker gained native-mode support.Why This Change Was Made
The normal runtime and sealed worker are emitted at different directory depths, while
@openclaw/fs-saferesolves native binaries relative to its emitted loader. The sealed-worker build now rewrites that dependency-owned relative lookup to the package's canonicaldist/nativedirectory. The runtime build remains the sole owner that copies the seven platform binaries.The transform validates the exact upstream source shape and fails the build if that contract changes. This preserves native
off,auto, andrequirebehavior without symlinks, fallback paths, or duplicate package assets.User Impact
Installed npm packages retain native
fs-safesupport while using 16,233,360 fewer unpacked bytes (15.48 MiB).Evidence
dist/nativeanddist/dist/native.dist/native;dist/dist/nativeis absent.../../dist/native/, sharing the runtime-owned asset tree.npm pack --dry-run --ignore-scripts --json: 228,483,134 unpacked bytes; removing the duplicate accounts for exactly 16,233,360 bytes.node scripts/run-vitest.mjs test/scripts/worker-deploy-build-plugin.test.ts test/scripts/tsdown-config.test.ts— 27 tests passed.NODE_OPTIONS=--max-old-space-size=8192 pnpm build:package— passed, including CLI bootstrap and plugin SDK checks.Production/tooling delta is +12 lines. The added lines implement and fail-closed validate the dependency path transform required to preserve native-mode behavior while deleting the second asset-copy owner; no smaller dependency-supported configuration seam exists in
@openclaw/fs-safe0.5.6 or its current main source.