Repository navigation
Description
Problem
The release builds the service, runner and mcp-server images two times: a load build that is smoked and scanned, and a second build that pushes. The second build runs the stages under no-cache-filters again (apt-get upgrade, install-tools), so it can push a digest that nobody scanned. Run 44415593173 scanned service 495393479143 but pushed 390801b6e0c0. The devcontainer flow (release.yml:152-311) already pushes once by digest, then smokes, attests and tags that digest.
Change
Owner decisions of 2026-11-19:
- Build each image once, then smoke, scan, attest and tag that digest. This replaces the owner decision of 2026-10-23 that ci(image): move the image checks to one path-filtered workflow #1858 records (the publish job rebuilds from the cache).
- Promote each image on its own. A failed verify of one image does not stop the others.
- apt-get upgrade stays in the trixie images (service and mcp-server).
For service, runner and mcp-server, release.yml uses a 3-job flow with a matrix over the 3 images:
- Build job: one
docker/build-push-actionstep with outputspush-by-digest=true,name-canonical=true,push=true,sbom: trueand provenancemode=max. It takes labels from metadata-action withcontext: git, so the revision is the release-please sha.no-cache-filters:service,runner, andrunner,mcp-serverfor MCP. - Verify job: read-only (contents and packages read, no id-token). It pulls
image@digestand runs the image-smoke action (ci(image): move the image checks to one path-filtered workflow #1858) and the image-scan action (ci(security): scan each image with one Trivy action and SARIF #6405). - Attest-and-tag job:
actions/attest(attest-build-provenance v4 is a wrapper), thendocker buildx imagetools create, then a check that each tag resolves to the digest (as release.yml:307-310 does).
Delete the 3 'Build and Load' steps. Update RELEASE_CYCLE.md:59-66 (job names) and 72-75: to take an outside CVE fix, use 'Re-run all jobs', because a re-run of verify scans the same digest. Update the invariant tests that read the step names.
Renovate. The built-in github-actions manager updates actions/attest. No new pin.
Risk. A failed verify leaves an untagged digest in the public package. Image Updater reads only latest, so it ignores that digest. The retention job of #4816 deletes untagged digests older than 30 days. Two more jobs per image add runner start time and a pull of about 10-30 s. A CVE that is fixed outside the repository then ships only in the next build.
Proof
- In the first release after the merge, the pushed 'exporting manifest' digest equals the digest that verify scanned and the digest that
docker buildx imagetools inspect ghcr.io/dan-petty/devops-cli/<image>:<tag>returns. - The PR reports the job times against today's means of 284, 341 and 338 s.
Proposed design
Problem statement
The release builds the service, runner and mcp-server images two times: a load build that it smokes and scans, and a second build that pushes. The second build runs the no-cache stages again (apt-get upgrade, install-tools), so it can push a digest that nobody scanned. Run 44415593173 scanned service 495393479143 but pushed 390801b6e0c0. The change builds each image once, pushes that build by digest, and then smokes, scans, attests and tags that digest, one image at a time.
Acceptance criteria
Requirement: One build per image
The release workflow SHALL build each of the service, runner and mcp-server images in one job, push that build by digest, and MUST NOT run a separate load build of an image that it pushes.
Scenario: The release run builds each image once
- WHEN the first release after the merge runs
uv run devops gh run view <run_id> --logfor each image job - THEN the log of each image holds one
exporting manifestdigest and noBuild and Loadstep, and the verify job pulls that digest.
Requirement: Three-job matrix over the images
The release workflow SHALL run the build, verify and attest-and-tag jobs for each image through one matrix that names service, runner and mcp-server.
Scenario: actionlint accepts the matrix
- WHEN
uv run devops ci --check --only actionlint,zizmorruns on the pull request - THEN the command exits 0 and reports no error on the matrix of
.github/workflows/release.yml.
Requirement: Verify holds read-only permissions
The verify job MUST hold only contents: read and packages: read, and it MUST NOT request id-token.
Scenario: zizmor reports no excess permission
- WHEN
uv run devops ci --check --only zizmorruns on the pull request - THEN the command exits 0 and reports no excessive-permissions finding for the verify job in
.github/workflows/release.yml.
Requirement: Attest then tag the digest
The attest-and-tag job SHALL attest the pushed digest with actions/attest and MUST create each release tag on that digest with docker buildx imagetools create.
Scenario: The tags name the attested digest
- WHEN the first release after the merge runs
uv run devops gh run view <run_id> --loganddocker buildx imagetools inspect ghcr.io/dan-petty/devops-cli/<image>:<tag> - THEN the
actions/atteststep succeeds before theimagetools createstep, and the inspect digest equals the digest that the build job exported, for the release tag and forlatest.
Requirement: Tag check fails on another digest
The attest-and-tag job MUST fail when a tag does not resolve to the digest that the build job pushed.
Scenario: The tag check compares each digest
- WHEN the first release after the merge runs
uv run devops gh run view <run_id> --logfor the attest-and-tag job - THEN the job's check step runs a
testcomparison of each tag'simagetools inspectdigest with the build digest, and the job exits 1 when one differs.
Requirement: Each image promotes on its own
A failed verify of one image MUST NOT cancel the verify or the attest-and-tag job of the other images.
Scenario: The matrix keeps the other images
- WHEN a release run has one failed verify job and
uv run devops gh run view <run_id> --json jobslists the jobs - THEN the verify and attest-and-tag jobs of the other images run to completion and the run reports a failure only for that image.
Existing Tool Considered
Open, maintained tools cover each step of the need. docker/build-push-action builds once and pushes by digest with push-by-digest=true,name-canonical=true (.github/workflows/release.yml:417-433). docker buildx imagetools create puts the tags on that digest and imagetools inspect checks them (.github/workflows/release.yml:293-311). actions/attest writes the provenance; the pinned actions/[email protected] is its wrapper (.github/workflows/release.yml:287, openspec/changes/archive/2026-11-12-4896-make-renovate-cover-every-pin-on/proposal.md:29). docker/metadata-action supplies the labels (.github/workflows/release.yml:348-362). None of them smokes or scans an image: .github/actions/ holds only devcontainer-image, devcontainer-smoke and setup-toolchain, so the smoke and scan come from the image-smoke action (#1858) and the image-scan action (#6405), which this issue waits on. The change builds no code of its own, so it has no build cost.
Key questions
- Does the release build each image once or twice?: Once. The build job pushes by digest with
outputs: type=image,name=...,push-by-digest=true,name-canonical=true,push=true, as the second build of.github/workflows/release.yml:417-433already does, and the verify job pullsimage@digest. The load build at.github/workflows/release.yml:364-374goes, because its no-cache stages run again in the second build and can push a digest that nobody scanned. This replaces the owner decision of 2026-10-23 that the publish job rebuilds from the cache. (best practice) [sources: .github/workflows/release.yml:364-374, .github/workflows/release.yml:417-433, .github/workflows/release.yml:152-311]- Chosen: Build once and push by digest. The pushed digest is the scanned digest, so no unscanned image ships. The devcontainer flow already does this at
.github/workflows/release.yml:152-311. - Rejected: Keep the load build and rebuild for push. The second build runs the no-cache stages again and can push a digest that nobody scanned. Run 44415593173 scanned
495393479143but pushed390801b6e0c0.
- Chosen: Build once and push by digest. The pushed digest is the scanned digest, so no unscanned image ships. The devcontainer flow already does this at
- How does the workflow put the release tags on the scanned digest?: The attest-and-tag job runs
actions/atteston the digest, thendocker buildx imagetools createto put the release tag andlateston it, then atestthat each tag'simagetools inspectdigest equals the build digest, as the devcontainer job does at.github/workflows/release.yml:293-311and the runner job at.github/workflows/release.yml:583-594. (best practice) [sources: .github/workflows/release.yml:293-311, .github/workflows/release.yml:583-594]- Chosen: Tag the digest with
imagetools create. It tags the exact digest that verify scanned, with no rebuild. - Rejected: Rebuild and push each tag. A rebuild can produce a different digest and pushes an image that verify did not scan.
- Chosen: Tag the digest with
- Does a failed verify of one image stop the other images?: No. The matrix sets
fail-fast: false, as the sharded jobs of.github/workflows/ci.yml:149-153and.github/workflows/service-image-test.yml:109-112do, so each image's verify and attest-and-tag run to their end: one failed verify promotes no tag and cancels no other image. (best practice) [sources: .github/workflows/ci.yml:149-153, .github/workflows/service-image-test.yml:109-112]- Chosen: Set
fail-fast: false. The owner decision of 2026-11-19 promotes each image on its own, and the sharded jobs of the repository already keep every shard to its end. - Rejected: Keep the default
fail-fast: true. One failed verify would cancel the other images and delay their release.
- Chosen: Set
- Which labels set the revision of a pushed image?:
docker/metadata-actionwithcontext: git. The build job checks outneeds.release-please.outputs.sha(.github/workflows/release.yml:331-336), so the git context gives the revision the release-please sha; the defaultcontext: workflowwould give the sha of the tag push. (best practice) [sources: .github/workflows/release.yml:331-336, .github/workflows/release.yml:348-362]- Chosen:
context: git. The release-please sha is the commit that the release builds, so the label matches the release. - Rejected: The default
context: workflow. The workflow sha is the commit of the tag push, not the release-please sha.
- Chosen:
- Which cache filters does each image build use?:
no-cache-filters: servicefor the service image,no-cache-filters: runnerfor the runner image, andno-cache-filters: runner,mcp-serverfor the MCP image. The MCP stage buildsFROM runner(Dockerfile:172), so its build also runs the runner stage'sapt-get upgrade(Dockerfile:139); naming onlymcp-server, as.github/workflows/release.yml:707does today, lets that upgrade come from the MCP cache scope. (best practice) [sources: .github/workflows/release.yml:707]- Chosen:
runner,mcp-serverfor the MCP image. The MCP image builds on the runner stage, so the runner stage'sapt-get upgrademust run fresh as well as themcp-serverstage's kubectl and helm install. - Rejected:
mcp-serveronly, as today. The runner stage of the MCP image would come from themcp-servercache scope, so itsapt-get upgradecould keep a package that a security update has since fixed. - Rejected: Set no filter. The stages that
apt-get upgradeandinstall-toolschange would come from cache and hide a new package.
- Chosen:
- Does the change add a new Renovate pin for
actions/attest?: No. The shared preset.github/renovate/base.json:64-69groups everygithub-actionsaction update, so the built-in github-actions manager updatesactions/attestwith no new custom rule.actions/attest-build-provenanceis a wrapper that bumpsactions/attestin its ownaction.yml(openspec/changes/archive/2026-11-12-4896-make-renovate-cover-every-pin-on/proposal.md:29). (best practice) [sources: .github/renovate/base.json:64-69, openspec/changes/archive/2026-11-12-4896-make-renovate-cover-every-pin-on/proposal.md:29]- Chosen: Rely on the built-in github-actions manager. The preset already groups and updates every action reference, so a second pin would duplicate it.
- Rejected: Add a custom Renovate rule. It adds a rule that the built-in manager already covers.
- How does a person take an outside CVE fix after a release?: Use 'Re-run all jobs'. The build job runs again and takes the current base image and apt packages, and verify scans the new digest; a re-run of the verify job alone pulls and scans the same digest, so the fix does not ship.
RELEASE_CYCLE.md:70-75holds the failure steps that the change rewrites. (best practice) [sources: RELEASE_CYCLE.md:70-75]- Chosen: Tell a person to use 'Re-run all jobs'. The build job runs again and takes the fixed base image, and verify scans the new digest.
- Rejected: Tell a person to re-run the verify job. The verify job scans the same digest, so the new CVE fix does not ship.
- Which tests read the release step names?:
tests/invariants/test_runner_image.py(RUNNER_STEPS at 16-23 and therunner-imagejob at 92-98),tests/invariants/test_mcp_server_image.py(themcp-server-imagejob at 71-83),tests/commands/test_ci.py(the service job step order at 840-910) andtests/invariants/test_workflow_contracts.py(the attest step of each job id at 306-318).tests/invariants/test_architectural_invariants.pyreads norelease.yml. The change updates these four to the matrix job ids and the new step names. [sources: tests/invariants/test_runner_image.py:16-23, tests/invariants/test_runner_image.py:92-98, tests/invariants/test_mcp_server_image.py:71-83, tests/commands/test_ci.py:840-910, tests/invariants/test_workflow_contracts.py:306-318] - Does the change clean up an untagged digest that a failed verify leaves?: No. A failed verify leaves a digest that no tag names. Image Updater moves only on
latest(docs/CLUSTER.md:281), so that digest never reaches the cluster, and the release adds no cleanup step. The repository's one cleanup workflow deletes untagged digests of the devcontainer package only, older than one day (.github/workflows/cleanup-devcontainer.yml:91-100); the retention job of ci(cleanup): prune untagged GHCR images and old attestation tags #4816 is the place for the three release packages, and it is not in this repository yet. (best practice) [sources: docs/CLUSTER.md:281, .github/workflows/cleanup-devcontainer.yml:91-100]- Chosen: Leave the cleanup to ci(cleanup): prune untagged GHCR images and old attestation tags #4816. An untagged digest ships nothing, and a package cleanup is the job of ci(cleanup): prune untagged GHCR images and old attestation tags #4816, not of the release.
- Rejected: Add a cleanup step to the release workflow. It duplicates the retention job of ci(cleanup): prune untagged GHCR images and old attestation tags #4816 and adds a write scope to a release that only needs to promote tags.
- Does
apt-get upgradestay in the trixie images?: Yes. The owner decision of 2026-11-19 keepsapt-get upgradein the trixie stagesrunner(Dockerfile:139) andservice(Dockerfile:221), and the no-cache filters keep those stages fresh, so a release still takes the Debian security updates (CHANGELOG.md:4508). (best practice) [sources: CHANGELOG.md:4508]- Chosen: Keep
apt-get upgrade. The owner decision of 2026-11-19 keeps it in the trixie images, and the no-cache filter runs it on each build. - Rejected: Remove
apt-get upgrade. It contradicts the owner decision of 2026-11-19 and would ship the base image's older packages.
- Chosen: Keep
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
Alternatives check of 2026-11-19: not-applicable.
Class: ci, no search.
Tool: none found.
Activity
dan-petty commentedon Nov 19, 2026
Both work on the image-check flow, but #1858 creates the reusable smoke-and-scan workflow while the candidate restructures release.yml to build once, verify, then tag that digest.devops-cli-service commentedon Nov 19, 2026
Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies in the section Proposed design of the body.