Reconciliation and pull-based execution¶
Work reaches a node because the node asked for it. The control plane records what should exist and waits; each node registers, heartbeats, pulls the assignments scoped to it, acknowledges them, and reports what happened.
sequenceDiagram
participant N as Node (xratud)
participant CP as Control plane
N->>CP: register, then heartbeat
N->>CP: pull assignments for this node
CP-->>N: assignment envelope
N->>N: reconcile local state toward it
N->>CP: acknowledge, progress, complete
N->>CP: report status, evidence references
The direction is fixed¶
Every exchange is node-initiated, so a node needs only outbound reachability to the control-plane endpoint. The node carries registration, heartbeat, assignment pull, acknowledgement, progress, completion, status and evidence references to the control plane, and the control plane carries back the response to a pull the node made.
A node that goes quiet stops receiving work and its lease goes stale. Nothing is pushed at it to recover, and it resumes by pulling again.
Reconciliation toward a desired state¶
An assignment describes a desired state rather than a sequence of steps. The node compares it against what it currently runs and closes the difference, which makes a repeated assignment safe: a node that has already reached the described state has nothing left to do.
| Property | Consequence |
|---|---|
| Desired state is described, not scripted | The same assignment applied twice converges to the same result |
| The node owns the local sequence | A restarted node resumes from observed state rather than from a step counter |
| Acknowledgement is explicit | The control plane distinguishes delivered from applied |
| Reporting survives an outage | A node that loses connectivity holds its reports in its outbox and delivers them when the link returns |
Leases and fencing¶
One node holds a runtime at a time. Ownership is a lease with a fence epoch, and a superseded owner is rejected by the kernel on ownership grounds rather than being allowed to act on stale belief.
runtime_instance_id which runtime
owner_dp_node_id which node holds it
lease_id the current grant
fence_epoch monotonic, raised on handover
lease_expires_at when the grant lapses
A displaced owner's calls fail with stale_fence. See
Trust bundles and revisions
for why its identity is retained briefly through a handover.
The kernel link is dialled by the node¶
The pull relationship is between node and control plane. Between a node and the
kernels it owns, the node dials: it reconciles the project runtime, performs a
handshake, checks readiness, and sends runtime.* operator commands on a
private control lane. Evidence returns on a durable stream the kernel pushes as
it appends.
CP <- pull --- DP assignments
DP -- dial -> kernel runtime.* operator commands
DP <- push -- kernel evidence and status, sequence-cursored
What pull-based execution gives a deployment¶
A node in your infrastructure needs no inbound exposure, so a hosted control plane governs nodes it cannot reach. A node that was unreachable for a period catches up by pulling rather than by replaying a queue someone else held for it. And a control plane that is restarted resumes from recorded state, because it was never holding the delivery in memory.
See Control plane as source of truth for what the control plane records, and Component topology for the links this shape produces.