Cell control channel¶
The cell control channel is the kernel's local transport between its own endpoints: the nucleus host, the cell monitors and the runtime providers. It is the reference path, bounded at every point, and every faster transport behaves exactly as it does. The channel moves bytes and file descriptors and reports what happened to them. Every decision about retry, revocation, termination and lifecycle is made by the nucleus from those reports. This page covers where the channel is used, what it owns, the facts it reports, and how a failed write is retried.
Two sessions per cell¶
flowchart LR
subgraph K["KERNEL, TRUSTED"]
direction TB
HOST["Nucleus host"]
end
subgraph CELL["CELL"]
direction LR
MON["Cell monitor<br/>trusted"]
PROV["Runtime provider<br/>untrusted"]
end
HOST <-->|"session 1<br/>registration, grants, effects"| MON
MON <-->|"session 2<br/>RuntimeProviderProtocolV1"| PROV
A process cell uses the channel twice, with different trust on each session:
- Nucleus host to monitor. The session authenticates the monitor's
operating-system peer and the exact cell id and epoch. That authenticated
registration is the fact behind the
CellMonitorRegisteredreceipt. - Monitor to provider. The session is owned by the monitor and carries the language-neutral provider protocol. A provider registers with its monitor, and its readiness reaches the nucleus as a fact the monitor reports.
Each session belongs for its whole lifetime to the runtime that created it. A disconnect ends the session, and a new connection authenticates and registers again. See Bootstrap control lane and Process lifecycle.
What the channel owns¶
| Mechanic | Detail |
|---|---|
| Peer authentication | Unix peer credentials, then process and cell registration |
| Version admission | The protocol version is admitted before a frame body is decoded |
| Typed frames | Registration, call, completion, fault, effect outcome, authority delivery, authority outcome |
| Bounded state | Request queue, completion queue and pending-correlation table, each with a fixed limit |
| Descriptor transfer | File descriptors travel with a frame, and the count delivered must equal the count declared |
| Failure observation | Loss, duplication, reordering and peer closure are observed and reported deterministically |
See Reference call lane, Bounded queues, Fd handoff and Delivery loss injection.
Provider arguments and results are opaque to the channel. The runtime-provider
codec turns the admitted interface values and buffer descriptors into bounded
bytes, and the channel carries those bytes and their attachment slots
unchanged. Channel grants and revocations travel the same way, as bounded
authority bytes correlated by an EffectId. See
Channel authority.
For capability.invoke, the nucleus host sends a frame the monitor has
validated. Its task, call, attempt, interface hash, export ordinal and method
ordinal are bound to the issued effect and to the sealed compiled interface. A
completion is decoded against the same sealed bindings before the nucleus
receives an observation digest or a typed result. See
Provider frame validation and supervision.
Correlation¶
A request stays pending until the completion with the same correlation key
arrives. The key is an AttemptId for a call and an EffectId for a host
effect. The two are different identity types, so a retried attempt is
distinguishable from the call it retries, and a host effect is distinguishable
from the invocation that requested it.
Transport facts¶
The channel reports each abnormal condition as a typed fact to the nucleus:
| Fact | Raised when |
|---|---|
| Malformed frame | Bytes fail framing, version or shape admission |
| Unmatched correlation | A completion arrives for no pending request |
| Delivery lost | A frame was accepted for delivery and did not arrive |
| Peer closed | The peer closed the connection |
| Backpressure | A bounded queue or the pending table is full |
A full queue is reported as backpressure to the sender, and the frame stays with the sender. An unmatched completion is refused.
Retrying a failed write¶
When a local write fails, the queued frame and its pending correlation stay in the session. The explicit retry operation sends that same frame again under the same correlation key. A transport retry creates no new task, grant or lifecycle transition: it re-delivers one frame the nucleus already issued.