Repository navigation
[3400 by Claude Opus 5.5] Fix #3399: the published agent image cannot be unpacked on hosts that cannot apply overlayfs opaque whiteouts (reported on OrbStack, Ubuntu 24.04.5 x86_64, Docker 29.1.3 with the containerd overlayfs image store: `failed to convert whiteout file... - #3402
integry merged 4 commits into
Conversation
…o overlayfs whiteouts. I could not build the image here: this container has no Docker and can't create user namespaces. So I haven't run `scripts/build-images.sh --only agent`, the existing agent smoke checks, or a restricted-snapshotter reproduction. The real build happens in the restricted-network smoke workflow, which runs on this PR because `Dockerfile.agent` changed and now includes the new whiteout check.
What I checked against the published 0.9.0 image. I downloaded `propr/agent:0.9.0` (sha256:22b319a7721b…) from Docker Hub and listed every layer:
- Layer 5 (the big `apt-get install` step) has 153 whiteouts: 152 `.wh..wh..opq` plus one plain `var/lib/apt/lists/.wh.auxfiles`. No other layer has any.
- None of the 152 opaque directories exists in the node base layers, which confirms the issue's diagnosis.
- I merged the 12 layers that the fix flattens, the same way `COPY --from=agent-base-build / /` does. That one layer has 0 whiteouts, and the new check passes on it combined with the real 0.9.0 upper layers (18 layers).
Size. In that simulation the flattened layer is 223.3 MB compressed, against 229.3 MB for the 12 layers it replaces: about 6 MB smaller. The only cost is that the image no longer shares layers with a locally pulled `node` image.
The fix
- `Dockerfile.agent`: the old `agent-base` steps now live in an internal stage, `agent-base-build`. A new `agent-base` stage starts `FROM --platform=${AGENT_PLATFORM} scratch` and copies that stage's whole filesystem in. It then re-declares the base image's settings exactly: `PATH`, `NODE_VERSION`, `YARN_VERSION`, `ENTRYPOINT ["docker-entrypoint.sh"]`, `CMD ["node"]`, plus the existing `NODE_OPTIONS`, `USER` and `WORKDIR`. All later stages are unchanged and only add paths.
- Platform pin on the scratch stage: this is needed. Custom bundle builds on users' hosts don't pass `--platform`, so on an arm64 host a bare `FROM scratch` would label the amd64 contents as arm64.
- New pin, for your call: the Node base is now `node:22.23.4-bookworm-slim` (`ARG AGENT_NODE_VERSION`, `ARG AGENT_YARN_VERSION`). Today that tag has the same digest as `node:22-bookworm-slim`. The build fails if the base image's versions or `node --version` disagree with the pins, so the re-declared values can't drift. The downside is that Node patch releases now need a manual bump instead of arriving automatically.
- Unchanged: the CLI version matrix, the package and checksum pins, and the bundle content-hash inputs. The agent bundle tag changes only because `Dockerfile.agent`'s content changed.
The check
- `scripts/check-image-whiteouts.sh` (new): runs `docker save IMAGE`, or reads a saved tarball with `--archive FILE`, and fails if any layer contains a file whose name starts with `.wh.`. It handles both `docker save` formats, including compressed layers. On the 0.9.0 archive it fails with "layer 5: 153 whiteout entries (152 opaque)".
- Wired into:
- the release smoke (`smoke-test-images.sh`)
- the preview agent smoke, where `no-overlay-whiteouts` is now a required evidence check in `preview-runtime-images.mjs`
- the restricted-network smoke workflow, for images built from the checkout only, since earlier published images still have whiteouts
- the shellcheck list
- Tests: a new `test/checkImageWhiteouts.test.mjs` (7 cases on synthetic archives), plus new assertions in `test/agentDockerfileSupplyChain.test.ts` and an updated `test/agentVersionManagement.test.ts`. Against the old Dockerfile the 3 new supply-chain assertions fail, as they should. The related suites I ran pass (preview agent and runtime, workflow, image smoke, bundle content files, build-images, release validation, managed-agent pin), shellcheck is clean, and `npm run release:verify` passes.
- CHANGELOG: added a `### Fixed` entry under `[Unreleased]`.
Workaround for #3399, for the PR body:
> Images up to 0.9.0 carry opaque whiteouts that hosts unable to set trusted overlay xattrs cannot unpack. Until 0.9.1, either switch Docker back to the classic storage driver by turning off the containerd image store (`"features": {"containerd-snapshotter": false}` in `/etc/docker/daemon.json`, or untick "Use containerd for pulling and storing images" in Docker Desktop, then restart Docker and pull again), or use OrbStack's own Docker engine instead of a Docker install inside an OrbStack Linux machine.
No visual previews, since nothing here is visible in a UI.
|
/review |
|
✅ AI Code Review Complete requested by @integry Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR addresses the reported unpack failure by flattening the agent’s base filesystem and checking every resulting image layer for whiteouts. It is ready to merge within the reviewed scope, conditional on the remaining Validate Changes check passing. ✅ Preserved runtime configuration — The scratch stage restores Node’s environment and entrypoint configuration, retains the node user and workspace, and verifies the pinned Node/Yarn versions before flattening. ✅ Artifact-level enforcement — Release, preview, and restricted-network smoke paths invoke the whiteout checker. Preview evidence also requires the new check before packaging. ✅ Focused regression coverage — Added tests cover opaque and deletion whiteouts, compressed layers, both archive layouts, and rejection of unsafe manifest paths. This was a static review; no commands were run. The supplied checks report 27 passed, none failed, and one pending, including a passed restricted-network container smoke. The original issue excerpt is truncated, so assessment of its requirements is limited to the visible objective; the supplied diff is complete. Merge blockersNo merge blockers. SuggestionsThese are optional follow-ups and are not sent to S1: 🟢 Preserve diagnostics for large failuresIn ScoreThe implementation directly addresses the visible objective, preserves the relevant runtime contracts, and adds meaningful artifact validation. Current checks support merge readiness, subject to the pending validation completing successfully. Score: 9/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
|
/fix
So this builder's differ marks every newly created directory opaque, including every |
|
ℹ️ No review findings or suggestions were selected. No files were changed because this Name at least one Processing comment ID: 6546132732✓ |
|
Empirical check before merge: this doesn't pass its own gate yet. I built the agent image from
So this builder's differ marks every newly created directory opaque, including every |
|
✅ Applied the requested follow-up changes in commit 99cf7f9 Summary of ChangesI've made the whole published agent image a single layer, but I couldn't build it here. This container has no Docker (and can't create user namespaces), so I haven't run What changed in
Size: the image content is the same as the layered build, and files later steps deleted or overwrote no longer take space, so it shouldn't grow past about 2.48 GB. I couldn't measure it. The trade-off is that new bundle tags (for example after a CLI version bump) share no layers with each other or with a local Tests:
There are no visual previews, since nothing here shows up in a UI. 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
…ut I couldn't build it here. This container has no Docker (and can't create user namespaces), so I haven't run `scripts/build-images.sh --only agent` or `scripts/check-image-whiteouts.sh` on a real image. I have no passing output to paste, and I haven't checked that `claude`, `codex`, `agy`, `opencode`, `vibe`, `agent-tank`, `gh`, `git` and `rg` resolve or that the entrypoints work. Those checks are still open before merge: either your local build, or the restricted-network smoke, which builds this PR and runs the whiteout check.
I've made the whole published agent image a single layer, but I couldn't build it here. This container has no Docker (and can't create user namespaces), so I haven't run `scripts/build-images.sh --only agent` or `scripts/check-image-whiteouts.sh` on a real image. I have no passing output to paste, and I haven't checked that `claude`, `codex`, `agy`, `opencode`, `vibe`, `agent-tank`, `gh`, `git` and `rg` resolve or that the entrypoints work. Those checks are still open before merge: either your local build, or the restricted-network smoke, which builds this PR and runs the whiteout check.
**What changed in `Dockerfile.agent`**
- **`agent-base`** is a normal `FROM node:${AGENT_NODE_VERSION}-bookworm-slim` stage again. The earlier base flattening is gone, since flattening the whole image covers it. The exact Node/Yarn pin and its build-time checks stay, because the final stage re-declares those values.
- **The old `final` stage** is now an internal stage, `agent-image-build`, with the same steps. Its labels moved to the published stage, because labels set before `FROM scratch` are dropped.
- **The new `final` stage** is `FROM --platform=${AGENT_PLATFORM} scratch` plus `COPY --from=agent-image-build / /`. It re-declares the image config to match what `docker inspect` shows for the published `propr/agent:0.9.0` (I fetched it from Docker Hub):
- the same 8 `ENV` entries in the same order, including `PATH`, `NODE_VERSION`, `YARN_VERSION`, `NODE_OPTIONS`, the `UV_*` paths and `AGY_CLI_DISABLE_AUTO_UPDATE`
- `USER node`, `WORKDIR /home/node/workspace`, and the tini `ENTRYPOINT`
- the `dev.propr.*` labels
- **No `CMD`**, matching 0.9.0: its `Cmd` was null because setting `ENTRYPOINT` cleared the `node` `CMD` it inherited.
- **Unchanged:** the CLI version pins, the platform pin, and the OCI labels, which `build-images.sh --label` still adds.
**Size:** the image content is the same as the layered build, and files later steps deleted or overwrote no longer take space, so it shouldn't grow past about 2.48 GB. I couldn't measure it. The trade-off is that new bundle tags (for example after a CLI version bump) share no layers with each other or with a local `node` image, so each pull downloads the whole image. I added this to the CHANGELOG entry.
**Tests:**
- I rewrote the structure assertions in `test/agentDockerfileSupplyChain.test.ts` and updated `test/agentVersionManagement.test.ts`. The new checks:
- the last stage starts from scratch, copies `agent-image-build` with `/ /`, and does nothing else
- its `ENV` list matches 0.9.0 exactly, and there's no `CMD`
- every bundle label is there, and no label is set before scratch
- These suites pass:
- Dockerfile structure and pins: supply-chain, version management, managed-agent pin, bundle content files (content hash), build-images
- image smokes and verification: whiteout check, preview agent and runtime, Agent Tank image verification, tool policy runtime, smoke cleanup
- CI change classification
- `vibeAgent` passes only with `PROPR_DEMO_MODE=true`; without it, it fails on missing GitHub auth.
- `npm run release:verify` passes.
- `shellcheck` isn't installed here, so the comment edit in `scripts/check-image-whiteouts.sh` only got a `bash -n` syntax check.
There are no visual previews, since nothing here shows up in a UI.
PR: #3402
Comment by: @integry (ID: 6549593689)
Model: Claude Opus 5.5
|
CI failed: CodeQL Please investigate and fix this CI failure.
Failure evidence
|
|
✅ Applied the requested follow-up changes in commit c9dceee Summary of ChangesI fixed the CodeQL "incomplete string escaping" alert at The test turns each label name into a regex. Before, it only escaped dots, so a backslash in a label would have gone through unescaped. It now escapes every regex special character, backslash included: label.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')The labels in the list today only contain dots, so the test checks exactly what it did before. All 14 tests in the file pass. I didn't make previews because this change only affects a test. The bigger blocker on this PR is still open: your build of the image failed 🤖 Implementation Details
Undo Changes • View Task Execution 💡 ProPR Slash Commands
🤖 Generated by ProPR |
…est/agentDockerfileSupplyChain.test.ts:157`.
I fixed the CodeQL "incomplete string escaping" alert at `test/agentDockerfileSupplyChain.test.ts:157`.
The test turns each label name into a regex. Before, it only escaped dots, so a backslash in a label would have gone through unescaped. It now escapes every regex special character, backslash included:
```ts
label.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
```
The labels in the list today only contain dots, so the test checks exactly what it did before. All 14 tests in the file pass. I didn't make previews because this change only affects a test.
The bigger blocker on this PR is still open: your build of the image failed `scripts/check-image-whiteouts.sh`, with 13 whiteout entries. This follow-up doesn't address that.
PR: #3402
Comment by: @github-advanced-security[bot] (ID: 4433456794)
Model: Claude Opus 5.5
|
🔀 Resolved merge conflicts from Conflicting Files
Resolution SummaryThe merge had one conflict, in What the conflict was: Both branches added a new entry at the top of
How I resolved it: I kept both entries, word for word, and removed the markers. Why: The two entries cover unrelated changes, so neither replaces the other and both belong in the changelog. Keep a Changelog, which this file follows, lists Fixed before Security, so I used that order. Checks:
I didn't edit any other files. 🤖 Resolution Details
System-triggered merge conflict resolution |
…-the-published-ag-20261031-1127-4wc Automatically resolved merge conflicts after merging target branch into PR branch. Resolved conflicts in: - CHANGELOG.md PR: #3402 Model: Claude Opus 5.5
|
ℹ️ Analyzed the follow-up request by @propr-dev[bot] Analysis SummaryNothing needed changing. This CI run was on At
No previews, since only a test changed. This doesn't touch the bigger blocker on the PR: your local build still failed No code changes were necessary based on the current state of the branch. 🤖 Analysis Details
💡 ProPR Slash Commands
🤖 Generated by ProPR |
|
/review |
|
✅ AI Code Review Complete requested by @integry Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR implements the authorized follow-up by assembling the complete agent filesystem before copying it into a final scratch stage. It is merge-ready within the reviewed scope, conditional on the remaining checks passing. ✅ Complete image flattening — ✅ Artifact-level enforcement — Release, preview, and restricted-network smoke paths invoke the whiteout checker. Preview packaging also requires the new check in evidence tied to the image configuration digest. ✅ Relevant regression coverage — Added archive fixtures cover opaque markers, deletion whiteouts, compressed layers, clean images, and invalid manifest paths. This was a static review of the supplied code; no commands were run. The original issue description is explicitly truncated, limiting assessment of unseen requirements. The supplied current-head status reports the restricted-network smoke passing, with no failed checks and five pending. Merge blockersNo merge blockers. SuggestionsThese are optional follow-ups and are not sent to S2: 🟢 Check runtime configuration parityThe new configuration test checks Dockerfile text against a fixed expected list. A future smoke assertion against S3: 🟢 Retain concrete build evidenceRetain the final image size, passing whiteout output, and CLI/entrypoint smoke output alongside the PR. The passing restricted-network check supports the build and whiteout gate, but the supplied material does not expose the final size or all requested runtime outputs. Recording them would make the authorized follow-up easier to audit without repeating the build. ScoreThe implementation addresses the previously incomplete flattening and adds checks at the artifact and publication boundaries. No verified code blockers remain; final readiness is conditional on the pending checks completing successfully. Score: 8/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
AI Implementation Summary
Closes #3400
Branch:
3400/claude-opus-5-5-fix-3399-the-published-ag-20261031-1127-4wcCommits: ✅ Changes committed (28fef58)
AI Processing Completed
Execution Details:
overlayfsimage store: `failed to convert whiteout file... #3400Summary:
I've changed
Dockerfile.agentso the agent image should ship with no overlayfs whiteouts. I could not build the image here: this container has no Docker and can't create user namespaces. So I haven't runscripts/build-images.sh --only agent, the existing agent smoke checks, or a restricted-snapshotter reproduction. The real build happens in the restricted-network smoke workflow, which runs on this PR becauseDockerfile.agentchanged and now includes the new whiteout check.What I checked against the published 0.9.0 image. I downloaded
propr/agent:0.9.0(sha256:22b319a7721b…) from Docker Hub and listed every layer:apt-get installstep) has 153 whiteouts: 152.wh..wh..opqplus one plainvar/lib/apt/lists/.wh.auxfiles. No other layer has any.COPY --from=agent-base-build / /does. That one layer has 0 whiteouts, and the new check passes on it combined with the real 0.9.0 upper layers (18 layers).Size. In that simulation the flattened layer is 223.3 MB compressed, against 229.3 MB for the 12 layers it replaces: about 6 MB smaller. The only cost is that the image no longer shares layers with a locally pulled
nodeimage.The fix
Dockerfile.agent: the oldagent-basesteps now live in an internal stage,agent-base-build. A newagent-basestage startsFROM --platform=${AGENT_PLATFORM} scratchand copies that stage's whole filesystem in. It then re-declares the base image's settings exactly:PATH,NODE_VERSION,YARN_VERSION,ENTRYPOINT ["docker-entrypoint.sh"],CMD ["node"], plus the existingNODE_OPTIONS,USERandWORKDIR. All later stages are unchanged and only add paths.--platform, so on an arm64 host a bareFROM scratchwould label the amd64 contents as arm64.node:22.23.4-bookworm-slim(ARG AGENT_NODE_VERSION,ARG AGENT_YARN_VERSION). Today that tag has the same digest asnode:22-bookworm-slim. The build fails if the base image's versions ornode --versiondisagree with the pins, so the re-declared values can't drift. The downside is that Node patch releases now need a manual bump instead of arriving automatically.Dockerfile.agent's content changed.The check
scripts/check-image-whiteouts.sh(new): runsdocker save IMAGE, or reads a saved tarball with--archive FILE, and fails if any layer contains a file whose name starts with.wh.. It handles bothdocker saveformats, including compressed layers. On the 0.9.0 archive it fails with "layer 5: 153 whiteout entries (152 opaque)".smoke-test-images.sh)no-overlay-whiteoutsis now a required evidence check inpreview-runtime-images.mjstest/checkImageWhiteouts.test.mjs(7 cases on synthetic archives), plus new assertions intest/agentDockerfileSupplyChain.test.tsand an updatedtest/agentVersionManagement.test.ts. Against the old Dockerfile the 3 new supply-chain assertions fail, as they should. The related suites I ran pass (preview agent and runtime, workflow, image smoke, bundle content files, build-images, release validation, managed-agent pin), shellcheck is clean, andnpm run release:verifypasses.### Fixedentry under[Unreleased].Workaround for #3399, for the PR body:
No visual previews, since nothing here is visible in a UI.
Detailed Logs:
6615ea4f-05b3-4a69-b9a5-7abafe973d74Log files stored at:
/usr/src/app/logs/executions/issue-3400-2026-10-31T11-42-24-403Z-conversation.json/usr/src/app/logs/executions/issue-3400-2026-10-31T11-42-24-403Z-output.txtLatest Conversation Messages
This PR was created automatically by ProPR after processing issue #3400.
💡 Need changes?
Comment on this PR to request refinements — the AI agent monitors comments and will update the implementation based on your feedback. Keep iterating until you're satisfied!