Kyle Luecke

technical note 03 · operating systems, type systems & kernel security

Separating Semantic Inference from Ring-0 Authority: Typed Intent Contracts and Capability Confinement in INOS

How IntentNativeOS partitions untrusted model completions (T4) from Ring-0 page tables and capability slots (T0), encodes provenance-qualified bindings in OCaml 5 so exploratory examples cannot lower into executable authority, and tests crash-atomic WAL persistence under QEMU/OVMF.

Kyle W. Luecke 2026-11-08 11 min read Source: k-luecke/IntentNativeOS (v0.3.0-alpha) ↗

1. The Ambient-Authority Flaw in Agent-Assisted Desktops

Conventional agentic shells Bolt a language model onto a POSIX user session: the model emits a bash command or Python script, and a runner executes it with the human user's full UID — inheriting read/write access to $HOME, SSH sockets, browser cookies, and outbound TCP. Prompt injection or a misparsed ambiguous instruction ("optimize my solver, say for latency") immediately becomes an unauthorized side effect because POSIX has no distinction between what the user explicitly authorized and what an untrusted parser inferred.

IntentNativeOS (INOS) (v0.3.0-alpha) investigates the opposite architectural premise: treat model completions as untrusted external data (T4), strip Python and cloud dependencies out of the runtime entirely (ADR-0001), and enforce capability confinement from x86-64 Ring 0 page tables up through an OCaml 5 semantic compiler.

Trust RingComponentAuthority & Failure Containment
T0kernel/ (no_std x86-64 UEFI Rust)Physical frame allocator, 4-level W^X page tables, per-process CR3 address spaces, capability table IPC, 6-boundary crash-tested WAL filesystem, VirtIO TCP/UDP + RFC 4035 DNSSEC, 1280×800 GOP compositor. Zero model code inside T0.
T1security/ (OCaml + C broker)Fail-closed capability minting, CTAP2/FIDO2 step-up protocol, NIST FIPS 203 (ML-KEM-768) & FIPS 204 (ML-DSA-65) signatures, TUF v1.0.33 repository verification.
T2core/, compiler/ (OCaml 5)Typed Intent IR, clarification gate state machine, deterministic DAG validator, dual-model A/B arbitration, append-only receipt journal. Bugs in T2 cannot forge T0/T1 capabilities.
T3userspace/ & models/17 native Ring 3 .inapp binaries plus freestanding AVX2/FMA Q8_0/Q4_0 inference (quant_engine.c), each confined to explicit capability descriptors.
T4External inputs & completionsDocuments, network packets, and raw token streams — carry zero ambient authority.

2. Provenance-Qualified AST Nodes: Preventing Example-to-Objective Escalation

A subtle failure mode in natural-language compilation occurs when a user supplies an illustrative parameter during exploratory discussion ("suppose we optimize for minimum latency as an example") and a downstream planner promotes that example into a destructive execution constraint. In INOS's OCaml 5 control plane, values inside an intent_contract are wrapped in a provenance-qualified record tracking both origin and binding strength:

type mode = Explore | Design | Simulate | Execute | Maintain

type value_origin =
  | User_explicit
  | User_selected_example
  | Workspace_observed
  | Model_inferred
  | Policy_default

type binding = Example | Preference | Constraint | Authorized_action

type 'a qualified = {
  value    : 'a;
  origin   : value_origin;
  binding  : binding;
  evidence : artifact_hash list;
}

Two deterministic compiler invariants govern lowering from Intent IR → Plan IR → Operation IR:

  1. Mode non-escalation (I-02): Contracts in Explore, Design, or Simulate modes statically forbid lowering any operation whose declared effect set intersects Write_resource, Network_connect, or Change_system_policy. Transitioning to Execute invalidates stale revisions and routes through the clarification/authorization gate:
    RECEIVED → CONTEXT_RESOLVED → INTENT_DRAFTED → [READY | CLARIFICATION_REQUIRED]
    READY → AWAITING_AUTHORIZATION → [AUTHORIZED | REJECTED | EXPIRED] → PLANNING → EXECUTING → VERIFYING
  2. Binding monotonicity (I-01, I-03): No compiler pass or model handoff envelope (inos.handoff.v0.2) can upgrade binding = Example or origin = Model_inferred into Authorized_action without a fresh human challenge-response receipt from the T1 broker:
    UNTRUSTED_REQUEST → CANONICAL_OP_DIGEST → POLICY_CHECK → FRESH_CHALLENGE → INDEPENDENT_APPROVAL → SCOPED_CAPABILITY → ONE_OPERATION → REVOKE

3. Model Independence (I-04) and Crash-Atomic WAL Storage

An operating system whose file manager, compositor, or recovery shell stops working when local LLM weights are unloaded is a fragile wrapper, not an OS. System invariant I-04 requires cold UEFI boot (BOOTX64.EFI), per-process CR3 scheduling, the 1280×800 GOP spatial desktop, all 17 native Ring 3 applications, permission enforcement, and storage recovery to operate deterministically with zero models loaded (and under 16 GiB consumer RAM ceilings where optional local Q8_0/Q4_0 weights are the first pages reclaimed under memory pressure).

Similarly, invariant I-08 (reversibility and preservation, exposed in the UI as atomic F3 Undo mutation receipts) cannot rely on userland copy-on-write conventions alone; it rests on a kernel write-ahead log (WAL) verified across six explicit crash-injection boundaries (pre-header, mid-descriptor, pre-commit barrier, post-commit/pre-checkpoint, partial checkpoint, and replay idempotence). Below are two automated QEMU/OVMF qualification captures from the v0.3.0-alpha release artifact set demonstrating WAL crash/reboot persistence and Ring 3 capability policy denial:

Capture C · WAL Crash / Reboot PersistenceCommitted mutation state surviving forced reboot and deterministic journal replay.
Capture D · Capability Policy DenialFail-closed broker rejecting unauthorized Ring 3 capability escalation.

4. Quarantined Research Lanes and Withheld Beta Gates

Because INOS serves as an integration testbed for ideas developed across other Driftbound Labs studies, negative internal benchmarks are recorded directly in-tree (docs/research/L308_DECISION_RECORD.md) rather than silently shipped:

  • research/tonic quarantined OFF: When oscillatory tonic gating was benchmarked inside the control-plane router (L306), it required 71 model invocations against 40 in the deterministic control baseline (C00), failing its invocation-reduction gate. It remains compiled off by default.
  • research/scp quarantined OFF: While typed boundary projection achieved a 0.0% false-authorization rate, it tied the existing deterministic OCaml AST verifier already enforced in core/, adding complexity without net security gain inside INOS's closed IR.
  • Production Beta explicitly withheld (BLK-01, BLK-02): Although all 55/55 unit, property, adversarial-boundary, and Sentinel BQS suites pass under dune runtest in QEMU/OVMF emulation, Beta status remains gated behind bare-metal USB HID FIDO2 hardware-token passthrough validation (BLK-01) and an independent external cryptographic and kernel memory-safety audit (BLK-02).