Assignment claim protocol¶
A node does not receive an assignment; it claims one. The claim is what turns an offered assignment into work this node owns, and it is the moment the fence and the lease are minted. This page is what a claim carries and what it produces.
What a claim carries¶
assignment_id, workspace_uuid, run_id, node_id, attempt
dataplane_registration_uuid which registration is claiming
lease_seconds how long the claim is requested for
now_epoch the claim instant
actor_id the identity behind the claim
assignment_kind, assignment_ref what is being claimed
payload the assignment content
dispatch_scope tenant_scope and dataplane_pool
The registration identifies the node, the scope identifies who it is allowed to work for, and the lease request states how long it intends to hold the work.
What the claim produces¶
flowchart LR
subgraph N["XRATUD"]
direction TB
NP[("Held payload<br/>with its fence")]
end
subgraph CP["CONTROL PLANE"]
direction TB
ADM{{"Scope admission<br/>shared mode"}}
subgraph LED["LEDGER RECORD"]
direction TB
L1["fence_token, new"]
L2["lease_expiry_at"]
L3["assignment_lifecycle_revision + 1"]
L4["control_epoch"]
end
PL[("Assignment payload<br/>ledger fields stamped")]
ADM --> LED
LED --> PL
end
N -->|"claim request"| ADM
PL -->|"returned"| NP
One claim writes two copies of the same four values: the ledger record the control plane checks against, and the payload the node holds. Every later report carries the node's copy, and the ledger compares it with its own.
The claim advances the assignment's lifecycle revision by one, mints a fresh fence token, sets the lease expiry, and records the control epoch. Those values are stamped into the payload the node receives, so the node holds the fence it must present on every later write.
One claim wins¶
The fence token is minted per claim. Two nodes claiming the same assignment produce two different tokens, and only the one recorded as active is accepted on a write. The loser is not told at claim time; it is refused the first time it tries to report, which is the moment the outcome matters.
This is why a handover needs no negotiation with the previous owner. Claiming supersedes, and the displaced node discovers it on its next write.
The attempt is part of the claim¶
A claim names the attempt it belongs to. A retried assignment is a new attempt rather than a reuse of the previous one, so records from two attempts of the same run stay distinguishable without comparing timestamps.
After the claim¶
The node verifies the envelope's digests and policy, reconciles toward the
described state, and reports progress against the fence it was given. The
assignment moves leased to running on its first progress report and to a
terminal state on completion. See
The assignment ledger for the transitions and
Reconciliation and pull-based execution
for what the node does with it.