Repository navigation
feat(bundle): a registry image with its build context beside it, and bundle init --image-ref - #405
Open
earakely-scale wants to merge 2 commits into
Open
earakely-scale wants to merge 2 commits into
earakely-scale wants to merge 2 commits into
Conversation
…bundle init --image-ref
An image key can be `{ ref = "<registry>/<repo>:<tag>@sha256:…", dockerfile = "Dockerfile" }`,
and an image folder can hold a Dockerfile beside its ref. A run pulls the image by its digest and
never builds it; the context is kept for reading or rebuilding, which a deploy does only when it
can't pull. put_ref given a context and no digest pins through the registry and records name and
digest apart, as a published image does; the ledger covers the context's files.
`agent-env bundle init --image-ref ID=REF` (image_refs= on import_task / import_eval) writes the
stored image ID as that digest-pinned registry image with its pruned context beside it, skipping
version pinning, and refuses a ref that isn't pinned or names no image the import writes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…efuse what can't be written - A Dockerfile an image given a ref shares with another image is no longer pinned to the other image's versions, since a deploy that can't pull the ref'd image rebuilds it from that file. - A context in a store this config can't read no longer aborts the import: its download says why, and an image given a ref is written as the ref alone. - A given ref must pin a whole sha256 digest (64 hex digits). - The README gives the build paragraph only when an image was written from its context, and the pulled one whenever an image is pulled, ref-only ones included. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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
A bundle can name an image in a registry and keep its build context beside it:
An image folder can also hold a Dockerfile beside the
refin itsartifact.toml, which it used to refuse. A run pulls the image by its digest and never builds it. The context is there to read or rebuild, and a deploy builds from it only when it can't pull the image, as it already does for a published agent image.agent-env bundle initcan write images this way.--image-ref ID=REF(orimage_refs=onimport_taskandimport_eval) writes the stored imageIDas the registry imageREF, with the part of its stored context its Dockerfile reads beside it.The point is delivering a bundle the way Harbor is delivered: the export pushes each image to a private registry the recipient is granted, and the bundle names it by digest.
How
put_refwith a context but no digest now pins through the registry, then records the name and the digest apart, the shape a published image has. Existing callers all pass a digest, so they're unchanged.Testing
echo-mcpexample and a localregistry:2standing in for the delivery registry:bundle init --image-ref.agent-env runfrom an empty state root pulled the image by its digest, built nothing, and the verifier passed.🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge; all four previous findings are addressed.Summary
Adds registry-backed bundle images with optional build contexts and
bundle init --image-ref.bundle initcan write stored images as digest-pinned registry references.Diagram
%%{init: {'theme': 'neutral'}}%% flowchart LR A[Stored image] --> B{Supplied image ref?} B -->|Yes| C[Write digest-pinned ref] C --> D{Context writable?} D -->|Yes| E[Keep context beside ref] D -->|No| F[Keep ref alone] E --> G[Run uses registry image] F --> G B -->|No| H[Existing import behavior]Reviews (2) · Last reviewed commit: "fix(bundle): leave a Dockerfile a pulled..." · Reviewed by Greptile