Repository navigation
fix(dockerrun): a local image named by digest is present, not something to pull - #861
Merged
Merged
Conversation
…ng to pull ImageExists compared RepoTags only. An image named by digest — the form a local build hands back, and the one a run then asks for — was read as absent whether Docker held it under RepoDigests or only under its content-addressable ID, and getImageIfNotPresent went on to pull an image that was already here. With the registry absent or refused, that pull is the failure the user sees. imageMatchesReference matches a tag on RepoTags as before, and a digest on either any RepoDigests entry carrying that digest, under whatever repository name it was pulled as, or the image ID, which is the only digest an image built or loaded locally and never pushed has. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…daemon, not a digest scan Review of the first head: matching any RepoDigests entry or the raw image ID reported present a reference the daemon cannot resolve — a digest resolves only under the repository name the image carries it as, so the same bytes requested under another name inspect as "No such image" while the scan said yes, and the container create then failed on the very reference the check had approved. ImageExists now asks the daemon to resolve the exact reference with ImageInspect, the resolution the create performs. Not found is false with no error; any other daemon failure is an error, so "cannot tell" never becomes "pull it". A locally imported image is present under its tag and under its own name@sha256:<ID>, which is the form a local build hands back and the case the RepoTags-only comparison read as absent. The test imports an image from a tarball (nothing pulled) and covers: present by tag; present by name@digest; the same digest under another repository name is absent, not present; an unknown tag is absent; an unreachable daemon is an error. docs/service-image-plumbing.md states the behaviour. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… !skip_infra constraint requireDocker lives behind //go:build !skip_infra; a test file without it broke go test -tags skip_infra ./runners/dockerrun with 'undefined: requireDocker'. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
antoinetoussaint-byte
added a commit
that referenced
this pull request
Oct 28, 2026
…top (#863) * release: v0.19.9 — a local image named by digest is present, not pulled (#861) Bump version/info.codefly.yaml 0.19.8 → 0.19.9; version-tag.yml cuts the tag from the merged commit once the suite is green. Merge AFTER #861 (and #862 if it is to ride along): the tag carries exactly what main holds at this merge. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * feat(runners): condition orphan recovery on exact registration evidence * fix(runners): bound recovery receipts consistently with preview output * test(runners): wait for leaderless fixture exec evidence * feat(dockerrun): stop an explicit container generation with custody checks * docs(dockerrun): define local stop receipt contract exception --------- Co-authored-by: Antoine Toussaint <312536060+antoinetoussaint-byte@users.noreply.github.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
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.
What this fixes
runners/dockerrun.ImageExistscomparedRepoTagsonly. An image named by digest — the form a local build hands back, and the one a run then asks for — was read as absent, sogetImageIfNotPresentpulled an image that was already present. With the registry absent or refused (no Docker Hub, by owner rule), that pull is the failure the user sees; it blocks the full local product run's converter agents and, by the owner's gate, Blue.The change (head
ee1ede134e39978bfcc053bc138e39449bd253ee)ImageExistsasks the daemon to resolve the exact requested reference (ImageInspect(FullName())) — the same resolution the later container create performs. Not found is an answer (false, no error); any other daemon failure is an error, so "cannot tell" never becomes "pull it".getImageIfNotPresentis unchanged: it already returns before pulling when the image exists.Why not a digest scan (first head
721be68c, withdrawn)Codex's review (
/tmp/codex-core861-exact-reference-negative.json) showed that a digest resolves only under the repository name the image carries it as: the local LibreOffice image inspects fine ascodefly-dev/documents/libreoffice@sha256:99a0d166…and as its ID, whileexample.invalid/review-no-such-image@sha256:<same digest>isNo such image. The first head matched anyRepoDigestsentry or the raw ID regardless of repository, so it would have reported present a reference the create then could not find. Gone; the daemon decides.Test
TestImageExistsResolvesTheExactReference(runners/dockerrun/image_exists_test.go, Docker-gated like the rest of the package; nothing is pulled — the image is imported from a tarball):name@sha256:<ID>(the local-build form) — fails on main, which reads the digest form as absent;cannot inspect image …), never an absence.Docs
docs/service-image-plumbing.mdgains "Image presence at run time", stating the exact-reference rule, the not-found/daemon-error distinction, and that a locally built image is present under its tag andname@sha256:<ID>.Status
Candidate for review, not qualified: verified locally with
go build ./runners/...,go vet, and the new test against the local daemon (0.6 s). CI is the gate; the converter agents build against this head for local proof. v0.19.9 carries it; do not merge from here.🤖 Generated with Claude Code
Review fix: build constraint
image_exists_test.gonow carries//go:build !skip_infralike the rest of the Docker-gated tests;go test -tags skip_infra ./runners/dockerrun -run '^$'compiles again (it failed withundefined: requireDockerat6403dd55).