Skip to content

Provider binary

The interpreter a cell runs is a published artifact with a digest, the same as the block it executes. The CPython provider ships as a separately published, immutable runtime-provider artifact: the provider executable, the exact CPython runtime it was built against, the standard library, and a measured description of where each lives. This page covers what the artifact contains, its runtime layout, how it is published and approved, and how a node verifies it before a cell launches it.

From build to launch

flowchart TB
  subgraph CP["CONTROL PLANE"]
    direction TB
    APP{{"Policy approves the publication<br/>and its provenance tuple"}}
    RES["Closure resolution selects the provider<br/>for a compatible foundation ABI"]
    APP --> RES
  end
  subgraph REL["PROVIDER RELEASE"]
    direction TB
    MAN{{"Release manifest<br/>binds archive, layout and provenance digests"}}
  end
  REG[("Registry<br/>digest-pinned OCI reference")]
  subgraph NODE["DATA PLANE NODE"]
    direction TB
    MAT["Fetch, verify blob digest,<br/>open in a private staging root"]
    REC{{"Recompute payload, executable,<br/>library, header and layout identities"}}
    CS[("Content store")]
    MAT --> REC --> CS
  end
  CELL["Cell: mounted read-only,<br/>launches bin/xck-cpython-provider"]
  APP -.->|"approves"| MAN
  MAN -->|"published"| REG
  RES -->|"selected provider digest"| MAT
  REG -->|"archive bytes"| MAT
  CS --> CELL

CONTROL PLANE decides which provider a closure uses: it approves a publication and its provenance, and closure resolution selects the approved provider for a compatible foundation ABI. The bytes come from Registry, and DATA PLANE NODE recomputes every identity from them before the content store holds the artifact.

What the artifact contains

One staging tree is measured to produce the artifact. It holds:

  • the provider executable, bin/xck-cpython-provider;
  • the exact CPython shared library and headers the executable was built against;
  • the sealed standard library;
  • the provider-owned module roots.

The release emits the deterministic provider archive, CpythonProviderRuntimeLayoutV1, CpythonProviderArtifactProvenanceV1, and a release manifest binding the archive, payload, layout and provenance digests. Inside the archive, xck/provider/runtime-layout.json and xck/provider/provenance.json are reserved paths.

The runtime layout

CpythonProviderRuntimeLayoutV1 states where CPython finds each part of itself, so initialisation supplies every path and infers none.

Field Holds
provider_kind cpython
python_abi The one CPython ABI this artifact binds
program_name_relative_path, home_relative_path Program name and home
executable_relative_path, base_executable_relative_path The executable and base executable
prefix_relative_path, base_prefix_relative_path Prefix and base prefix
exec_prefix_relative_path, base_exec_prefix_relative_path Exec prefix and base exec prefix
stdlib_relative_path, platlibdir Standard library location and platform library directory
ordered_provider_module_root_ids The provider's own module roots, in order
provider_runtime_layout_digest Digest of this layout

Every path is a normalised path relative to the provider artifact. The ordered module search path of a cell comes from its cell environment view, and the provider root ids in the two documents agree exactly. See Cell environment views.

Publication and approval

The measured archive is uploaded under a digest-pinned OCI reference. Control-plane policy approves that publication together with its exact provenance tuple, and the approval binds the layout digest. Closure resolution then selects the approved provider for a compatible foundation ABI. See Resolved runtime closure.

Verification on the node

The node fetches the selected archive, verifies its blob digest, opens it in a private staging root, and recomputes the payload, executable, library, header-tree and layout identities from the opened bytes before promoting it to the content store.

Condition Outcome
A layout path is absolute or traverses to a parent Refused
A payload file named by the layout is missing Refused
A supplied digest differs from the measured bytes Refused
A payload file occupies a reserved xck/provider/ path Refused

Launch

Cell lifecycle mounts the verified artifact read-only and launches its measured executable. The provider opens the sealed runtime layout itself, and the monitor drives the process through RuntimeProviderProtocolV1. Approval and opening make the artifact runnable; the authority to run anything comes from the grant and the cell. See The CPython provider.

One ABI per artifact

Each provider artifact binds one exact CPython ABI. Supporting another CPython ABI means publishing and approving another provider artifact, and closure resolution selects among the published ones. The interpreter observed in a cell is the same under any ambient Python variables, user-site content, current-directory modules or virtual-environment markers on the host.