Publish and pull contracts¶
Two contracts bound what a build may read and what it may write. The pull contract decides which inputs are allowed and how a tag becomes a digest; the publish contract decides what must be true before a push counts. Both are resolved by the control plane and enforced where the bytes are.
Pull: what a build may read¶
An input is pulled for a declared purpose, and the purposes are a closed set:
base_image the foundation the build starts from
build_tool_image tooling the build needs
runtime_image a runtime being composed
engine_image a model engine
auxiliary_image anything else the build declares
Declaring the purpose is what allows a policy to permit one class of input without permitting all of them.
Tags resolve to digests before use¶
The default resolution policy turns every tag into a digest and refuses to proceed where one cannot be resolved:
| Setting | Default | Effect |
|---|---|---|
resolve_tags_to_digest |
true | A tag input is resolved to a digest before the build uses it |
fail_on_unresolved_tags |
true | A tag that does not resolve stops the build |
allow_tag_inputs |
true | A tag may be supplied as an input at all |
allow_mirror_fallback |
false | A mirror is used only when explicitly permitted |
A mirror reference and a fallback reference can be configured, and neither is used unless fallback is allowed. Silent substitution of a different source is therefore an explicit setting rather than a default behaviour.
The consequence is that a build records what it actually consumed. A tag that moves after resolution does not change the build, because the build was given the digest.
Publish: what counts as a successful push¶
The publish contract's expected behaviour is fixed:
require_digest_from_builder_result true
require_digest_for_alias_promotion true
allow_alias_before_immutable_success false
Read together, they describe one rule: the immutable artifact exists first, and only then may a moving name point at it.
| Rule | Consequence |
|---|---|
| A digest must come from the builder result | A build that reports no digest produces nothing the control plane will pin |
| A digest is required to promote an alias | An alias cannot be pointed at something unidentified |
| No alias before the immutable push succeeds | A latest-style name never points at a failed or partial build |
Registry hosts can be allowed or denied by the contract, so a build can be constrained to publish only where the tenant intends.
Where each contract is enforced¶
flowchart LR
subgraph CP["CONTROL PLANE"]
direction TB
PC[("Pull contract")]
PB[("Publish contract")]
PIN[("Pinned digest,<br/>then alias")]
end
subgraph YI["YOUR INFRASTRUCTURE"]
direction LR
subgraph IN["INPUTS"]
direction TB
SRC[("Source registries<br/>tags")]
end
N["xratud<br/>build"]
subgraph OUT["OUTPUTS"]
direction TB
IMM[("Immutable artifact<br/>by digest")]
end
SRC -->|"resolved to digests"| N
N ==>|"push"| IMM
end
PC -.->|"governs"| SRC
PB -.->|"governs"| IMM
N -->|"reported digest"| PIN
The pull contract governs the left edge of the build and the publish contract the right edge, and both are enforced by the node, which holds the registry credentials. An alias is promoted only after the digest it names is pinned.
The control plane states the rule and the node performs the operation, because the node is the side that holds registry credentials. See The tenant byte rule.
What the node must return¶
A push is not complete until the builder reports in the shape the handshake requires. See Builder publish handshake.