Closure dependency resolution¶
A reusable capability block declares what it needs, the foundation offers what it has, and approved sources offer the rest. Closure resolution is the stage where a node turns those into one exact closure: a binding for every requirement, a selected runtime provider, and the two views a cell is built from. The solve is deterministic over inputs the control plane sealed, so the same inputs produce the same closure on any node. This page covers what the stage reads, the order the resolver works in, what it returns, and its refusals.
For the binding and closure fields a reader meets in output, see Resolved runtime closures and Candidate dispositions and conflict.
What the stage reads¶
The stage input is one resolution_assignment,
xck.runtime_closure_resolution_assignment.v1, whose closure_inputs hold the
documents the control plane admitted from its six input owners, sealed under
closure_inputs_digest. The list of owners and documents is on
Runtime closure admission and reconciliation.
The resolver identifies itself in its output:
resolver xck-dp-closure-dependency-resolver
version 1.0.0
algorithm xck-closure-dependency-backtracking-v1
The order of work¶
flowchart TB
A["Admit the request<br/>and evaluate declared requirements"]
C["Collect candidates<br/>foundation, prepared, snapshot"]
T{{"Solvable with the snapshot's<br/>candidates and source candidates?"}}
O["Observe approved sources<br/>and merge their candidates"]
T2{{"Solvable now?"}}
B["Build each selected source<br/>candidate into a component"]
R["Reseal the candidate snapshot<br/>record the transition"]
F["Filter by target, then by<br/>native compatibility"]
S["Exact graph solve<br/>one candidate per requirement"]
P["Select the runtime provider"]
V["Build bindings, component mounts,<br/>environment view, loader view"]
CL["Construct and re-admit<br/>the closure candidate"]
E["Sign the resolution evidence"]
X["closure_dependency_unresolved<br/>or _ambiguous"]
A --> C --> T
T -->|"yes"| B
T -->|"no"| O --> T2
T2 -->|"yes"| B
T2 -->|"no, solve without<br/>new components"| F
B --> R --> F
F --> S
S -.-> X
S --> P --> V --> CL --> E
Sources are contacted only when the candidates already in the sealed snapshot cannot satisfy every requirement, and a component is built only for a source candidate the solve selected. Every component built this way is recorded in the snapshot transition, from the snapshot the control plane sealed to the one the solve used, and the transition's digest is in the evidence. See Dependency component builder.
The solve¶
Target filter. Each candidate is checked against the resolver
configuration's target: platform, Python ABI, and the PEP 508 marker
environment (implementation_name, platform_machine, python_version,
sys_platform and the other standard fields). A candidate for another target is
excluded with a disposition.
Native filter. A candidate's native requirements are checked against the
foundation's native objects. Constraints take the form glibc>=, python_abi==
or platform==.
Exact solve. The resolver searches for one candidate per requirement such that every requirement in the graph is satisfied. When no complete solution exists, it refuses with the requirements that failed:
When two candidates are equally preferred for one requirement, it refuses rather than choose:
The preference order among sources is on Six dependency sources.
Provider. The runtime provider is selected from the approved provider artifacts, and exactly one approved artifact must carry the selected provider's digest.
What the stage returns¶
The result has five parts:
| Part | Holds |
|---|---|
dependency_candidate_snapshot_transition |
The sealed snapshot, the final snapshot, and every component constructed between them |
dependency_resolution_candidate |
Every binding, with its selected candidate and the disposition of every other candidate |
cell_environment_view |
What a cell mounts and imports |
native_loader_view |
How native objects resolve inside the cell |
resolved_runtime_closure |
The closure, with its closure_digest |
The closure is validated once more against the foundation policy and intent, the manifests, the views, the approved providers and the containment and hardware profiles before it is returned.
The evidence, xck.runtime_closure_resolution_evidence.v1, is produced by
data_plane_runtime_closure_resolver and binds the result to its inputs:
assignment_id, project_uuid, fence, closure_inputs_digest, resolver
foundation_policy_digest, foundation_intent_digest, foundation_digest
capsule_digest, approved_runtime_provider_artifacts_digest
dependency_candidate_snapshot_digest the final snapshot
dependency_candidate_snapshot_transition_digest
dependency_resolution_candidate_digest
cell_environment_view_digest, native_loader_view_digest
candidate_closure_digest
candidate_accounting one row per considered candidate:
requirement, candidate, component digest,
source, disposition, reason code
excluded_foundation_component_digests
workload_identity, provenance_digest
evidence_digest, signature
The control plane admits the closure from this evidence and projects the closure's artifact set, which the materialization stage then fetches. See Runtime closure materialization and reconciliation.
When resolution is refused¶
| Code | Condition |
|---|---|
RUNTIME_CLOSURE_ASSIGNMENT_REFUSED |
The resolution assignment fails its contract |
closure_dependency_request_refused |
The closure inputs fail admission, or a component must be built and the node has no build boundary |
dependency_source_observation_refused |
A source observation disagrees with the approved sources or the requirement |
closure_dependency_unresolved |
No complete solution exists |
closure_dependency_ambiguous |
Two candidates are equally preferred for one requirement |
runtime_provider_selection_refused |
No single approved provider artifact matches the selected provider |
closure_dependency_candidate_refused |
The resolution candidate fails its contract |
runtime_closure_construction_refused |
The closure disagrees with its policy, intent, manifests, views or profiles |
RUNTIME_CLOSURE_EVIDENCE_REFUSED |
The evidence the node built disagrees with the assignment or the result |