Architecture
Small enough to prove.
Isolated enough to trust.
Kirra's architecture is one long argument for isolation: untrusted doers in their own partition, a minimal verdict core at the boundary, and a control plane that assumes every carrier is hostile. Here is how the pieces fit — with the decision records that shaped them.
Deployment topology
The partition is the safety argument
The decision of record (ADR-0032): the governor runs as the safety-domain payload
on QNX Hypervisor 8.0 for Safety, with the entire ROS 2 / Autoware doer stack as an isolated guest VM.
The only thing that crosses the boundary is a frozen, pointer-free #[repr(C)] struct.
HARDWARE-GATEDQNX-target execution is the recorded remainder: cross-builds are reproducible in CI today; certified timing awaits target hardware.
docs/adr/0032-governor-deployment-platform.mddocs/safety/HYPERVISOR_CONTRACT_CHANNEL.mdcrates/kirra-contract-channel/src/lib.rs.github/workflows/ci.yml:122
Code structure
36 crates, layered by trust
ADR-0035 decomposed a monolith into layers where dependency direction encodes criticality: the checker logic depends on nothing heavy, and nothing heavy can reach into the checker. A CI fence proves the LLM-facing crates have no compile path to actuation.
docs/adr/0035-verifier-crate-decomposition.mdci/check_mick_actuation_fence.pyparko/ci/check-runtime-isolation.shCargo.toml
Memory ownership
Exactly one crate in the enforced path may use unsafe: the SHM carrier, with its unsafe
budget enumerated (shm_open/mmap, atomic field access). The contract channel and
in-line governor are #![forbid(unsafe_code)].
crates/kirra-hv-carrier/README.mdcrates/kirra-inline-governor/src/lib.rscrates/kirra-contract-channel/src/seqlock.rs
Threading model
The verifier's supervised loops are declared as data — a task manifest with dependencies, criticality, and deadlines — and started in a topologically-sorted order that fails closed on cycles or missing tasks.
Storage seams
Persistence is a set of storage traits (epoch fence, node store, federation, posture state, OTA) with SQLite, in-memory, and live-Postgres backends all running the same conformance suites in CI.
crates/kirra-persistencecrates/kirra-verifier-pg.github/workflows/ci.yml:503
Transport lanes
Three lanes, three trust models
There is no single “message bus.” Each lane gets exactly the trust model its criticality demands — and none of them trusts the carrier.
| Lane | Carrier | Trust model | Status |
|---|---|---|---|
| Enforcement (in-vehicle) | POSIX SHM seqlock · frozen #[repr(C)] contract |
Coherent-snapshot read → validate → Ed25519 over the enforced bytes → verify-before-release | LIVE |
| ROS 2 / DDS (doer side) | DDS via r2r (Humble/Iron/Jazzy) · CycloneDDS writer feature-gated |
Fail-closed QoS: actuator topics must be Volatile — negotiated QoS is read back and a downgraded topic is refused at open | LIVE |
| Fleet (vehicle ↔ ops) | Zenoh (ADR-0007) | Untrusted carrier: Ed25519 payload signatures verified before use; rejection counters; QM-only, fenced off the safety path | SPIKE |
| Zero-copy candidate | iceoryx2 (pinned =0.9.2, isolated workspace) | Same frozen contract over a zero-copy channel; 9-class fault matrix passes in full and minimal feature configs | SPIKE |
src/dds_bridge.rssrc/dds_cyclonedds.rscrates/kirra-fleet-transport/README.mdtools/iceoryx2-spike/README.mddocs/adr/0006-governor-transport-iceoryx2.md
Positioning
Where Kirra sits in the landscape
Kirra is not an end-to-end driving stack, and we won't pretend it is. It is the governed layer under one. That makes most comparisons complementary, not competitive — and where the repository gives us no evidence, we make no claim.
Autoware
The decision of record keeps Autoware as the AV-stack doer — Kirra does not reimplement localization or closed-loop control, and the gap analysis says so plainly. What Kirra adds is what the analysis found Autoware has no equivalent of: formal, fail-closed command bounding (RSS conjunction, occlusion caps, decel-to-stop) applied to the doer's output at a frozen contract boundary.
Mobileye RSS
RSS is a published formal model, and Kirra implements it in the open: longitudinal/lateral safe distances as a conjunction, Rule-4 occlusion bounds, opposite-direction terms — with property tests, an exhaustive concrete mirror, and two of the primitives machine-checked by Kani. You can read every line.
parko/crates/parko-core/src/rss.rsverification/kani/src/proofs_rss.rsdocs/safety/KIRRA_RSS_FORMAL_SPECIFICATION.md
NVIDIA DRIVE
Complementary by design: Kirra's certified-timing target is DRIVE-class hardware running QNX for Safety, with Jetson Orin as the doer/dev rig. The repository is explicit that Jetson never hosts the certification target — and neither do we.
docs/hardware/TARGET_PLATFORM_MATRIX.mdtools/qnx-rtm-harness/README.md
Waymo · Wayve · Apollo
Vertically-integrated or end-to-end learned stacks solve a different problem: driving. Kirra solves governing — a doer-invariant safety case that holds whether the doer is geometric, learned, or an LLM. We publish no benchmark against closed systems we cannot measure.
READ THE SOURCE
The architecture is the argument.
Every box on this page is a crate you can read, a decision record you can audit, or a CI lane you can re-run.