fix(smoke): pin the eject smoke's psql image to the digest compose carries - #269
Merged
Merged
Conversation
…rries board-eject-smoke.mts shelled out to a bare `postgres:18-alpine` for its psql client while every image in docker/ is pinned by digest. Rather than hand-write a second digest that nothing would move — Dependabot's docker and docker-compose ecosystems are scoped to docker/ — the smoke now reads the pinned reference out of docker/compose.yml's postgres service, so it runs a digest and still follows the weekly bump. release.md now states the scope the pins actually have, so the bare tag on a GitHub Actions `services:` container reads as the decision it is rather than the oversight it looked like. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GVdrZfcwVhvJpZWUKWxYs9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes the last open item of MEI-102. Items 1–4 of that ticket were already fixed on
main; this is item 5, the undigested postgres image in the eject smoke.The problem
scripts/board-eject-smoke.mtsshelled out to a barepostgres:18-alpinefor itspsqlclient, while every base image underdocker/is pinned by digest.Why it isn't just "add the digest"
The ticket justified the fix as consistency — "every other postgres reference in the repo is digest-pinned". That premise no longer holds, so I checked what the rule actually is before patching:
docs/contributing/release.mdscopes the policy to "the Dockerfiles and compose files", and closes with the reason it is affordable: "Dependabot moves all of these pins … so the pinning costs review, not staleness.".github/dependabot.ymlscopes itsdockeranddocker-composeecosystems to/docker. Itsgithub-actionsecosystem updates action refs, not a workflow'sservices.image.So a digest hand-written in
scripts/or inci.ymlis a digest nothing ever moves — it buys determinism today and pays staleness forever, which is the trade the policy exists to avoid.What this does instead
The smoke reads the pinned reference rather than repeating it:
scripts/compose-images.mtspulls the digest-pinned image out ofdocker/compose.yml'spostgresservice. The smoke now runs a digest and follows Dependabot's existing weekly compose bump, with no second copy to drift. This mirrors the same file's existingcodeVersion()helper, which already readsCODE_VERSIONout of a source file rather than hardcoding it.The five bare
postgres:18-alpinereferences in.github/workflows/ci.ymlare left alone deliberately — they areservices:containers created empty for one job and discarded with it, and no ecosystem reads a workflow'sservices:block.docs/contributing/release.mdnow says so, so the next audit reads them as a decision rather than re-filing this:Changes
scripts/compose-images.mtspinnedComposeImage(service)— reads the digest-pinned image fromdocker/compose.yml, refusing an unknown service or an unpinned one.scripts/compose-images.test.tsscripts/board-eject-smoke.mtspinnedComposeImage('postgres')for thepsqlclient.docs/contributing/release.mdservices:containers stay on a bare tag on purpose.Validation
pnpm verifypasses on this branch (exit 0) — 467 test files, 8187 tests, plus lint, guards, all three typechecks and every generated-doc check.compose-imagestests pass.pnpm docs:links:checkpasses, so the newrelease.mdprose resolves.AGENTS.md.Not run here:
pnpm board:eject:smokeitself needs Docker and a reachable Postgres, neither available in this container. The changed line is the image argument to the existingdocker run, and the test pins the value it now receives.Generated by Claude Code