Skip to content

Cross-plane constants and generated bindings

The node branches on the reason code the kernel sends, and the kernel admits only the contract versions the node produces. Every value the kernel shares with another plane comes from one definition in the cross-plane contracts, and the kernel's copy is generated from that definition when the kernel is built. A reusable capability block's language bindings are generated the same way, from its neutral interface schema. This page covers what the kernel generates, from which definitions, and what that guarantees across the boundary.

One definition, generated on both sides

flowchart TB
  subgraph CON["CROSS-PLANE CONTRACTS"]
    direction TB
    PROTO[("Control protocol definition<br/>kernel.grpc_control.v1")]
    VOC[("Control-lane vocabulary<br/>kernel.control_lane_vocabulary.v1")]
    FIX[("Shared record definitions<br/>the version of every shared record")]
  end
  subgraph NODE["DATA PLANE NODE"]
    direction TB
    DPS["xratud<br/>generated client and vocabulary"]
  end
  subgraph XCK["KERNEL"]
    direction TB
    KB["Generated binding<br/>messages, service, constants"]
    CAPS["Lane endpoints and admission<br/>read the binding"]
  end
  PROTO -->|"generated"| DPS
  VOC -->|"read"| DPS
  PROTO -->|"generated at build"| KB
  VOC -->|"generated at build"| KB
  FIX -->|"generated at build"| KB
  KB --> CAPS
  DPS <-->|"operator lane and return lane"| CAPS

Both xratud and the kernel's Generated binding come from the same three stores in CROSS-PLANE CONTRACTS. Lane endpoints and admission read every shared version, command name and reason code from the binding, so the two ends of the operator lane and the return lane compare values that came from one source.

What the kernel generates

Definition Contract version What it fixes in the kernel
Control protocol kernel.grpc_control.v1 The operator lane's messages and service
Control-lane vocabulary kernel.control_lane_vocabulary.v1 Operator commands, rejection reasons, ownership failures, ack rejection states, envelope categories, fault reasons, diagnostics operations
Runtime launch xck.kernel_runtime_launch.v1 The kernel's startup: runtime profile, ownership lease and fence, return context
Assignment receipts kernel.assignment_admission_receipt.v2, kernel.assignment_terminal_receipt.v1 The receipts the kernel returns for a handoff
Startup evidence kernel.startup_evidence.v1 The evidence the kernel emits as it starts
Verified runtime closure view xck.verified_runtime_closure_view.v1 The closure the kernel verifies before a cell starts
Executable surface index capsule.executable_surface_index.v1 The callable surface of a capsule
Cell reuse key cell.reuse_key.v1 The whole-key identity a cell is reused under
Accelerator foundation profile xck.accelerator_foundation_profile.v1 An accelerator foundation's user-space ABI, device classes and minimum host driver
Containment profile cell.containment_profile.v1 The named containment a cell runs under
Compiled interface xci.compiled_reusable_capability_block_interface.v3 The compiled interface a capsule exports, including the required logical-result byte bound

What generation guarantees

One value at both ends. A reason such as stale_fence is the same string in the kernel that emits it and the node that branches on it.

The version travels on the record. Every shared record carries its contract_version, and the receiving side checks it by equality before reading anything else. A handoff, a closure view or a receipt with a different version is refused.

A version change moves every side together. A new contract version is a hardcut: the field is required, and every producer and consumer changes with it in the same change. See Contract versioning and hardcut rules.

Generated bindings for block interfaces

A reusable capability block's callable surface is defined once, in its language-neutral interface schema, compiled from XCI. The Rust and Python bindings, the capsule-local adapter dispatch and the value codecs are all generated from that compiled interface, so every language that calls the block, and the kernel that dispatches it, read the same interface names, ordinals and field identifiers. The neutral schema is the cross-language source of truth. See Generated bindings.