Dependency component builder¶
When the solve selects a candidate that exists only at an approved source, the closure needs immutable bytes for it before a cell can mount it. The dependency component builder produces those bytes. It fetches exactly the artifacts the resolver selected, checks each against the digest the resolver pinned, seals them into one component, publishes the component to your registry, and returns signed evidence the resolver checks before using it. The resolver decides which component to build; the builder builds it. This page covers the request, each step, the archive format, the evidence and the refusals.
For what a built component means to a closure, see Closure-local dependency components.
From selection to published component¶
flowchart TB
RES["Closure dependency resolver<br/>build request"]
subgraph BLD["DEPENDENCY COMPONENT BUILDER"]
direction TB
AQ{{"Acquire each selected artifact<br/>digest equals the pinned digest"}}
SE{{"Seal one component<br/>component_digest"}}
INV[("Component inventory<br/>and materialization inventory")]
AR[("Archive<br/>xck.dependency_component_archive.v1")]
EV[("Evidence<br/>attested provenance digest")]
AQ --> SE --> INV --> AR --> EV
end
SRC[("Approved dependency sources")]
REG[("Your registry<br/>xck/dependency-components/")]
SIG["Node evidence signing key"]
RES --> AQ
SRC -->|"bytes"| AQ
AR ==>|"blob upload"| REG
EV <-->|"sign provenance digest"| SIG
EV -->|"re-admitted against<br/>the selection"| RES
The builder reads only from approved sources and writes only to your registry. The resolver checks the returned evidence against the candidate it selected before the component replaces that candidate in the snapshot, so a component that differs from the selection is refused before it enters the closure.
The request¶
The resolver builds the request from the selected candidate. Its fields and an example are on Closure-local dependency components. Two fields are closed sets:
component_kind python_distribution native_bundle executable_bundle image_bundle
construction_purpose reusable_block project_prepared project_system
A python_distribution built for project_system is refused, because every
closure carries that scope and a Python import there would have no declaring
block.
Acquisition¶
Each selected artifact is fetched under the access mode its source was approved with:
access_mode |
How the node fetches |
|---|---|
anonymous |
Without credentials |
dataplane_build_identity |
With authorization issued for the node's build workload; the locator must be an oci reference |
broker_grant |
With a grant from the node's credential broker for that source |
The bytes are hashed and must equal the artifact's pinned artifact_digest,
and the opened files must match the file inventory the fetch reported:
Sealing¶
The acquired artifacts become one component:
- Every artifact the request lists in
declared_dependency_artifact_idsmust have been acquired. - No file path may come from two artifacts.
component_digestis taken over the component kind, construction purpose, requirement, selected version, native surface, the artifacts and every file.
The digest covers the purpose, so the same bytes built for two purposes are two components with two digests, each selectable only by the scope it was built for.
The archive and its publication¶
The component is written as a deterministic tar archive,
xck.dependency_component_archive.v1:
.xck/component.json descriptor: format, component_digest, component_kind,
construction_purpose, materialization_inventory
root/<relative path> each file or symlink, with its recorded mode
Every entry has modification time 0 and owner 0:0, so the same component always
produces the same archive bytes and the same blob digest. The archive is
uploaded to <repository_root>/xck/dependency-components/<component digest hex>
with media type application/vnd.xratu.xck.dependency-component.v1+tar, and a
blob already present is left in place. See
Registry adapter runtime.
The evidence¶
The builder returns, as xck-dp-dependency-component-builder version 1.0.0:
builder_id, builder_version
component_digest, component_kind, construction_purpose
requirement_spec, selected_version
component_inventory, component_inventory_digest
materialization_inventory, materialization_inventory_digest
component_artifact the published immutable runtime artifact
provenance_digest
attestation the node's signature over provenance_digest
An attestation over any digest other than provenance_digest is refused. The
resolver then admits the evidence against its selection, adds the component's
inventory to the closure's inventories, and records it in the snapshot
transition as a constructed component. At materialization, this artifact is
authorized by that signed transition. See
Digest and signature verification.
When a build is refused¶
| Code | Condition |
|---|---|
dependency_component_build_request_refused |
The request fails admission, or a Python distribution is requested for project_system |
dependency_component_acquisition_refused |
A fetch returned no bytes, bytes under another digest, or files that differ from its inventory |
dependency_component_closure_incomplete |
A declared dependency artifact was not acquired, or two artifacts provide one path |
dependency_component_inventory_refused |
The component's surfaces cannot be inventoried |
dependency_component_publication_refused |
The archive cannot be built or uploaded |
dependency_component_attestation_refused |
The attestation is missing or signs another digest |