Skip to content

Revocation

Withdrawing a channel has to hold when a monitor is slow, a frame is lost or a cell dies halfway through. The nucleus makes revocation deterministic by keeping the authority itself until every endpoint and every unit of credit is accounted for. This page covers the revocation fence, endpoint acknowledgement, the conditions for closing a channel, and what happens to calls in flight.

Who takes part

flowchart TB
  subgraph NUC["NUCLEUS"]
    direction TB
    FENCE[("Revocation fence<br/>channel: revoking")]
    REC{{"Reconcile reserved<br/>calls and bytes"}}
    CLOSED[("Channel: closed")]
  end
  subgraph CALLER["CALLER CELL"]
    direction TB
    CM["Caller monitor"]
  end
  subgraph OWNER["OWNER CELL"]
    direction TB
    OM["Owner monitor"]
  end
  FENCE -->|"1. RevokeChannelGrant, fence"| CM
  FENCE -->|"1. RevokeChannelGrant, fence"| OM
  CM -->|"2. acknowledged or failed,<br/>same fence"| REC
  OM -->|"2. acknowledged or failed,<br/>same fence"| REC
  REC -->|"3. every credit accounted"| CLOSED

Advancing Revocation fence invalidates the delegated fast path in the same transition, so no new call reserves credit while acknowledgements are pending. Reconcile reserved calls and bytes admits one outcome from each monitor, and the channel reaches Channel: closed only once every reserved credit is accounted for.

Endpoint acknowledgement

Each endpoint returns one of two typed outcomes: an acknowledgement or a failure. The revocation receipt carries the channel epoch, the grant digest and the exact fence being acknowledged, so an installation receipt is refused as a revocation acknowledgement.

A missing response counts as neither. A monitor that has not acknowledged the fence within the allowed interval is terminated and its cell epoch is invalidated.

When a channel closes

A channel reaches closed when all three conditions hold:

  • every installed endpoint has an admitted acknowledgement or failure outcome;
  • every reserved call credit and attachment byte is returned, reclaimed or explicitly charged;
  • each outcome names the current channel epoch and the original grant digest.

The nucleus host and the transport deliver the fence and return outcomes. The decision to close is the nucleus's, made from admitted receipts.

Calls in flight

Call Outcome
Admitted before the fence Completes, cancels or terminates according to the grant's policy
Presented after the fence Refused with a typed revoked or stale fault
Dispatched to an owner that died Its credit is recorded as abandoned and reconciled

See Credit backpressure for how abandoned credit is reclaimed or charged.