Skip to content

The correlation tuple

Five identifiers travel with everything a run produces. This page is where each one is minted, which document carries it on each lane, and what to query on each surface when you are joining records during an incident.

For what the tuple is and what it is used for, see The correlation tuple in Concepts.

Where each field enters the system

Field Minted by Enters at
workspace_uuid Control plane Scope resolution, before the request is made
run_id Control plane Run creation
assignment_id Control plane Assignment authoring, one per dispatched unit
node_id The installation that produced the node label Node registration
trace_id Control plane Created once with the immutable correlation context

The trace context is propagated rather than regenerated at each boundary, so the identifier on a kernel evidence record is the identifier the control plane issued. A plane that received a tuple does not mint a replacement for any part of it.

Which document carries it on each lane

The tuple's lanes

flowchart LR
  subgraph CP["CONTROL PLANE"]
    direction TB
    MINT{{"Mints run_id, assignment_id,<br/>trace_id"}}
    FEED[("Events feed")]
  end
  subgraph YI["YOUR INFRASTRUCTURE"]
    direction TB
    N["xratud"]
    K["Kernel"]
    B[("Bucket<br/>payload bodies")]
  end
  MINT -->|"assignment block"| N
  N -->|"runtime.* commands"| K
  K -->|"return envelope fields"| N
  N -->|"events feed record"| FEED
  N -->|"body"| B
  N -->|"payload reference"| FEED

The control-plane identifiers are minted in one place, the hexagon, and node_id comes from the node's registration. Every other box receives the tuple rather than producing it. Each edge is labelled with the document that carries it, which is the document to query when a record on that edge is missing its correlation.

On the assignment. The assignment block carries workspace_uuid, run_id, node_id, assignment_id and trace_id alongside attempt, generation and idempotency_key.

On the return lane. All five are required fields of the envelope, and an envelope is built from a validated return context, so one that is missing a field is not produced rather than being emitted with an empty value. The envelope also carries seq, prev_digest and digest:

seq           monotonic and positive within the lane
prev_digest   the digest of the preceding envelope
digest        computed over this envelope's own fields

A prev_digest that does not match the previous envelope's digest identifies a gap at a specific sequence, so a missing envelope is detectable rather than merely absent.

On the events feed. The feed's required keys are fixed for every producer, and the data plane, the kernel and the control plane all produce into it:

run_id, seq, node_id, event_type, payload, created_at

On a payload reference. A body in your bucket is attributed by its reference, which carries the correlation fields together with the bucket URI, the provider, the size and the content digest. That is how a body is attributable without the control plane reading it.

What to query on each surface

Surface Query by Returns
Assignment ledger node_id, or run_id What the node was told to do
Run history and status run_id Progression and terminal state
Events feed run_id with seq Ordered events across all three producers
Audit and governance records workspace_uuid Decisions in force and what changed
Return lane continuity assignment_id with seq Which envelopes the node acknowledged
Object storage The prefix built from the tuple The body behind a reference

An incident usually starts with one field and needs another. A trace_id from a report locates the run; the run_id locates the assignments; an assignment_id locates the lane and the sequence where delivery stopped.

Which try produced a record

Three more identifiers travel with a run and answer a different question. The tuple says where a record belongs; these say which try produced it.

Field Distinguishes
attempt One try of an assignment from the next
generation The version of the desired state a node converged toward
fence_token The ownership epoch the node held while acting

A duplicate-looking pair of records with the same run_id is separated by attempt, and a report from a displaced owner is identified by its fence_token. See Control plane as source of truth for how those values are read back.