Skip to content

fix(release): pin *_IMAGE env to the SHA tag, not the digest - #118

Merged
teckedd-code2save merged 1 commit into
mainfrom
fix/release-env-uses-tag-not-digest
Oct 25, 2026
Merged

teckedd-code2save merged 1 commit into
mainfrom
fix/release-env-uses-tag-not-digest

Conversation

@teckedd-code2save

Copy link
Copy Markdown
Owner

What

The release endpoint wrote the immutable digest (repo@sha256:...) into the deployment's *_IMAGE env var, which the next build_publish then resolved through docker compose config + docker buildx bake as a build tag — and a digest cannot be a build tag.

failed to solve: build tag cannot contain a digest

Why

The release half intentionally pins the runtime to an immutable digest (via the managed image override). But it also synced that digest into the *_IMAGE env var that the source Compose substitutes for image:. On the following build, that digest became the build tag and broke the build.

Change

  • release/route.ts — write the SHA tag (ref) into the *_IMAGE env var, keeping the digest only in the managed override pin.
  • agent-operation-worker.cjs — forward the build's ref (tag) alongside digest to the release endpoint (it previously dropped it).

The running container stays pinned to the exact digest via the override; the env var now carries a buildable tag.

Validation

  • npx tsc --noEmit — clean
  • node --check scripts/agent-operation-worker.cjs — clean
  • npx vitest run — 502/502 passing

The release wrote the immutable digest (repo@sha256:...) into the deployment
*_IMAGE env var, which the next build_publish's 'docker compose config' +
'buildx bake' resolved as a build tag — and a digest cannot be a build tag
('build tag cannot contain a digest').

Now the release writes the SHA tag (ref) into the env var and keeps the digest
only in the managed image override, so the running container stays pinned to
the exact digest while the next build derives a valid tag.
@teckedd-code2save
teckedd-code2save merged commit 575da5c into main Oct 25, 2026
3 checks passed
@teckedd-code2save
teckedd-code2save deleted the fix/release-env-uses-tag-not-digest branch October 25, 2026 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant