Fix Docker store seed target packages#91547
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 8, 2026, 10:45 PM ET / 02:45 UTC. Summary PR surface: Tests +121, Other +52. Total +173 across 2 files. Reproducibility: yes. Source inspection on current main shows Docker Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Merge the target-aware store seed after maintainers accept the targeted Testbox runtime-assets proof and exact-head CI; run a final runtime image smoke only if broader container assurance is required. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection on current main shows Docker Is this the best way to solve the issue? Yes. Filtering the existing store-seed closure by lockfile AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 329fa44d23f4. Label changesLabel justifications:
Evidence reviewedPR surface: Tests +121, Other +52. Total +173 across 2 files. View PR surface stats
What I checked:
Likely related people:
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. How this review workflow works
|
90349ee to
ec9f55e
Compare
(cherry picked from commit c8a8152)
Summary
Fixes #91035.
The Docker runtime-assets store seed now follows the current build target instead of adding every lockfile package. This keeps platform optional packages, such as
@zed-industries/codex-acp-*, limited to the architecture Docker is actually building for.Root Cause
pnpm installwas already configured with Docker target architecture filters, but the later offline prune store seed usedscripts/list-prod-store-packages.mjsto add every package frompnpm-lock.yaml. That explicitly reintroduced non-target optional packages beforepnpm store add, including Darwin/Windows and the wrong Linux architecture ACP packages.Changes
pnpm list --prodand lockfile snapshot closure throughos/cpu/libcselectors for the current process target.Verification
pnpm lint --threads=8node scripts/run-vitest.mjs test/scripts/list-prod-store-packages.test.tsgit diff --check.agents/skills/autoreview/scripts/autoreview --mode localOPENCLAW_EXTENSIONS=acpx, nativelinux/arm64: verified the store seed includes@zed-industries/codex-acp-linux-arm64@0.15.0, excludes Darwin/Windows/Linux x64 ACP packages, andpnpm store addsucceeds.OPENCLAW_EXTENSIONS=acpx,--platform=linux/amd64: verifiedprocess.archisx64, the store seed includes@zed-industries/codex-acp-linux-x64@0.15.0, excludes Darwin/Windows/Linux arm64 ACP packages, andpnpm store addsucceeds.blacksmith-testbox, idtbx_01ktn3vp481ggkcwhh0wfnt8t6, Actions run https://github.com/openclaw/openclaw/actions/runs/27180308958, commanddocker build --progress=plain --target runtime-assets --build-arg OPENCLAW_EXTENSIONS=acpx -t openclaw:pr91547-runtime-assets -f Dockerfile ., HEADec9f55e742ee428f631c8f6e591c9eaab265ffee, exit 0. Theruntime-assetsstage completedpnpm list | scripts/list-prod-store-packages.mjs | pnpm store add, offlinepnpm prune --prod, plugin dist prune, postinstall, and package dist import checks, then exported imagesha256:dcb33fbedf7480f2c7b559468875f53c3f63243ddd3d1b44872d475e4a5d4a00.Real behavior proof
Behavior addressed: Docker builds with ACPX no longer seed non-target optional platform packages from the pnpm lockfile into the offline production store. The runtime-assets stage now keeps the target Linux architecture package and avoids Darwin, Windows, and wrong-Linux-architecture ACP packages.
Real environment tested: Blacksmith Testbox through Crabbox on Linux amd64 Docker Engine 28.0.4, provider
blacksmith-testbox, idtbx_01ktn3vp481ggkcwhh0wfnt8t6, Actions run https://github.com/openclaw/openclaw/actions/runs/27180308958, PR commitec9f55e742ee428f631c8f6e591c9eaab265ffee.Exact steps or command run after this patch:
docker build --progress=plain --target runtime-assets --build-arg OPENCLAW_EXTENSIONS=acpx -t openclaw:pr91547-runtime-assets -f Dockerfile .Evidence after fix: The Testbox run exited 0. Docker completed the
runtime-assetsstage, includingpnpm list --prod --depth Infinity --json | node scripts/list-prod-store-packages.mjs | xargs -r pnpm store add, offlinepnpm prune --prod, plugin dist prune, postinstall, package dist import checks, and image export.Observed result after fix: The runtime-assets build succeeded and exported image
sha256:dcb33fbedf7480f2c7b559468875f53c3f63243ddd3d1b44872d475e4a5d4a00. The store seed step completed without trying to fetch incompatible ACP platform tarballs.What was not tested: A full final runtime image smoke was not run here; this proof targeted the failing Docker runtime-assets store/prune path from #91035. Local Docker Desktop full build was attempted before Testbox proof but hit an out-of-memory SIGKILL during
pnpm build:docker, before the patched runtime-assets step.Notes
The temporary
openclaw/openclaw:codex/docker-store-seed-targetsbranch was used only because Blacksmith workflow dispatch requires a base-repository ref. It was deleted after the passing Testbox run; the PR head remainssallyom:codex/docker-store-seed-targets.