Skip to content

[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

Merged
integry merged 4 commits into
mainfrom
3400/claude-opus-5-5-fix-3399-the-published-ag-20261031-1127-4wc
Oct 31, 2026

Conversation

@propr-dev

@propr-dev propr-dev Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

AI Implementation Summary

Closes #3400

Branch: 3400/claude-opus-5-5-fix-3399-the-published-ag-20261031-1127-4wc
Commits: ✅ Changes committed (28fef58)


AI Processing Completed

Execution Details:

Summary:
I've changed Dockerfile.agent so 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 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.

Detailed Logs:

  • Conversation: 164 messages
  • Session: 6615ea4f-05b3-4a69-b9a5-7abafe973d74

Log files stored at:

  • conversation: /usr/src/app/logs/executions/issue-3400-2026-10-31T11-42-24-403Z-conversation.json
  • output: /usr/src/app/logs/executions/issue-3400-2026-10-31T11-42-24-403Z-output.txt
Latest Conversation Messages
ASSISTANT: [content unavailable]

ASSISTANT: I've changed `Dockerfile.agent` so 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 ha...


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!

…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.
@integry

integry commented Oct 31, 2026

Copy link
Copy Markdown
Owner

/review

@propr-dev

propr-dev Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @integry

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The 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 blockers

No merge blockers.

Suggestions

These are optional follow-ups and are not sent to /fix.

S1: 🟢 Preserve diagnostics for large failures

In scripts/check-image-whiteouts.sh:97, the diagnostic pipeline uses printf | head -n 20 under pipefail. With sufficiently large whiteout output, head can close the pipe early, causing SIGPIPE and terminating the script before its final summary or inspection of subsequent layers. The image still correctly fails validation, so this is non-blocking. A filter that consumes all input while printing only the first 20 lines would preserve the intended diagnostics; a large fixture could cover that behavior.

Score

The 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

  • Model: GPT-6 Astra
  • Time: 43s
  • Tokens: 54,816 (54,240 in / 576 out)
  • Cost: $0.46

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix S1

🤖 Review by ProPR

@integry

integry commented Oct 31, 2026

Copy link
Copy Markdown
Owner

/fix
Empirical check before merge: this doesn't pass its own gate yet. I built the agent image from main + this PR with scripts/build-images.sh --only agent (tag bundle-bbb78a107626-4b02a2). scripts/check-image-whiteouts.sh fails, and an independent docker save + tar scan finds 13 .wh. entries across 19 layers (down from 152, but not zero):

  • layers 2–5, COPY --from=… of @anthropic-ai, @openai, opencode-ai, agent-tank into /usr/local/lib/node_modules/...: one .wh..wh..opq each
  • layer 10, COPY /opt/uv: opt/uv/.wh..wh..opq
  • layer 11, COPY --chown=node:node /home/node/.local: home/node/.local/.wh..wh..opq
  • layer 13, COPY scripts/extension-stdio-bridge.mjs /opt/propr/…: opt/propr/.wh..wh..opq
  • layer 16, the final cleanup RUN: root/.cache, root/.codex, root/.config, root/.local, root/.vibe, tmp/opencode, each with .wh..wh..opq

So this builder's differ marks every newly created directory opaque, including every COPY destination, not only directories it replaces. Flattening only the base can't reach zero. Make the entire shipped image a single layer: keep the current stages as a build stage, then end with FROM scratch + COPY --from=<full final stage> / / and re-declare all image config exactly (ENV including PATH/NODE_*/NODE_OPTIONS, USER, WORKDIR, ENTRYPOINT/CMD, labels). With no lower layer there's nothing to white out. Keep the content-hash, supply-chain and version tests green, and keep the size bounded (the current build is 2.48 GB, same as 0.9.0). Before pushing, actually build with scripts/build-images.sh --only agent, run scripts/check-image-whiteouts.sh against the built image and paste the passing output, and confirm claude, codex, agy, opencode, vibe, agent-tank, gh, git and rg all resolve and the entrypoints still work.

@propr-dev

propr-dev Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

ℹ️ No review findings or suggestions were selected.

No files were changed because this /fix command resolved to no review record.

Name at least one F# finding or S# suggestion from a current review comment, for example /fix F20 S3. Use /fix all to request every pending finding and suggestion. Any text after the identifiers, and every line below the command, is passed through as instructions.

View Task Execution


Processing comment ID: 6546132732✓

@integry

integry commented Oct 31, 2026

Copy link
Copy Markdown
Owner

Empirical check before merge: this doesn't pass its own gate yet. I built the agent image from main + this PR with scripts/build-images.sh --only agent (tag bundle-bbb78a107626-4b02a2). scripts/check-image-whiteouts.sh fails, and an independent docker save + tar scan finds 13 .wh. entries across 19 layers (down from 152, but not zero):

  • layers 2–5, COPY --from=… of @anthropic-ai, @openai, opencode-ai, agent-tank into /usr/local/lib/node_modules/...: one .wh..wh..opq each
  • layer 10, COPY /opt/uv: opt/uv/.wh..wh..opq
  • layer 11, COPY --chown=node:node /home/node/.local: home/node/.local/.wh..wh..opq
  • layer 13, COPY scripts/extension-stdio-bridge.mjs /opt/propr/…: opt/propr/.wh..wh..opq
  • layer 16, the final cleanup RUN: root/.cache, root/.codex, root/.config, root/.local, root/.vibe, tmp/opencode, each with .wh..wh..opq

So this builder's differ marks every newly created directory opaque, including every COPY destination, not only directories it replaces. Flattening only the base can't reach zero. Make the entire shipped image a single layer: keep the current stages as a build stage, then end with FROM scratch + COPY --from=<full final stage> / / and re-declare all image config exactly (ENV including PATH/NODE_*/NODE_OPTIONS, USER, WORKDIR, ENTRYPOINT/CMD, labels). With no lower layer there's nothing to white out. Keep the content-hash, supply-chain and version tests green, and keep the size bounded (the current build is 2.48 GB, same as 0.9.0). Before pushing, actually build with scripts/build-images.sh --only agent, run scripts/check-image-whiteouts.sh against the built image and paste the passing output, and confirm claude, codex, agy, opencode, vibe, agent-tank, gh, git and rg all resolve and the entrypoints still work.

@propr-dev

propr-dev Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit 99cf7f9

Summary of Changes

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.


🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @integry
  • Time: 6m 4s
  • Tokens: 2,191,001 (2,176,431 in / 14,570 out)
  • Cost: $1.10

Undo Changes • View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR
Processing comment ID: 6549593689✓

…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
@propr-dev

propr-dev Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

CI failed: CodeQL

Please investigate and fix this CI failure.

Failure evidence

test/agentDockerfileSupplyChain.test.ts:157 — Incomplete string escaping or encoding
This does not escape backslash characters in the input.

@propr-dev

propr-dev Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ Applied the requested follow-up changes in commit c9dceee

Summary of Changes

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:

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.


🤖 Implementation Details

  • Model: Claude Opus 5.5 (medium)
  • Requested By: @github-advanced-security[bot]
  • Time: 2m 48s
  • Tokens: 158,390 (157,572 in / 818 out)
  • Cost: $0.20

Undo Changes • View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR
Processing comment ID: 4433456794✓

…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
@propr-dev

propr-dev Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor Author

🔀 Resolved merge conflicts from main into 3400/claude-opus-5-5-fix-3399-the-published-ag-20261031-1127-4wc in commit 7bfd5f8

Conflicting Files

  • CHANGELOG.md

Resolution Summary

The merge had one conflict, in CHANGELOG.md, and it's now resolved. No conflict markers are left anywhere in the repository.

What the conflict was: Both branches added a new entry at the top of ## [Unreleased], so git saw two different blocks in the same place.

  • This PR added a ### Fixed entry about the agent image. propr/agent now ships as a single layer with no overlayfs whiteouts, which fixes the unpack failure on OrbStack and Docker 29 hosts (v0.9.0 agent image fails to unpack on OrbStack (opaque whiteout EPERM) #3399). It also mentions the pinned Node base and the new scripts/check-image-whiteouts.sh check.
  • main added a ### Security entry about the minimatch denial-of-service advisory (GHSA-g3hv-75wg-m249). It's fixed through scoped npm overrides, and the entry links to docs/dependency-audit-exceptions.md.

How I resolved it: I kept both entries, word for word, and removed the markers. ### Fixed comes first, then a blank line, then ### Security.

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:

  • package.json and package-lock.json, which git merged on its own, both still parse as valid JSON.
  • git diff --check CHANGELOG.md reports no whitespace problems.

I didn't edit any other files.


🤖 Resolution Details

  • Model: Claude Opus 5.5
  • Time: 2m 37s

View Task Execution


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
@propr-dev

propr-dev Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor Author

ℹ️ Analyzed the follow-up request by @propr-dev[bot]

Analysis Summary

Nothing needed changing. This CI run was on 99cf7f98c, and the fix for that CodeQL alert is already on the branch in the next commit, c9dceee0d.

At test/agentDockerfileSupplyChain.test.ts:157, the code that turns each label into a regex used to escape only .. It now escapes every regex special character, backslash included (/[.*+?^${}()|[\]\\]/g). That's the fix CodeQL asks for.

  • Tests: all 14 tests in test/agentDockerfileSupplyChain.test.ts pass.
  • Other files on this branch: no other test or script has the same partial-escape pattern. The other .replace calls use fixed regexes on Dockerfile text and image references. They don't build a regex from input, so this alert doesn't apply to them.
  • Not checked yet: whether CodeQL actually passes. It needs to run again on the current branch tip (7bfd5f82c), which includes the fix. Once it does, it should close code-scanning alert AI Fix for Issue #222: Refactor: Clean up 'starting work' comments after PR follow-up processing #223.

No previews, since only a test changed.

This doesn't touch the bigger blocker on the PR: your local build still failed scripts/check-image-whiteouts.sh with 13 whiteout entries.

No code changes were necessary based on the current state of the branch.


🤖 Analysis Details

  • Model: Claude Opus 5.5 (medium)
  • Time: 2m 31s
  • Tokens: 154,699 (153,521 in / 1,178 out)
  • Cost: $0.20

View Task Execution


💡 ProPR Slash Commands
Command Description Example
/merge Merge target branch into this PR and resolve conflicts /merge
/review Request an AI code review /review or /review claude-sonnet
/fix Address review blockers, or blockers and suggestions with /fix all /fix, /fix all, or /fix F3 S5
/switch Change the AI model for this PR /switch claude-opus
/use Override the model for a single follow-up run /use claude-sonnet
/ultrafix Loop review→fix cycles until score goal is met /ultrafix or /ultrafix goal=8 max=10

🤖 Generated by ProPR
Processing comment ID: 6549715642✓

@integry

integry commented Oct 31, 2026

Copy link
Copy Markdown
Owner

/review

@propr-dev

propr-dev Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor Author

✅ AI Code Review Complete requested by @integry

Posted 1 review:

View Task Details

@propr-dev

propr-dev Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

🔍 AI Code Review — codex:gpt-6-astra

Overall Evaluation

The 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 — Dockerfile.agent now publishes one filesystem copy and explicitly restores runtime environment variables, labels, user, working directory, and entrypoint.

✅ 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 blockers

No merge blockers.

Suggestions

These are optional follow-ups and are not sent to /fix.

S2: 🟢 Check runtime configuration parity

The new configuration test checks Dockerfile text against a fixed expected list. A future smoke assertion against docker image inspect would additionally detect configuration differences introduced by build arguments or builder behavior. This is optional: the supplied implementation explicitly restores the visible runtime configuration, and no configuration regression was identified.

S3: 🟢 Retain concrete build evidence

Retain 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.

Score

The 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

  • Model: GPT-6 Astra
  • Time: 29s
  • Tokens: 57,016 (56,349 in / 667 out)
  • Cost: $0.49

View Task


💡 Next step: Comment /fix to address every F# merge blocker, /fix all for every pending blocker and suggestion, or name records explicitly, as in /fix F3 S5.
F# and S# IDs increment across review comments and remain permanent, so selectors such as /fix F3 F5 stay unambiguous across cycles. S# suggestions stay optional: they are implemented only when you name them or request /fix all, and they never relax a merge blocker.

Copy and edit to choose records from this review:

/fix S2 S3

🤖 Review by ProPR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

2 participants