Skip to content

Cell reuse keys

A cell reuse key is the complete identity a running cell must match before it can take new work. A warm cell is reused only when its key equals the key the new work requires, field for field. Any difference starts a new cell.

The key holds identities and digests only. Secret values stay out of it, and the import-time bindings a cell was prepared with are represented by the digest of their identities.

The fields

Field Identifies
runtime_closure_digest The resolved runtime closure
foundation_digest The foundation
capsule_digest The execution capsule
provider_digest The runtime provider
containment_profile ProductionProcessCell or DevelopmentProcessCell
tenant_partition The tenant the cell serves
trust_partition The trust domain the cell runs in
import_binding_set_digest The import-time bindings, by identity
cell_environment_view_digest The filesystem and Python import view
native_loader_view_digest The native loader view
filesystem_profile The filesystem profile the cell was prepared under, such as readonly-closure
network_profile The network profile, such as egress-allowlist
hardware_profile The hardware and resource profile, such as cpu-standard
interface_hash The block's compiled interface
capability_abi_version The kernel capability ABI version
value_plane_version The value plane version

Every field is required. A key with an empty field is refused:

network_profile is required; an absent part of the key is a blind spot

Example

{
  "contract_version": "cell.reuse_key.v1",
  "runtime_closure_digest": "sha256:1111…",
  "foundation_digest": "sha256:2222…",
  "capsule_digest": "sha256:3333…",
  "provider_digest": "sha256:4444…",
  "containment_profile": "ProductionProcessCell",
  "tenant_partition": "tenant-acme",
  "trust_partition": "trust-prod",
  "import_binding_set_digest": "sha256:5555…",
  "cell_environment_view_digest": "sha256:6666…",
  "native_loader_view_digest": "sha256:7777…",
  "filesystem_profile": "readonly-closure",
  "network_profile": "egress-allowlist",
  "hardware_profile": "cpu-standard",
  "interface_hash": "xci-sha256:8888…",
  "capability_abi_version": "xck.capability_abi.v1",
  "value_plane_version": "xck.value.v1"
}

Reuse compares the SHA-256 of the canonical key. Two keys that differ in any field produce different digests, and the work goes to a new cell.

What starts a new cell

Because the closure digest is in the key, anything that changes the closure starts new cells: a new capsule, a new foundation, a runtime.xratu change that reaches the closure, a different provider or selected component. See Resolved runtime closures for which change reaches which closure field.

The fields outside the closure start new cells the same way:

  1. Tenant or trust partition. Work for another tenant, or under another trust domain, runs in its own cell.
  2. Import-time bindings. A secret rotation or a changed import binding produces a new import_binding_set_digest, and cells prepared with the old one stop taking work.
  3. Filesystem or network profile. A cell prepared under one profile serves that profile.
  4. Capability ABI or value plane version. A cell serves the wire versions it was prepared for.

Node placement stays out of the key. A scheduler may prefer a node that already holds the closure's artifacts, and the closure that runs is the same on any node.

Reuse and upgrade

A new key starts a new cell. The existing cell keeps running its own key's work until it is drained, revoked or its epoch ends. A cell is replaced by starting another one, and its closure, views and bindings stay as they started. See Closure reconciliation and upgrade.

Warm cell lifecycle, idle expiry and eviction are covered in Architecture: Cell reuse and warm start.