Skip to content

Recovery boundaries

A node coming back has partial state, a peer that may have moved on, and work that may or may not have finished. Every recovery path in the data plane holds to the same set of boundaries, and each one resolves those uncertainties from evidence a peer holds.

This page lists the boundaries, the mechanism that holds each one, and the condition the node reports when a boundary is reached.

The boundaries

Boundary Held by Reported as
A position advances only on the peer's evidence The acknowledgement rules and the watch recovery decision gap, regression, post_terminal, or a resync reason code
A position the node cannot prove is restored from the control plane The cursor's digest, stream key and identity binding checks ASSIGNMENT_CURSOR_CORRUPTION_DETECTED and a resync
Only the current owner acts on a runtime The session's owner, lease and fence epoch checks runtime_session_non_owner, runtime_session_stale_lease, runtime_session_stale_fence
A stale fence writes nothing The control plane's fence check on every mutation A fail-closed refusal with no state change
A refusal is final for that attempt The reconnect path, which retries failures and stops on refusals The refusal state itself
A reconnect keeps its identity and fence The reconnect plan's handshake step A handshake refusal
Claims stop when identity freshness is unknown The runtime identity state machine degraded_revocation_freshness_unknown, then quarantined
Local storage stays within its budget The spool budgets, checked before every append A refused append and the failure of the report behind it
Cleanup waits for evidence The jobs garbage collector's preconditions jobs_garbage_collector_evidence_not_persisted and its siblings
Application execution stays in the kernel The refused run assignment kinds on the operator lane assignment kinds cannot carry kernel-local application execution

Where each boundary sits

flowchart TB
  subgraph CP["CONTROL PLANE"]
    direction TB
    FENCE{{"Fence check<br/>on every mutation"}}
    RESYNC["Snapshot and delta resync"]
  end
  subgraph NODE["DATA PLANE NODE"]
    direction TB
    CUR{{"Cursor checks"}}
    ACK{{"Acknowledgement rules"}}
    IDN{{"Identity freshness gate"}}
    BUD{{"Spool budgets"}}
    GC{{"Cleanup preconditions"}}
    KIND{{"Run kinds refused"}}
  end
  subgraph KERN["PROJECT KERNEL"]
    direction TB
    OWN{{"Owner, lease and fence<br/>per request"}}
  end
  CUR -->|"cannot prove"| RESYNC
  ACK --> OWN
  IDN -->|"claims refused"| FENCE

The gates in DATA PLANE NODE hold the node to its own evidence. Fence check on every mutation and Owner, lease and fence per request hold it to the ownership the control plane granted, from both sides of the node.

Three boundaries in detail

A position advances only on the peer's evidence. Every one of the node's four positions moves when the peer at the far end has confirmed the thing the move claims, checked against what the peer reported available. Only the peer can establish where the far end stands, and a kernel compacts what it has been told was delivered. See Cursor separation.

A refusal is final for that attempt. Transport failures are retried under bounded backoff. A stale_fence or non-owner answer is the same on every attempt, so it is never retried. The refusal stops the reconnect as well as the request. See Reconnecting to a live project runtime.

Application execution stays in the kernel. Recovery replays assignments, and the run kinds are refused before the node records an assignment, so a replay never executes application work outside the kernel, and the operator lane carries non-execution work only, in recovery as in normal operation. See Idempotency and replay-safe reprocessing.

What an operator holds to during recovery

The same boundaries apply to the people recovering a fleet:

ownership and fence fields change only through the control plane
identity and enrollment boundaries are crossed only by enrollment
node cursors and spools are restored only through a forced resync
convergence and lineage gates pass before recovery is declared complete

See Mass restart recovery.