Dependencies & Runtime Composition¶
How a reusable capability block states what it needs, where those bytes come from, and how two blocks with incompatible requirements run in one workflow.
Three places declare dependencies. The foundation is the base image a project's
cells run on, and it exports a signed system baseline. runtime.xratu changes
the project's shared set without rebuilding that image. @xratu declares every
Python requirement a block imports. The resolver turns all three into one
resolved runtime closure per block, and the kernel runs each closure in its own
cell.
flowchart TB
F["Foundation<br/>base image and exported baseline"] --> R
P["runtime.xratu<br/>project-wide apt, prepared Python"] --> R
B["@xratu<br/>this block's requirements"] --> R
R["Resolution<br/>one binding per requirement"] --> C["Resolved runtime closure<br/>admitted by the control plane"]
C --> M["Materialization<br/>data plane fetches and verifies"]
M --> V["Verified closure view<br/>kernel opens the artifacts itself"]
V --> Cell["Cell<br/>its own filesystem, import and loader views"]
In this section¶
How dependencies are declared
- Three declaration scopes covers who declares what, and what each declaration reaches.
- From code to cells covers two worked examples, from
@xratuandruntime.xratuthrough closures to the cells the kernel runs. - Where shared dependencies live covers
isolation as the default, the foundation for what is large and shared, and
runtime.xratufor changing that set without a rebuild. - Presence versus import authority covers the rule that only a block's own declaration grants an import.
- Dependency and environment declaration
covers the
@xratudecorator and its fields. - Dependency declaration covers how a class declaration reaches the closure and the cell.
- Requirements are declared per block covers why each block's requirements stay its own.
- Secret binding declaration covers the
@xratu_authdecorator. - Auth binding sources and delivery covers where a declared secret key is bound and how it reaches the block.
- Undeclared dependency covers the refusal and how to clear it.
The runtime foundation
- Runtime foundation covers the base image and the signed record of what it contains.
- Rootfs and the component store covers the two surfaces a foundation carries and what each reaches.
- Exported system baseline covers the native surface every cell receives.
- Foundation identity and the foundation digest covers what the digest binds and what a new one changes.
- Accelerator foundation profiles covers foundations that carry accelerator user-space components.
- Foundation inventory, provenance, and SBOM covers the evidence a foundation is signed with.
- Foundation resolution and admission covers how a registry reference becomes a sealed digest.
Project-wide declaration
- Project dependency document covers
the two lists in
runtime.xratu. - Project-wide system availability covers
aptand how its bindings reach every closure. - Preparing a shared Python component
covers
requirementsand version convergence. - Changing shared dependencies covers each change and what it re-runs.
- What project authoring leaves to resolution covers the decisions the resolver makes after authoring.
Resolution
- Resolved dependency binding covers the record of one requirement's selection.
- Six dependency sources covers where selected bytes may come from.
- Requirement scope and binding source covers the two fields and why each answers a different question.
- Candidate dispositions and conflict covers how every considered candidate is recorded.
- Approved dependency sources covers the indexes and registries the resolver may read.
- Closure-local dependency components covers components built for one closure.
- Who resolves and who admits covers the data plane's solve and the control plane's admission.
The resolved closure
- Resolved runtime closures covers what a closure binds and what changes its digest.
- Closure artifact sets and materialization covers the blobs a node fetches, the content store, and the evidence it signs.
- Verified closure view covers the kernel's
own check, and reading it with
xratu kernel status. - Closure reconciliation and upgrade covers the three stages, fences, and how a new closure replaces a running one.
Isolation in the cell
- Cells covers the unit a closure runs in.
- Cell environment view covers the filesystem and Python import view.
- Native loader view covers the native libraries and executables a cell can load.
- Mount scopes and root scopes covers how each mount and root is attributed to its source.
- Cell reuse keys covers when a cell is reused and when a new one starts.
- Version coexistence covers incompatible libraries in one workflow.
What the rest of the documentation assumes¶
A block declares every Python import. Presence in the foundation or in a
prepared component makes bytes available to select; the block's own @xratu
declaration grants the import.
The foundation is the shared base image. Large shared dependencies live
there, and runtime.xratu changes the shared set without rebuilding it.
Everything is resolved before the cell starts. A closure names every selected component, and every package a cell imports was built and verified before the cell started.
A closure is immutable. A change produces a new closure digest and new cells, and running cells keep their closure until they are drained.