Execution capsules¶
An execution capsule is the immutable executable artifact for one reusable capability block, produced when the block is baked and published. It carries the block's code, its generated adapter, its interface and its file tree under one digest. A capsule is one constituent of a resolved runtime closure, alongside the Runtime Foundation, the runtime provider and the selected dependency components. This page covers what a capsule carries, how a project selects capsules, and how a node opens one before a cell can mount it.
Where a capsule sits¶
flowchart TB
subgraph CP["CONTROL PLANE"]
direction TB
CAT[("Project runtime-artifact catalog<br/>every selected capsule publication")]
end
subgraph REG["YOUR ARTIFACT REGISTRY"]
direction TB
ARC[("Capsule archive<br/>digest-pinned")]
end
subgraph NODE["DATA PLANE NODE"]
direction TB
STG["Private staging root"]
CS[("Node content store<br/>read-only tree")]
STG -->|"atomic promotion"| CS
end CLO[("Resolved runtime closure<br/>one capsule, the Runtime Foundation,<br/>a runtime provider, dependency components")]
CAT -->|"selects the exact archive"| ARC
ARC -->|"fetch, verify, extract"| STG
CS -->|"the capsule's read-only tree"| CLO
A project release may select several reusable capability blocks. The project's runtime-artifact catalog, owned by the control plane, holds every selected capsule publication. Each resolved closure selects exactly one of those capsules and proves it belongs to the selected package release. See Resolved runtime closure.
What a capsule carries¶
A capsule holds the block's code, the adapter that dispatches by ordinal, the compiled interface with its canonical hash, the executable surface index, the block's dependency intent, provenance, and the immutable digest over its file tree. See Capsule contents.
Publication authenticates the capsule identity, the archive blob digest, the manifest, the executable surface, the provenance and the file-tree digest. Foundation selection, dependency resolution and live state belong to the closure and the cell.
Opening a capsule on the node¶
Authenticating a publication and opening its bytes are separate operations. To open a capsule, the node:
- fetches the exact digest-pinned archive the project catalog selected;
- verifies the digest of the fetched blob;
- extracts normalised regular files and directories into a private staging root, under explicit bounds on file count and expanded size;
- measures every opened file and compares the complete tree with the signed immutable file-tree digest;
- promotes the read-only tree atomically into the node content store.
Extraction refuses an archive that contains any of the following:
| Archive content | Refused as |
|---|---|
| A path that leaves the staging root | Traversal |
| A symbolic or hard link | Link |
| A device, socket or other special file | Special file |
| The same path twice | Duplicate path |
| Entries that conflict as file and directory | Conflicting topology |
A tree that fails the digest comparison in step 4 is never promoted, and the closure that selected it fails materialization. See Capsule publication verification.
The capsule archive has its own format contract, distinct from the dependency-component archive and the runtime-provider archive, and each is opened by its own opener.