Skip to main content
← Back to list
01Issue
BugOpenExtensionsPublicTeam
AssigneesNone

Relationships

#5189 push records a layer/config blob digest in pushResult.digest, not the image manifest (RepoDigest) -- image@<digest> fails to pull (manifest unknown)

Opened by kneel · 11/28/2026

Summary

The push method records a layer (or config) blob digest in pushResult.digest instead of the image's manifest digest (its RepoDigest). Pinning an image by that recorded digest -- image@<digest> -- then fails to pull: the registry returns manifest unknown, because a layer/config blob digest is not a pullable manifest reference.

Cause

push captures its digest by regex-scanning the push command's combined stdout+stderr and taking the FIRST sha256: token it finds:

  • runPush (models/_lib/operations.ts) does parseDigest(result.stdout + result.stderr).
  • parseDigest (models/_lib/runner.ts) is: const DIGEST_RE = /sha256:[a-f0-9]{64}/; then output.match(DIGEST_RE) -- i.e. it returns the FIRST sha256 substring anywhere in the output.
  • buildPushArgv runs a plain <binary> push <ref> (podman adds only --tls-verify, Apple Containers uses image push). There is no --digestfile, no post-push inspect, and no other manifest-digest source.

The order of sha256: tokens in push output is not the manifest. In particular, Podman's push progress writes layer/config blob lines FIRST (Copying blob sha256:<layer> ..., Copying config sha256:<config> ...) and only afterward writes the manifest. So the first regex match is a layer (or config) BLOB digest, not the manifest. The true pullable reference is the image's RepoDigest (the manifest digest), which this code never reads.

Note: the multi-platform-build path already avoids this -- runBuildxCommand prefers the buildx --metadata-file digest via readMetadataDigest(...) and falls back to parseDigest only if that is absent, with a comment that the metadata-file digest "is more reliable than the first sha256 in the build output." The plain push method has no equivalent manifest-digest source and still relies solely on parseDigest.

Reproduce (generic)

Using the Podman runtime and any OCI registry:

  1. build an image and push it. pushResult.digest is recorded as sha256:<X>.
  2. Inspect the pushed image. Its RootFS.Layers list contains sha256:<X> (so the recorded value is a layer blob), while its RepoDigests show a DIFFERENT value sha256:<M> (the manifest digest).
  3. pull image@sha256:<X> -> manifest unknown (a blob is not a manifest).
  4. pull image@sha256:<M> (the RepoDigest) -> succeeds.

Impact

Any downstream consumer that pins an image by the recorded digest -- e.g. a declarative container model that resolves image@{{ pushResult.digest }} via CEL -- gets an unpullable reference, and the apply hard-fails with manifest unknown. The recorded digest looks valid (well-formed sha256) but is not addressable as a manifest, so the failure shows up only at pull time.

Request

push should record the image MANIFEST digest (the RepoDigest -- the digest you would use for docker pull image@sha256:...) in pushResult.digest, not a layer/config blob digest. Concrete options:

  • Podman: pass --digestfile <file> and read the manifest digest it writes.
  • Docker: parse the explicit manifest line (<tag>: digest: sha256:<M> size: ...) rather than the first sha256 in the stream.
  • Any runtime: inspect the pushed image after push and read its RepoDigests.
  • Reuse the pattern already proven in multi-platform-build (a dedicated manifest-digest source rather than first-sha256 scanning).

If multiple manifest digests exist (a multi-arch index vs a platform manifest), record the one that is pullable as image@<digest>.

  • #4051 (same extension, push, and the same manifest unknown symptom, but a DISTINCT root cause: the Apple Containers runtime pushing an index whose child manifest becomes unaddressable on Forgejo). This report is about digest CAPTURE/parsing in pushResult.digest, not push topology.

Environment

  • Extension: @swamp/container-image 2026.10.28.1
  • Runtime where the first-sha256 is demonstrably a layer blob: Podman.
  • (CLI auto-redaction fills the remaining environment fields on submit.)

Upstream repository: https://github.com/swamp-club/swamp-extensions

Environment

  • Extension: @swamp/container-image@2026.10.28.1
  • swamp: 20261124.230941.0-sha.6a630211
  • OS: linux (x86_64)
  • Deno: 2.9.8
  • Shell: /bin/zsh
02Bog Flow
◉OPEN○TRIAGED○IN PROGRESS○SHIPPED

Open

11/28/2026, 5:28:13 PM

No activity in this phase yet.

03Sludge Pulse
kneel moved this from a private collective to public11/28/2026, 5:40:36 PM
Editable. Press Enter to edit.

system commented 11/28/2026, 5:28:13 PM

Classified automatically when this issue was filed.

  • Source: Extensions

If you feel this classification is incorrect, add a ripple to tell us so.

Sign in to post a ripple.