The name is the specification
Five words, each a load-bearing claim. Read together they describe the whole machine: typed authority, expressed as policy, driven by a reactor, mediated by a monitor, delivered by a compiler.
Every subject and object is a typed thing. Policy binds to a type, not an instance, via a governs edge — authored once, inherited by every member down the subTypeOf DAG.
Deny is the floor, not a rule you write. Authority is a positive allow-policy — a content-addressed blob of verifiable bytecode. Composition is kernel-fixed deny-overrides; a broken policy fails closed.
State is a durable append-only log of posts (CQRS). Reactions — themselves things — project the log into the typed store and recompile affected policy. Nothing mutates in place; everything is a reaction to an event.
The store is reachable only through invoke. Every edge — API, VFS, bus, runner — is a pure client with zero direct authority. A compile-time guard fails the build if a perimeter module reaches the core.
The novel core. A policy is lowered — like an SSA IR through a backend — from an abstract typed dialect to the strongest enforcement primitive each target offers, then proved equivalent to its source.
The proof surface
Security is not a feeling; it is a set of named guarantees, each with a mechanism, a citation, and an honest status — what is machine-proved, what is designed-for, what is assumed of a dependency. Nothing here is claimed proved that isn't.
| Guarantee | Mechanism | Rests on | Status |
|---|---|---|---|
| Complete mediation | Store reachable only via invoke; perimeter has no store/exec/bus handle; build.rs denies at compile time. |
Lampson '74 | design-enforced |
| Fail-safe defaults | Base on permission: default allow = false. No allow matches ⇒ denied. No ambient authority — owner is a token, not a branch. |
Saltzer & Schroeder '75 | design-enforced |
| Attenuation is a ceiling | Grants are attenuable ocap tokens; a delegate can only narrow, never widen. Offline-verifiable (Ed25519 + caveats). | Miller '06 · Biscuit | dep-assured |
| Policy semantics are sound | Authorizer & validator proved in Lean (default-deny, deny-overrides, order-independent) — of the model; the Rust engine is differential-tested against it. PanSigna mandates schema-validated policies so Cedar's skip-on-error can't drop a forbid. |
Cedar / Lean (cedar-spec) | model-proved |
| Compiler preserves meaning | Each lowering emits a witness; a validator checks compiled enforcement ≡ source policy per artifact (translation validation), plus differential fuzzing. | Pnueli '98 · Alive2 | design-target |
| Spatial + referential safety | Capability bounds & permissions enforced in hardware; unforgeable, monotonic, tagged. | CHERI · Morello | hw-enforced |
| Isolation of the TCB | Enforcement primitives distributed as kernel capabilities on a formally verified microkernel. | seL4 (Klein '09) | kernel-proved |
| Integrity of policy artifacts | Policies are sha256-addressed blobs; the hash is the integrity check. Compile-per-hash, cache is correctness-free. | Venti · Nix · git | design-enforced |
Compile, don't interpret
Every policy engine in production pays a tax on the hot path: it interprets a rule set on each request. PanSigna's thesis is that a reference monitor is a compiler target — the policy is fixed long before the call, so the decision can be lowered ahead of time into a primitive the substrate enforces for free.
Request arrives → marshal context → evaluate rule tree in a policy VM → return allow/deny. Predictable overhead on every access; the engine is on the critical path forever, and its correctness is re-litigated at runtime.
Policy compiled per sha256 into a CHERI capability set / seL4 CNode / WASM import table. At call time the substrate is the check — a bounds test in silicon, a cap lookup in the kernel. Zero policy-VM on the hot path.
Where the performance lives
Ahead-of-time lowering. The residual — what genuinely can't be pushed into hardware or kernel — is the only thing evaluated at runtime, and it is emitted as a monomorphized guard, not a rule walk.
Content-addressed compilation. Identical policy compiles once; the artifact caches by hash with no invalidation problem, because immutable blobs make caching correctness-free.
The MLIR discipline, everywhere
Design lives in the IR, not the language. Concrete syntax — Rust, C, Nix — is interface only, chosen for pragmatism and never at the cost of performance: monomorphized generics over dynamic dispatch on hot paths, bulk operations over per-item allocation.
The compiler is structured as progressive lowering through dialects — Lattner's "one IR, many backends," applied to authority instead of arithmetic.
The lowering pipeline
The heart of the machine, read top-to-bottom exactly as it compiles. A typed policy descends through three dialects and two passes, then fans out to the four enforcement targets — each receiving the strongest primitive it can offer — and every emission is checked against its source.
governs edges, in a language with mechanized semantics.subTypeOf DAG; normalize to canonical allow-setSpatial rules become capability bounds + permissions — unforgeable, checked every access by the ISA.
Structural authority becomes a CNode / capDL distribution — policy-as-kernel-objects, model-verified.
Custom ops run in a sandbox; the compiled import table is the grant — absent import, absent authority.
Whatever can't be pushed lower: a monomorphized guard compiled into the invoke path. The honest fallback.
What is actually new here
Not "compiling policy." Each level is proven prior art: inlined reference monitors (Erlingsson & Schneider '04) for the residual, OPA's compile-to-WASM as industrial precedent, eBPF LSM/KRSI for kernel-compiled policy, seL4 capDL for policy-as-kernel-objects, and Micro-Policies/PUMP ('15) for hardware tag enforcement adjacent to CHERI.
The contribution is preserving one typed, default-deny, deny-overrides semantics across all four heterogeneous targets at once — and proving each lowering equal to that single source. Standing on named shoulders; the new step is the join.
Dependency choices
Every load-bearing part is a deliberate pick over a named alternative, weighted for provability first, then performance, then ecosystem fit. Each carries its honest trade and a lane: production reality today, or research we advance.
melior can't express (new dialects still need C++ TableGen behind an alpha C API). So we take MLIR's method and build the IR in Rust (pliron-class base), keeping MLIR-compatible textual syntax. research
async-natssync_interval: always on the source-of-truth stream, R=3, server ≥2.14.x. production
The repository, as governed structure
The layout enacts the reference monitor: a small trusted core that alone touches authority, a ring of perimeter edges that are pure invoke clients, and a compile-time guard that fails the build if the ring ever reaches past it. You can read the security property off the directory tree.
invoke and nothing more; they can request authority, never hold it.build.rs statically forbids any perimeter module from importing core authority. Violating the reference-monitor property is a compile error, not a code-review note.Honest ledger
What is real, what is designed, what is research — stated plainly, because this audience can tell the difference and respects the distinction.
- seL4 functional correctness (Klein et al.)
- CHERI hardware capability safety
- Cedar's Lean-mechanized authorizer
- Content-addressing integrity (Nix/git)
- The L2→L1→L0 lowering pipeline
- Translation validation per artifact
- The
build.rsdefault-deny guard - Reactor projection + recompile loop
- WASM runtime on CHERI-purecap
- CHERI×hypervisor policy semantics
- Real-MLIR vs native-IR decision
- End-to-end proof chain composition
Provenance. Every dependency claim here was source-verified against upstream repositories and papers on 2026-07-08 (Cedar's Lean theorems in cedar-spec; Biscuit v3.3 / Eclipse; wasmtime riscv64 Tier 3 & the absent purecap path; NATS 2.14.x + the Dec 2025 Jepsen analysis; the six prior-art shoulders). Where a claim softened — Cedar's proofs cover the model not the crate; melior can't hold custom dialects; WASM-on-CHERI is research-only — it is marked here, not dropped. This is an architecture proposal for discussion: its purpose is to be refuted or ratified by the people who built the ground it stands on.