Skip to content

The status ack cursor

The status ack cursor is the node's record of which status envelopes the control plane has accepted. It is the outbound counterpart to the assignment cursor: where that position tracks what the node was told, this one tracks what the control plane has accepted from the node. Until an envelope is acknowledged, the node holds it and will send it again.

This page covers the state the node keeps, the watermark that moves through it, and the two ways an envelope leaves. The staging and dedupe contract is on Status ack runtime.

The state the node keeps

xratud_status_outbox_<dataplane_uuid>_<dataplane_instance_uuid>.spool/
  status_ack_state.json

The file sits inside the outbox spool directory, which belongs to one xratud process. It holds one record per staged envelope, the per-attempt sequence high-water marks, and the global enqueue sequence:

{
  "contract_version": "system.status_ack_runtime.state.v1",
  "last_global_enqueue_sequence": 4817,
  "assignment_attempt_max_sequence": { "asg-71c4...:1": 3 },
  "records": {
    "asg-71c4...:1:assignment_complete:3": {
      "dedupe_key": "asg-71c4...:1:assignment_complete:3",
      "assignment_id": "asg-71c4...",
      "attempt": 1,
      "stage": "assignment_complete",
      "sequence": 3,
      "global_enqueue_sequence": 4817,
      "acked": false,
      "ack_watermark": 0,
      "created_at_epoch": 1771459200.0,
      "updated_at_epoch": 1771459200.0
    }
  }
}

The watermark

flowchart TB
  subgraph STATE["STATUS ACK STATE"]
    direction TB
    STG["Staged<br/>acked false"]
    ACK["Acknowledged<br/>ack_watermark set to its enqueue sequence"]
    GONE["Compacted away"]
  end
  MUX["Telemetry mux"]
  CP["Control plane status ingest"]
  MUX -->|"stage"| STG
  STG -->|"send"| CP
  CP -->|"accepted"| ACK
  ACK -->|"at or under the watermark,<br/>or past its retention age"| GONE

An envelope enters Staged when the mux stages it and moves to Acknowledged when the control plane accepts it, taking the global enqueue sequence it was given as its ack_watermark. Compacted away is the only exit, and it needs the envelope acknowledged first.

The watermark is a position in the node's own enqueue order. Compaction passes a watermark and removes every acknowledged record at or under it, so one number clears a run of confirmed envelopes.

Five kinds of envelope

assignment_ack          the node has taken the assignment
assignment_progress     intermediate state
assignment_complete     terminal state
runtime_evidence        evidence projected from a project runtime
retry_safe_transport    a transport-level report the node may repeat freely

Each is staged under its own dedupe key, so the three assignment stages of one attempt are three separate confirmations.

The dedupe key

<assignment_id>:<attempt>:<stage>:<sequence>

A sequence of zero or less is filled in from the per-attempt high-water mark plus one, so an envelope staged without an explicit sequence takes the next one for that assignment and attempt. Staging the same key twice is refused with STATUS_OUTBOX_DEDUPE_REJECTED and the first record stands.

Per assignment and attempt the envelopes are ordered. The global enqueue sequence orders the node's whole stream, and the watermark is measured in it.

Limits and the backlog signal

Limit Value
Retention age for an acknowledged record 86,400 seconds
Pending records before the backlog is degraded 5,000
Pending records at which the logs channel is held back 2,000

Every operation returns the pending count and a degraded flag. Crossing 5,000 pending reports STATUS_OUTBOX_BACKLOG_DEGRADED, the signal that the node is producing status faster than the control plane confirms it. The performance governor acts on the same numbers by holding back telemetry and then stopping new work. See Scaling and the performance governor.

After a restart

The file belongs to the process. A new process stages nothing from the previous one, and the truth about those envelopes sits on the control plane's assignment ledger: an assignment whose terminal status never arrived has a lease that lapses and is dispatched again. See Resuming assignment processing after a crash.