Repository navigation
🤖 ci: publish the sandbox image on push to main, once per inputs key - #7671
Conversation
The publish job of the Bug-bash sandbox image workflow now also runs on pushes to main that change an image input. It skips a key whose stable tag inputs-<key> exists, and otherwise builds fresh, pushes, points the stable tag at the build's digest and attests it.
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 37b9627f09
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
🟢 e2e stories (Haiku): 14 passed22 agent steps · 7 replayed from cache · 15 model calls · 46.1k tokens (24% cached) All 14 tests in 9 files
e2e 0.20.0 · 1m 24s · web · run artifacts 🟢 e2e Electron stories (Haiku): 3 passed3 agent steps · 3 model calls · 8.0k tokens (22% cached) All 3 tests in 3 files
e2e 0.20.0 · 20.6s · electron · run artifacts 🟢 e2e agent repros (Haiku): no tests selectedSpend: $0.00 of the $1.00 cap (proxy ledger) e2e 0.20.0 · 5.4s · 2 targets (web, phone) · run artifacts |
…ested digest imagetools create wraps a single manifest in a new index by default, so the stable tag got an unattested digest. --prefer-index=false copies the manifest, and the step checks the tag's digest. The tag is the completion marker, so it now comes after Attest: a failed attestation leaves no tag and a re-run publishes again.
|
@codex review |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
jq inside echo arguments does not stop a bash -e script, so a bad record set an output and Attest no longer failed on it. Assign first.
|
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🛡️ Codex Security Review · Automatically triggeredSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
Readiness record
Generated with |
|
Post-merge check of the publish workflow on
The Attest step in the push run left one warning: the storage record needs |
Summary
The "Bug-bash sandbox image" workflow now publishes the image by itself. A push to main that changes an image input runs the publish job. The job creates the image only if the key has none yet: each inputs key gets one stable tag,
ghcr.io/coder/xum-bugbash-sandbox:inputs-<key>. A key that has its tag pushes nothing. This is PR 1 of 2. Runners still trust only the digest inimage.jsonuntil PR 2.Background
An image change takes four steps today, and two of them need a person. #7362 changed the Dockerfile. Its story lanes refused the stale image, so it needed an admin merge, and the merge queue then stayed red for 3.5 hours. After that, a maintainer ran the manual publish on main, and #7369 pinned the new digest. Four images went through that process between Oct 8 and Oct 23.
The plan, which the user approved: main publishes once per key with no person (this PR). Then every sandbox job pulls
inputs-<key>, checks its build attestation (gh attestation verify --source-ref refs/heads/main), and builds locally when there is no verified image (PR 2).image.jsonand theBUGBASH_SANDBOX_BUILD_STALEopt-in go away in PR 2.Implementation
pushto main, filtered to the image inputs (build.sh --keyhashes the Dockerfile,build.shand the playwright-core version inbun.lock) and to this workflow file. A change to this file therefore publishes the current key once.Makefileis not in the push filter. A Makefile change does not change the key, and an existing key needs no publish.docker buildx imagetools inspect. If the tag exists, the step writes "exists" to the summary and stops. Only a: not founderror counts as missing. Any other lookup error fails the job. If the tag is missing, the step runs the publish as before.imagetools create --prefer-index=false. That flag copies the manifest as it is. The default wraps a single manifest in a new index with a new, unsigned digest. The step reads the tag's digest back and fails unless it equals the signed digest. The stable tag marks the key as done, so a failed Attest leaves no tag, and a re-run publishes again.This PR does not change any image input, so the inputs key stays
2bf9e12d…, the key inimage.json. No old-style publish is needed for this PR.Validation
PUBLISH: … missing.SKIP: … exists.FAILwith exit 1, and the DNS error printed.--prefer-index=false, the tag got a different digest.actionlint1.7.13: clean.make lint-zizmorandmake static-check: pass.inputs-2bf9e12d3ac7dcb10397698df2792bf1b244b3fcbe68225378302ef695ba302a. Then a manual run on main must report "exists" and push nothing. I will link both runs here.Risks
Low. Publishing stays main-only, from the run's own commit, with a fresh build and an attestation. A new path is the one trigger: every
bun.lockchange on main starts a run that ends after the lookup, at about one minute of runner time each. A failed lookup fails the run and pushes nothing.Decisions in the approved plan
build.shand docs.Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:xhigh• Cost:$263.47