Skip to content

Kernel bridge

Every exchange between a node and a project kernel passes through one part of xratud: the kernel bridge. It dials the kernel over mutual TLS, sends the operator commands the node is allowed to send, holds the return lane the kernel pushes evidence on, and keeps a record of each runtime it owns. It also resolves two things a kernel needs before it can run: the kernel image a project's runtime is built on, and the runtime facts its resolver configuration admits. This section covers each of those parts.

For what the bridge guarantees across breaks and handovers, see The kernel bridge and Plane linkage and continuity.

The parts and what uses them

flowchart TB
  subgraph IN["WHAT REACHES THE BRIDGE"]
    direction LR
    OPA["kernel.operator.v1<br/>assignment"]
    BLD["build.project.v1<br/>assignment"]
    SRV["project.serve.v1<br/>readiness"]
  end
  subgraph BR["KERNEL BRIDGE, in xratud"]
    direction TB
    OC["Operator controls"]
    GC{{"gRPC client<br/>kernel.grpc_control.v1"}}
    ST[("Runtime sessions<br/>one per owned runtime")]
    LB["Kernel lifecycle bridge"]
    RR["Resolver runtime"]
    KI["Kernel image resolution"]
    OC --> GC
    GC --- ST
  end
  K["Project kernel<br/>port 7777, mTLS"]
  REG[("Your registry<br/>repository_root/kernel")]
  ORC[("Runtime orchestrator<br/>assignment handles")]
  OPA --> OC
  SRV -->|"handshake"| GC
  SRV --> RR
  SRV --> LB
  BLD --> KI
  KI -->|"tag to digest"| REG
  GC <==>|"command lane, return lane"| K
  LB --> ORC

The gRPC client is the only part that talks to a kernel, and every other part reaches the kernel through it. The runtime session table is keyed by runtime instance, so a node supervising a runtime across many assignments holds one record and one return lane for it.

In this section