The runtime state registry¶
The runtime state registry is the one in-memory document that holds a node's live process state. Every part of the reconcile cycle reads its registration flag, its transport state, its live watch revision and its identity health from the same place, and writes go through named setters, one per entry.
This page covers what the registry holds, who writes each entry, and the identity freshness state machine that decides whether the node may claim work at all.
What the registry holds¶
| Entry | Default | Written by |
|---|---|---|
registered |
false |
Registration, once the control plane accepts the node |
startup_converged_once |
false |
The first cycle that completes convergence |
shutdown_requested |
false |
A drain or termination signal |
shutdown_reason |
empty | The same signal |
lease_recovery |
{} |
Lease recovery, once per process |
build_runtime_metrics |
{} |
The build runtime |
cp_transport_retry_max_attempts |
3 |
Configuration at startup |
cp_transport_backoff_base_seconds |
0.25 |
Configuration at startup |
cp_transport_backoff_cap_seconds |
30.0 |
Configuration at startup |
cp_transport_state |
{} |
The control-plane transport, on every mode change |
telemetry_profile_refresh_interval_seconds |
15.0 |
The telemetry profile |
next_telemetry_profile_refresh_epoch |
0.0 |
Each profile refresh |
watch_revision |
0 |
The watch cursor owner, mirroring its live position |
watch_cursor_path |
empty | The watch cursor owner, at startup |
runtime_identity_state |
healthy | Each identity freshness check |
runtime_identity_transition_evidence |
{} |
Each state transition |
The document is built once per process from the node's configuration, and every entry has a declared default. A key the configuration does not supply takes the default, so the cycle never reads an absent value.
The registry in the cycle¶
flowchart TB
subgraph PROC["XRATUD PROCESS"]
direction TB
REG[("Runtime state registry")]
WCO["Watch cursor owner"]
TRN["Control-plane transport"]
LSE["Lease recovery"]
IDN["Runtime identity refresh"]
CYC["Reconcile cycle"]
end
WCO -->|"watch_revision, watch_cursor_path"| REG
TRN -->|"cp_transport_state"| REG
LSE -->|"lease_recovery"| REG
IDN -->|"runtime_identity_state"| REG
REG -->|"one read per decision"| CYC
Reconcile cycle takes its capacity, transport
mode, position and identity health from Runtime state registry, so one cycle's
decisions stay consistent with each other.
Identity health gates claims and execution¶
The registry carries the node's runtime identity state, and that state decides whether the node may claim assignments and whether it may run work it already holds:
flowchart LR
H["healthy<br/>claims and execution allowed"]
D["degraded_revocation_freshness_unknown<br/>claims refused"]
Q["quarantined<br/>claims and execution refused"]
H -->|"freshness age reaches 900s"| D
D -->|"age reaches 900s plus 300s grace"| Q
D -->|"a refresh succeeds"| H
Q -->|"a refresh succeeds"| H
healthy is the state a successful freshness check produces. At 900 seconds
without one the node reaches degraded_revocation_freshness_unknown and stops
claiming new work while finishing what it holds. After a further 300 seconds of
grace it reaches quarantined and stops executing as well. A successful refresh
returns it to healthy from either state.
| Reason code | Recorded when |
|---|---|
RUNTIME_IDENTITY_FRESHNESS_VALIDATED |
A refresh succeeded |
RUNTIME_IDENTITY_FRESHNESS_STALE |
The freshness age passed the stale threshold |
RUNTIME_IDENTITY_FRESHNESS_GRACE_EXCEEDED |
The grace period passed as well |
RUNTIME_IDENTITY_REFRESH_FAILED |
A refresh was attempted and did not succeed |
Each transition records evidence naming the previous state, the next state, the reason code, the freshness age and the transition time, and raises a transition count. The state is the node's own assessment of whether its credential can still be checked against revocation, and it fails closed. See Runtime identity refresh.
The registry is process state¶
The registry is held in memory only. A restart produces a fresh document at its defaults: unregistered, not converged, no transport state, a watch revision of zero and identity health assumed healthy until the first check. The durable positions are then loaded into it, which is the first thing a starting node does. See Rebuilding node state after restart.
Related¶
- The watch cursor for the owner that mirrors its position into the registry.
- Cursor separation for what is held in the process and what is held on the volume.
- Component wiring for how the registry reaches each component.