Skip to content

admission: accept a digest-pinned clone-mode image - #28

Merged
CMGS merged 2 commits into
mainfrom
clone-digest
Sep 28, 2026
Merged

CMGS merged 2 commits into
mainfrom
clone-digest

Conversation

@CMGS

@CMGS CMGS commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Bug

cloneImageError validates clone-mode images with cocoon-common's ociutil.IsRelativeRef, which rejected every repo@digest. A CocoonSet whose agent or clone toolbox is pinned by digest was refused at admission, before vk-cocoon, and no retry could fix it. Found in review of cocoonstack/vk-cocoon#118, which fixes the vk-cocoon side of digest clone sources.

Fix

  • Bump cocoon-common to the branch commit of ociutil: ParseRef and IsRelativeRef accept a repo@digest reference cocoon-common#37 (v0.3.7-0.20260928165838-565b61e948a2), where ParseRef splits repo@digest and IsRelativeRef accepts a lowercase repo with a sha256 / sha512 digest of the right length.
  • The rejection message now names both accepted forms; docs/validation.md states the grammar.
  • Still rejected: a malformed or short digest, a registry port, a tag and a digest together, uppercase repo characters.

Tests

  • accepts clone-mode digest image (agent) and accepts clone-mode toolbox digest image.
  • The existing ubuntu@sha256:deadbeef case stays a rejection, renamed to rejects clone-mode malformed digest image.

Order

cocoon-common#37 first, then re-pin this PR to the merge commit or tag, then merge. vk-cocoon#118 re-pins to the same commit.

Gates

make lint 0 issues on linux and darwin, make fmt-check clean, asl ./... clean on both GOOS, go test -race ./... green (GOWORK=off). Not run on hardware.

cloneImageError relied on cocoon-common's IsRelativeRef, which rejected every
repo@digest, so a CocoonSet agent or clone toolbox pinned by digest was refused
before it reached vk-cocoon and no retry could fix it. cocoon-common#37 teaches
ParseRef and IsRelativeRef the digest form; this bumps to it and says so in the
rejection message and docs/validation.md. Malformed digests, registry ports and
a tag with a digest stay rejected.
@CMGS
CMGS merged commit 741b9c5 into main Sep 28, 2026
4 checks passed
@CMGS
CMGS deleted the clone-digest branch September 28, 2026 17:39
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