Skip to content

Resume direction

Every position in the system is resumed from behind or exactly at the truth, never ahead of it. Resuming behind re-delivers work that dedupe absorbs, and resuming ahead skips work with no record that it existed. Every resume rule therefore errs behind the truth.

This page covers the three outcomes, the three places the rule is applied, and what absorbs the repetition.

The three outcomes

Resume point What happens
Behind the true position The range is delivered again, and dedupe at the receiving end recognises it
At the true position Delivery continues
Ahead of the true position The range between is skipped, and nothing records it
flowchart LR
  subgraph STREAM["ONE STREAM"]
    direction LR
    A["confirmed"]
    B["delivered, unconfirmed"]
    C["not yet delivered"]
    A --> B --> C
  end
  R1(["Resume behind:<br/>repeats the confirmed range"])
  R2(["Resume at the position:<br/>continues from unconfirmed"])
  R3(["Resume ahead:<br/>skips the unconfirmed range"])
  R1 --> A
  R2 --> B
  R3 --> C

Resume ahead: skips the unconfirmed range skips the envelopes in delivered, unconfirmed, which a peer compacts once it believes they arrived, so nothing recovers them.

Where the rule is applied

The kernel return lane resumes from the last acknowledged sequence. The resume point is the position itself, with no adjustment in either direction. A reconnect sends that sequence as the lane's opening position, and the kernel delivers from it.

A watch persist that would move backwards resets the record. The node removes the cursor file and starts again from zero. See Persisting cursors across restart.

A loaded cursor behind the configured initial revision is raised to it. The applied and acknowledged revisions that are already further ahead are kept, so the record moves forward only to the floor the node was configured with.

What absorbs repetition

Every receiving end recognises a repeat:

Repeated Recognised by
An assignment range from the control plane The lease the node holds, and its own execution dedupe records
A status envelope Its dedupe key in the status acknowledgement state
A spooled telemetry record Its envelope identifier at the control plane's ingest
A kernel return envelope Its outbox identifier, built from the runtime instance, sequence and digest
A kernel return batch The control plane, which reports accepted and duplicate counts separately

A restarted node therefore resumes a return lane from zero: the batch report distinguishes what was accepted from what was already held, and the node treats both as delivered. See Idempotency and replay-safe reprocessing.

A refusal leaves the position unchanged

A failed watch returns the revision the node already holds, and a refused acknowledgement returns the position that stands. Neither produces a new resume point, so an error leaves the node exactly where it was.