Recovering the kernel link¶
Recovery re-resolves the endpoint, re-handshakes, and resumes the return lane from the position the node already holds. The resume point is the one decision in the whole path with no safe alternative.
The sequence¶
flowchart TB
A["Connection lost or failed"]
B["Re-resolve the endpoint<br/>Service and EndpointSlice"]
C["Re-handshake<br/>identity, protocol, trust, ownership"]
D["Readiness checked"]
E["Return lane resumed from last_acked_seq"]
A --> B --> C --> D --> E
What recovery touches¶
flowchart LR
subgraph XD["XRATUD, runtime handle"]
direction TB
RC[("Return cursor<br/>last_acked_seq")]
end
subgraph K8S["KUBERNETES"]
direction TB
EPS[("EndpointSlice<br/>re-read")]
end
subgraph PR["PROJECT RUNTIME, possibly a new pod"]
direction TB
K["Kernel"]
CS[("Continuity store<br/>max_seq")]
K --- CS
end
XD -.->|"re-resolve"| EPS
XD ==>|"re-handshake"| K
RC -->|"resume_from"| CS
The node keeps one number and the kernel keeps the envelopes. Recovery reads the endpoint fresh from Kubernetes and resumes the kernel's store at the node's number, so both halves of the position survived the outage on their own side.
The endpoint is re-resolved rather than reused, because a kernel that came back was often rescheduled onto a different pod. Reconnecting to a remembered address would reach nothing, or something else.
Resume is always from the last acknowledged sequence¶
The two alternatives both fail, and not symmetrically. Resuming at zero re-delivers everything the node already processed; resuming ahead of the acknowledged position skips envelopes with no trace.
Behind is recoverable and ahead is data loss, so the only safe error direction is backwards. Resuming at the acknowledged position is the value that is never wrong.
Acknowledgement is cumulative and stops at a gap¶
An acknowledgement covers everything up to the last contiguous sequence and no further. Acking past a gap would tell the kernel an envelope arrived that did not, after which the kernel is free to compact it away.
A gap therefore holds the cursor rather than being stepped over. Delivery
resumes from the gap, and the digest chain identifies exactly where it is: a
prev_digest that does not match the previous envelope's digest.
The cursor is checked, not trusted¶
The node advances only as far as the kernel reports available. next_seq is
checked against max_seq and the terminal sequence rather than accepted as
given.
Marking envelopes delivered that never arrived would let the kernel compact them, so the check is what keeps a bookkeeping error from becoming a loss of evidence.
Reconnection is attempted for everything except a terminal refusal¶
A kernel that vanished is usually coming back, so a client that stopped reconnecting would stay dead after it returned. Reconnection continues under backoff from 0.1 seconds to a 30 second cap.
The exception is a terminal refusal, which stops the reconnect as well as the call. Re-establishing a fenced session is the failure mode that matters more than the lost connection. See Detecting a kernel link break.
Readiness is re-checked, not assumed¶
A returning kernel may still be starting. startup_not_ready and
startup_evidence_incomplete are retried rather than treated as a break, and
the node proceeds once the kernel reports a verified view per admitted runtime
closure.
What recovery produces¶
A contiguous, verified evidence stream from the acknowledged position to the present, and a command lane that works again. Nothing about the outage needs reconstructing, because the kernel kept the chain and the node kept its position.