From c1bb0e80b3eaf40fc13c0cf771b09be146fa1a4a Mon Sep 17 00:00:00 2001 From: Dotta <34892728+cryppadotta@users.noreply.github.com> Date: Sat, 28 Nov 2026 06:32:04 -0600 Subject: [PATCH] fix(ci): enable containerd image store before loading merge-group OCI archive (#23157) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Thinking Path > - Paperclip is the open source app people use to manage AI agents for work. > - The `docker-merge-group.yml` workflow builds and probes `linux/amd64` and `linux/arm64` production images in the merge queue so `docker.yml` can promote verified bytes on `master`. > - Every `linux/arm64` merge-group run on `ubuntu-24.04-arm` fails during `docker load --input "$ARCHIVE"` with `open /var/lib/docker/tmp/docker-import-.../blobs/json: no such file or directory`. > - That failure prevents `linux/arm64` merge-group image verification from ever succeeding and leaves red merge-queue workflow runs on every merge. > - This pull request enables Docker's `containerd-snapshotter` image store (and verifies activation after restart) before `Set up Docker Buildx` in the `build` job so `ubuntu-24.04-arm` loads OCI image index archives with provenance attestations cleanly. > - The benefit is green `linux/arm64` merge-group builds while preserving full SLSA provenance attestations and PID 1 orphan-reaping checks. ## Linked Issues or Issue Description **What happened?** Every `linux/arm64` run of `.github/workflows/docker-merge-group.yml` on `ubuntu-24.04-arm` fails in `Verify PID 1 reaps orphaned processes` during `docker load --input "$ARCHIVE"` with `open /var/lib/docker/tmp/docker-import-.../blobs/json: no such file or directory`. **Expected behavior** Both `linux/amd64` and `linux/arm64` merge-group builds should load the OCI archive, pass `scripts/assert-orphan-reaping.sh`, record the verified image, and upload the artifact. **Steps to reproduce** 1. Trigger `.github/workflows/docker-merge-group.yml` via the `master` merge queue (for example, run `46002863710`). 2. Observe `linux/amd64` (`ubuntu-26.04`) passes `docker load`, while `linux/arm64` (`ubuntu-24.04-arm`, classic Docker graphdriver) fails with missing `blobs/json`. ## What Changed - Added a step in `.github/workflows/docker-merge-group.yml` (`build` job, before `Set up Docker Buildx`) that enables Docker's `containerd-snapshotter` image store when not already enabled, restarts Docker, and asserts `containerd.snapshotter` is active in `docker info`. - Added a regression assertion in `scripts/merge-group-image.test.mjs` scoped to the `build` job verifying `containerd-snapshotter` precedes `Set up Docker Buildx`. ## Verification - Ran locally against the PR worktree: - `node --test scripts/merge-group-image.test.mjs scripts/macos-runner-runtime-workflow.test.mjs` — all passed. - `vitest run server/src/__tests__/docker-runner-workflows.test.ts server/src/__tests__/docker-build-stamp.test.ts` — 33/33 passed. - Full PR CI runs on this PR; live `ubuntu-24.04-arm` `docker load` behavior will be verified on the next `merge_group` run after merge. ## Risks - Low risk: scoped strictly to `docker-merge-group.yml` (which has read-only permissions and no registry credentials) and skipped as a no-op on runners that already enable `containerd-snapshotter`. - Easy to roll back by reverting this PR. ## Model Used - Gemini (Antigravity) ## Checklist - [x] I have included a thinking path that traces from project context to this change - [x] I have specified the model used (with version and capability details) - [x] I have checked ROADMAP.md and confirmed this PR does not duplicate planned core work - [x] I have searched GitHub for duplicate or related PRs and linked them above - [x] I have either (a) linked existing issues with `Fixes: #` / `Closes #` / `Refs #` OR (b) described the issue in-PR following the relevant issue template - [x] I have not referenced internal/instance-local Paperclip issues or links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip` URLs) --- .github/workflows/docker-merge-group.yml | 23 +++++++++++++++++++++++ scripts/merge-group-image.test.mjs | 4 ++++ 2 files changed, 27 insertions(+) diff --git a/.github/workflows/docker-merge-group.yml b/.github/workflows/docker-merge-group.yml index cfbb96ff251..4bfe2ee0c92 100644 --- a/.github/workflows/docker-merge-group.yml +++ b/.github/workflows/docker-merge-group.yml @@ -208,6 +208,29 @@ jobs: done df -h + - name: Enable containerd image store for OCI archive loading + run: | + set -euo pipefail + if docker info --format '{{json .DriverStatus}}' | grep -q 'containerd.snapshotter'; then + echo "Docker containerd image store already enabled." + exit 0 + fi + sudo python3 - <<'PYTHON' + import json + from pathlib import Path + config = Path("/etc/docker/daemon.json") + settings = json.loads(config.read_text()) if config.exists() else {} + settings.setdefault("features", {})["containerd-snapshotter"] = True + config.write_text(json.dumps(settings)) + PYTHON + sudo systemctl restart docker + status="$(docker info --format '{{json .DriverStatus}}')" + echo "$status" + echo "$status" | grep -q 'containerd.snapshotter' || { + echo "Docker containerd image store failed to activate." >&2 + exit 1 + } + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v4 with: diff --git a/scripts/merge-group-image.test.mjs b/scripts/merge-group-image.test.mjs index f372efb92d4..22e6803c056 100644 --- a/scripts/merge-group-image.test.mjs +++ b/scripts/merge-group-image.test.mjs @@ -195,6 +195,10 @@ test("the merge-queue build has no publishing credentials or AWS release fleet a assert.match(workflow, /github\.event\.merge_group\.base_ref == 'refs\/heads\/master'/); assert.match(workflow, /github\.repository_id == '1170821064'/); assert.match(workflow, /push: false/); + const buildJob = workflow.split("\n build:\n")[1]; + assert.ok(buildJob, "merge-group workflow must define a build job"); + assert.match(buildJob, /containerd-snapshotter/); + assert.ok(buildJob.indexOf("containerd-snapshotter") < buildJob.indexOf("Set up Docker Buildx")); assert.match(workflow, /scripts\/assert-orphan-reaping\.sh/); assert.ok(workflow.indexOf("assert-orphan-reaping.sh") < workflow.indexOf("merge-group-image.mjs record"), "the record is written only after the probe passes");