Runtime assignment handoff¶
The kernel runs a reusable capability block only from a closure the control
plane admitted and the node materialized, and it needs proof of both before it
opens anything. The assignment handoff carries that proof. When the
materialization stage finishes, the node sends the project kernel one
xck.assignment_handoff.v2 document; the kernel checks that the admission, the
materialization and the handoff agree on every identity and on the fence, then
opens the closure's artifacts itself. This page covers how the handoff reaches
the kernel, what the kernel checks, and what a refusal means.
For how the node assembles the document and what each field holds, see The DP bundle.
Three authorities, one admission¶
flowchart TB
subgraph NODE["NODE"]
direction LR
HO[("Assignment handoff<br/>fence, closure digests,<br/>transfer profile,<br/>dispatch selection")]
end
subgraph AUTH["INDEPENDENT RECORDS THE KERNEL COMPARES"]
direction LR
AD[("Control plane admission<br/>admitted closure reference")]
ME[("Node materialization evidence")]
RC[("Resolved closure facts")]
TP[("Control plane transfer profile")]
end
subgraph KRN["PROJECT KERNEL"]
direction TB
CH{{"Authority chain<br/>identities and fence agree"}}
OP{{"Opened artifacts<br/>match their admitted content"}}
VV[("Verified closure view")]
CH --> OP --> VV
end
HO -->|"kernel control channel"| CH
AD --> CH
ME --> CH
RC --> CH
TP --> CH
The handoff is one of three records the kernel compares, so a handoff that names a different closure, fence or assignment from the admission and the materialization is refused before any artifact is opened.
How the handoff reaches the kernel¶
The handoff travels on the node's kernel control channel to the project kernel that owns the assignment's runtime, authenticated by the node's SPIFFE identity and the runtime's ownership fence. See The kernel bridge.
The kernel receives work from three sources over that one channel, each under its own authority:
| Operation | Sent by | Authorized by |
|---|---|---|
assignment.handoff |
The node, for an assignment it reconciled | The control plane's assignment |
runtime.* |
An operator acting on a running kernel | Operator identity |
run.* |
An application inside the kernel | The caller's grant |
A handoff therefore carries only the authority of the assignment the node pulled: it names work the control plane issued, under the fence it issued it with.
What the kernel checks first¶
- Identity. The assignment, admission and closure identities are present, in canonical digest form, and equal across the handoff, the admission and the materialization evidence.
- Fence. The handoff's fence equals the admission's and the
materialization's, and has a
fence_idand afence_epochabove 0. A handoff whose fence the control plane has since replaced names an authority that no longer exists, and is refused. - Dispatch. The
export_ordinalin the dispatch selection is admitted by the closure's executable surface. - Transfer profile. The profile digest and closed transfer vocabulary are
valid, and
hardware_profileequals the resolved closure fact the kernel independently opened.
Only then does the kernel open each artifact again and compare it with its admitted content. The records it builds from the result are described on Verified closure view.
When the kernel refuses¶
| Refusal | Condition |
|---|---|
<field> disagrees across independent closure authorities |
An identity or the fence differs between the handoff, the admission and the materialization |
required identity field <field> is blank |
An identity is missing |
identity field <field> is not in its canonical digest form |
A digest is malformed, or the fence is blank or at epoch 0 |
invocation export ordinal is not admitted by the executable surface |
The dispatch selection names an export the closure does not carry |
opened artifact <role> does not match its admitted content |
An artifact the kernel opened differs from what the node materialized |
opened artifact set does not exactly cover materialization evidence |
The kernel opened more or fewer artifacts than the evidence lists |
A fence refusal after a reassignment is the expected outcome for a slow node: the control plane has issued the work again under a new fence. Any other refusal means the node's materialization and the control plane's admission disagree; compare the materialization evidence the node reported with the admitted closure reference.