interplane.Get Omega
Read in your language

aien-sovereign-core-mv

AienOS host runtime: inference scheduling, paged KV state, the aien CLI and Spark verification tooling. Its inference engine is in alpha testing (DGX Spark GB10); Omega is the implementation destination.

Brought by drakestapleton

GitHub aien-dev/aien-sovereign-core-mv#111 (code only)

closed derived 2cd8a125b22e39bc #111

Imported from GitHub aien-dev/aien-sovereign-core-mv#111 (code only)

GitHub's metadata for this pull request is unavailable: its state is DERIVED from the commits (merged: the head is reachable from this project's main; open: GitHub kept a merge ref; else closed).

Base 4cd50c40684d37969c08f3de9d2336194c218be7 · Head c05b959520f2a323959de03efcfd4b9a3fe891a1

Fetch it

A git bundle of the pull request's head, 27673 bytes.

curl -fsSL https://interplane.io/drakestapleton/aien-sovereign-core-mv/patches/2cd8a125b22e39bc.bundle -o 2cd8a125b22e39bc.bundle
git fetch 2cd8a125b22e39bc.bundle refs/pull/111/head

Raw bundle · Diff

Provenance

This proposal is imported from GitHub; it is not signed by its author. Its import statement and source record:

github-import 1
aien-dev/aien-sovereign-core-mv
111
c05b959520f2a323959de03efcfd4b9a3fe891a1
{"kind":"github-import","owner":"aien-dev","repo":"aien-sovereign-core-mv","number":111,"url":"https://github.com/aien-dev/aien-sovereign-core-mv/pull/111","export_sha256":"967c79e26a893657b5cdaa45efd442be5dbd2ecfe68e25f9a8c1b5da4d60d452","imported_utc":"2026-11-18T16:35:59Z","metadata":"unavailable","state_derived":true}

Changes

diff --git a/Cargo.lock b/Cargo.lock
index adb56e78..2e3464f5 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -25,6 +25,16 @@ dependencies = [
  "memchr",
 ]
 
+[[package]]
+name = "aien-campaign-verifier"
+version = "0.1.0"
+dependencies = [
+ "serde",
+ "serde_json",
+ "sha2 0.10.9",
+ "toml",
+]
+
 [[package]]
 name = "aien-capability"
 version = "0.1.0"
diff --git a/Cargo.toml b/Cargo.toml
index 5ec11ca7..d5ad1713 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -32,6 +32,7 @@ members = [
     "crates/aien-inference-service",
     "crates/aien-inference-runtime",
     "crates/cortex-path-m1",
+    "crates/aien-campaign-verifier",
 ]
 
 [workspace.package]
diff --git a/crates/aien-campaign-verifier/Cargo.toml b/crates/aien-campaign-verifier/Cargo.toml
new file mode 100644
index 00000000..5bb496d3
--- /dev/null
+++ b/crates/aien-campaign-verifier/Cargo.toml
@@ -0,0 +1,15 @@
+[package]
+name = "aien-campaign-verifier"
+version = "0.1.0"
+edition = "2021"
+authors = ["Drake Stapleton <aien@aienos.com>"]
+description = "Independent C1 campaign verifier: judges frozen evidence bundles against docs/campaigns/c1 without linking code under test"
+license.workspace = true
+
+# Independence rule (docs/campaigns/c1/SPEC.md Section 7): no dependency on any crate under test.
+# tests/independence.rs enforces this.
+[dependencies]
+serde = { version = "1.0", features = ["derive"] }
+serde_json = "1.0"
+sha2 = "0.10"
+toml = "0.8"
diff --git a/crates/aien-campaign-verifier/src/bundle.rs b/crates/aien-campaign-verifier/src/bundle.rs
new file mode 100644
index 00000000..e46f3ca3
--- /dev/null
+++ b/crates/aien-campaign-verifier/src/bundle.rs
@@ -0,0 +1,131 @@
+//! Bundle integrity and binding to the frozen spec (SPEC.md Section 10).
+
+use serde::Deserialize;
+use sha2::{Digest, Sha256};
+use std::collections::BTreeSet;
+use std::fs;
+use std::path::Path;
+
+pub const SUMS_FILE: &str = "sha256sums.txt";
+pub const CAMPAIGN_ID: &str = "c1";
+
+/// Subset of `manifest.json` the verifier binds against. Unknown fields are ignored.
+#[derive(Debug, Clone, Deserialize)]
+pub struct Manifest {
+    pub campaign_id: String,
+    pub acceptance_sha256: String,
+    pub placement_sha256: String,
+    pub kv_contract_sha256: String,
+    pub code_under_test_commit: String,
+    pub dirty_tree: bool,
+    pub kv_profile: String,
+}
+
+pub fn sha256_file(path: &Path) -> Result<String, String> {
+    let bytes = fs::read(path).map_err(|e| format!("{}: {e}", path.display()))?;
+    Ok(Sha256::digest(&bytes)
+        .iter()
+        .map(|b| format!("{b:02x}"))
+        .collect())
+}
+
+/// Every file in the bundle is listed in `sha256sums.txt` and matches its digest.
+pub fn check_sha256sums(bundle: &Path) -> Vec<String> {
+    let sums = match fs::read_to_string(bundle.join(SUMS_FILE)) {
+        Ok(s) => s,
+        Err(e) => return vec![format!("{SUMS_FILE}: {e}")],
+    };
+
+    let mut v = Vec::new();
+    let mut listed = BTreeSet::new();
+    for (n, line) in sums.lines().enumerate() {
+        let line = line.trim();
+        if line.is_empty() {
+            continue;
+        }
+        let Some((digest, rel)) = line.split_once(char::is_whitespace) else {
+            v.push(format!("{SUMS_FILE}:{}: malformed line", n + 1));
+            continue;
+        };
+        let rel = rel.trim_start().trim_start_matches('*');
+        if rel.starts_with('/') || rel.split('/').any(|c| c == "..") {
+            v.push(format!("{SUMS_FILE}:{}: path escapes bundle: {rel}", n + 1));
+            continue;
+        }
+        listed.insert(rel.to_string());
+        match sha256_file(&bundle.join(rel)) {
+            Ok(actual) if actual == digest.to_ascii_lowercase() => {}
+            Ok(_) => v.push(format!("{rel}: digest mismatch")),
+            Err(e) => v.push(e),
+        }
+    }
+
+    match list_files(bundle) {
+        Ok(files) => {
+            for f in files {
+                if f != SUMS_FILE && !listed.contains(&f) {
+                    v.push(format!("{f}: not covered by {SUMS_FILE}"));
+                }
+            }
+        }
+        Err(e) => v.push(e),
+    }
+    v
+}
+
+/// The manifest names this campaign, a clean tree, and the exact spec files the verifier holds.
+pub fn check_manifest_against_spec(m: &Manifest, spec_dir: &Path) -> Vec<String> {
+    let mut v = Vec::new();
+    if m.campaign_id != CAMPAIGN_ID {
+        v.push(format!(
+            "campaign_id {} is not {CAMPAIGN_ID}",
+            m.campaign_id
+        ));
+    }
+    if m.dirty_tree {
+        v.push("code under test was built from a dirty tree".into());
+    }
+    let commit = &m.code_under_test_commit;
+    if commit.len() != 40 || !commit.chars().all(|c| c.is_ascii_hexdigit()) {
+        v.push(format!(
+            "code_under_test_commit {commit:?} is not a full SHA-1"
+        ));
+    }
+    let bound = [
+        ("acceptance.toml", &m.acceptance_sha256),
+        ("placement.toml", &m.placement_sha256),
+        ("kv_contract.toml", &m.kv_contract_sha256),
+    ];
+    for (file, recorded) in bound {
+        match sha256_file(&spec_dir.join(file)) {
+            Ok(actual) if actual == recorded.to_ascii_lowercase() => {}
+            Ok(actual) => v.push(format!(
+                "{file}: bundle recorded {recorded}, frozen spec is {actual}"
+            )),
+            Err(e) => v.push(e),
+        }
+    }
+    v
+}
+
+fn list_files(root: &Path) -> Result<Vec<String>, String> {
+    let mut out = Vec::new();
+    let mut stack = vec![root.to_path_buf()];
+    while let Some(dir) = stack.pop() {
+        let entries = fs::read_dir(&dir).map_err(|e| format!("{}: {e}", dir.display()))?;
+        for entry in entries {
+            let path = entry.map_err(|e| format!("{}: {e}", dir.display()))?.path();
+            if path.is_dir() {
+                stack.push(path);
+            } else if let Ok(rel) = path.strip_prefix(root) {
+                let rel: Vec<String> = rel
+                    .components()
+                    .map(|c| c.as_os_str().to_string_lossy().into_owned())
+                    .collect();
+                out.push(rel.join("/"));
+            }
+        }
+    }
+    out.sort();
+    Ok(out)
+}
diff --git a/crates/aien-campaign-verifier/src/ids.rs b/crates/aien-campaign-verifier/src/ids.rs
new file mode 100644
index 00000000..13929332
--- /dev/null
+++ b/crates/aien-campaign-verifier/src/ids.rs
@@ -0,0 +1,19 @@
+use serde::{Deserialize, Serialize};
+use std::fmt;
+
+/// Runtime incarnation handle as serialized in campaign journals.
+///
+/// Opaque and 128 bits. Equality compares every field. There is deliberately no
+/// conversion to a narrower integer (SPEC.md Section 2.1).
+#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord, Serialize, Deserialize)]
+pub struct SequenceId {
+    pub boot_epoch: u64,
+    pub slot: u32,
+    pub generation: u32,
+}
+
+impl fmt::Display for SequenceId {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        write!(f, "{}:{}:{}", self.boot_epoch, self.slot, self.generation)
+    }
+}
diff --git a/crates/aien-campaign-verifier/src/kv.rs b/crates/aien-campaign-verifier/src/kv.rs
new file mode 100644
index 00000000..d92d286c
--- /dev/null
+++ b/crates/aien-campaign-verifier/src/kv.rs
@@ -0,0 +1,603 @@
+//! KV conservation: rebuild allocator state from the mutation journal and compare it with the
+//! raw census and with AIEN's reported counters (SPEC.md Section 7).
+//!
+//! Gate 4 adds prefix-lease events; lease references then count toward `refcount(block)`.
+
+use crate::ids::SequenceId;
+use serde::{Deserialize, Serialize};
+use std::collections::{BTreeMap, BTreeSet};
+
+pub type BlockId = u32;
+
+/// One line of `kv_allocations.jsonl`.
+#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
+#[serde(tag = "event", rename_all = "snake_case")]
+pub enum KvEvent {
+    SequenceAllocated {
+        seq: SequenceId,
+        blocks: Vec<BlockId>,
+    },
+    Forked {
+        parent: SequenceId,
+        child: SequenceId,
+    },
+    BlockAppended {
+        seq: SequenceId,
+        block: BlockId,
+    },
+    CowFault {
+        seq: SequenceId,
+        index: usize,
+        old_block: BlockId,
+        new_block: BlockId,
+    },
+    /// Logged at dispatch with the resolved target block (SPEC.md invariant I2).
+    BlockWrite {
+        seq: SequenceId,
+        block: BlockId,
+    },
+    Released {
+        seq: SequenceId,
+    },
+}
+
+/// Allocator state as reconstructed by the verifier. Blocks absent from `refcounts` are free.
+#[derive(Debug, Clone, Default, PartialEq, Eq)]
+pub struct KvState {
+    pub pool_total: u32,
+    pub refcounts: BTreeMap<BlockId, u32>,
+    pub tables: BTreeMap<SequenceId, Vec<BlockId>>,
+    pub cow_faults: u64,
+}
+
+impl KvState {
+    pub fn new(pool_total: u32) -> Self {
+        Self {
+            pool_total,
+            ..Default::default()
+        }
+    }
+
+    fn take_free(&mut self, block: BlockId, at: usize, violations: &mut Vec<String>) -> bool {
+        if block >= self.pool_total {
+            violations.push(format!(
+                "event {at}: block {block} outside pool of {}",
+                self.pool_total
+            ));
+            return false;
+        }
+        if self.refcounts.contains_key(&block) {
+            violations.push(format!(
+                "event {at}: block {block} allocated while still referenced"
+            ));
+            return false;
+        }
+        self.refcounts.insert(block, 1);
+        true
+    }
+
+    fn decref(&mut self, block: BlockId, at: usize, violations: &mut Vec<String>) {
+        let Some(rc) = self.refcounts.get(&block).copied() else {
+            violations.push(format!("event {at}: refcount underflow on block {block}"));
+            return;
+        };
+        if rc > 1 {
+            self.refcounts.insert(block, rc - 1);
+        } else {
+            self.refcounts.remove(&block);
+        }
+    }
+}
+
+/// Replays the journal. Invalid events are reported and not applied, so one defect does not
+/// cascade into unrelated violations.
+pub fn replay(pool_total: u32, events: &[KvEvent]) -> (KvState, Vec<String>) {
+    let mut s = KvState::new(pool_total);
+    let mut v = Vec::new();
+
+    for (at, event) in events.iter().enumerate() {
+        match event {
+            KvEvent::SequenceAllocated { seq, blocks } => {
+                if s.tables.contains_key(seq) {
+                    v.push(format!("event {at}: sequence {seq} allocated while live"));
+                    continue;
+                }
+                let mut table = Vec::with_capacity(blocks.len());
+                for &b in blocks {
+                    if s.take_free(b, at, &mut v) {
+                        table.push(b);
+                    }
+                }
+                s.tables.insert(*seq, table);
+            }
+            KvEvent::Forked { parent, child } => {
+                if s.tables.contains_key(child) {
+                    v.push(format!("event {at}: fork into existing sequence {child}"));
+                    continue;
+                }
+                let Some(table) = s.tables.get(parent).cloned() else {
+                    v.push(format!("event {at}: fork from unknown parent {parent}"));
+                    continue;
+                };
+                for &b in &table {
+                    *s.refcounts.entry(b).or_insert(0) += 1;
+                }
+                s.tables.insert(*child, table);
+            }
+            KvEvent::BlockAppended { seq, block } => {
+                if !s.tables.contains_key(seq) {
+                    v.push(format!("event {at}: append to unknown sequence {seq}"));
+                    continue;
+                }
+                if s.take_free(*block, at, &mut v) {
+                    if let Some(t) = s.tables.get_mut(seq) {
+                        t.push(*block);
+                    }
+                }
+            }
+            KvEvent::CowFault {
+                seq,
+                index,
+                old_block,
+                new_block,
+            } => {
+                let current = s.tables.get(seq).and_then(|t| t.get(*index)).copied();
+                if current != Some(*old_block) {
+                    v.push(format!(
+                        "event {at}: COW on {seq} index {index} expected block {old_block}, table has {current:?}"
+                    ));
+                    continue;
+                }
+                if s.refcounts.get(old_block).copied().unwrap_or(0) < 2 {
+                    v.push(format!(
+                        "event {at}: COW copy of private block {old_block} by {seq}"
+                    ));
+                }
+                if !s.take_free(*new_block, at, &mut v) {
+                    continue;
+                }
+                s.decref(*old_block, at, &mut v);
+                if let Some(t) = s.tables.get_mut(seq) {
+                    t[*index] = *new_block;
+                }
+                s.cow_faults += 1;
+            }
+            KvEvent::BlockWrite { seq, block } => {
+                let owns = s.tables.get(seq).is_some_and(|t| t.contains(block));
+                if !owns {
+                    v.push(format!(
+                        "event {at}: {seq} wrote block {block} it does not reference"
+                    ));
+                    continue;
+                }
+                let rc = s.refcounts.get(block).copied().unwrap_or(0);
+                if rc > 1 {
+                    v.push(format!(
+                        "event {at}: {seq} wrote shared block {block} (refcount {rc}) without COW"
+                    ));
+                }
+            }
+            KvEvent::Released { seq } => {
+                let Some(table) = s.tables.remove(seq) else {
+                    v.push(format!(
+                        "event {at}: release of unknown or already released sequence {seq}"
+                    ));
+                    continue;
+                };
+                for b in table {
+                    s.decref(b, at, &mut v);
+                }
+            }
+        }
+    }
+
+    (s, v)
+}
+
+#[derive(Debug, Clone, Deserialize)]
+pub struct CensusBlock {
+    pub block_id: BlockId,
+    pub ref_count: u32,
+}
+
+#[derive(Debug, Clone, Deserialize)]
+pub struct CensusSequence {
+    pub seq: SequenceId,
+    pub block_ids: Vec<BlockId>,
+}
+
+/// `kv_census.json`: raw allocator state dumped at the end of a run.
+#[derive(Debug, Clone, Deserialize)]
+pub struct KvCensus {
+    pub pool_total: u32,
+    pub free_blocks: Vec<BlockId>,
+    pub blocks: Vec<CensusBlock>,
+    pub sequences: Vec<CensusSequence>,
+}
+
+/// `kv_metrics.json`: AIEN's own `KvMetrics`. Unknown fields are ignored.
+#[derive(Debug, Clone, Deserialize)]
+pub struct ReportedKvMetrics {
+    pub physical_pages: usize,
+    pub logical_pages: usize,
+    pub shared_pages: usize,
+    pub private_pages: usize,
+    pub cow_faults: usize,
+    pub used_blocks: usize,
+}
+
+/// Conservation equations evaluated on the census alone.
+pub fn check_census_conservation(c: &KvCensus) -> Vec<String> {
+    let mut v = Vec::new();
+
+    let mut free = BTreeSet::new();
+    for &b in &c.free_blocks {
+        if b >= c.pool_total {
+            v.push(format!("free block {b} outside pool of {}", c.pool_total));
+        }
+        if !free.insert(b) {
+            v.push(format!("block {b} appears twice in the free set"));
+        }
+    }
+
+    let mut recorded = BTreeMap::new();
+    for blk in c.blocks.iter().filter(|b| b.ref_count > 0) {
+        if recorded.insert(blk.block_id, blk.ref_count).is_some() {
+            v.push(format!("block {} has two census entries", blk.block_id));
+        }
+    }
+
+    let mut live = BTreeSet::new();
+    let mut referenced: BTreeMap<BlockId, u32> = BTreeMap::new();
+    for s in &c.sequences {
+        if !live.insert(s.seq) {
+            v.push(format!("duplicate live sequence {}", s.seq));
+        }
+        for &b in &s.block_ids {
+            *referenced.entry(b).or_insert(0) += 1;
+        }
+    }
+
+    if recorded.len() + free.len() != c.pool_total as usize {
+        v.push(format!(
+            "allocated {} + free {} != pool_total {}",
+            recorded.len(),
+            free.len(),
+            c.pool_total
+        ));
+    }
+    for b in referenced.keys() {
+        if free.contains(b) {
+            v.push(format!("referenced block {b} is in the free set"));
+        } else if !recorded.contains_key(b) {
+            v.push(format!("referenced block {b} has no refcount"));
+        }
+    }
+    for (b, rc) in &recorded {
+        let refs = referenced.get(b).copied().unwrap_or(0);
+        if refs == 0 {
+            v.push(format!("unreferenced block {b} is outside the free set"));
+        } else if refs != *rc {
+            v.push(format!(
+                "block {b}: refcount {rc} but {refs} table references"
+            ));
+        }
+    }
+
+    v
+}
+
+/// Journal replay must equal the raw census.
+pub fn check_replay_matches_census(r: &KvState, c: &KvCensus) -> Vec<String> {
+    let mut v = Vec::new();
+
+    if r.pool_total != c.pool_total {
+        v.push(format!(
+            "pool_total: contract {} vs census {}",
+            r.pool_total, c.pool_total
+        ));
+    }
+
+    let census_tables: BTreeMap<SequenceId, &Vec<BlockId>> =
+        c.sequences.iter().map(|s| (s.seq, &s.block_ids)).collect();
+    for (seq, table) in &r.tables {
+        match census_tables.get(seq) {
+            None => v.push(format!(
+                "sequence {seq} live in journal replay, absent from census"
+            )),
+            Some(t) if *t != table => v.push(format!(
+                "sequence {seq} block table differs: replay {table:?}, census {t:?}"
+            )),
+            Some(_) => {}
+        }
+    }
+    for seq in census_tables.keys() {
+        if !r.tables.contains_key(seq) {
+            v.push(format!(
+                "sequence {seq} live in census, absent from journal replay"
+            ));
+        }
+    }
+
+    let census_refs: BTreeMap<BlockId, u32> = c
+        .blocks
+        .iter()
+        .filter(|b| b.ref_count > 0)
+        .map(|b| (b.block_id, b.ref_count))
+        .collect();
+    let keys: BTreeSet<BlockId> = census_refs
+        .keys()
+        .chain(r.refcounts.keys())
+        .copied()
+        .collect();
+    for b in keys {
+        let replayed = r.refcounts.get(&b).copied().unwrap_or(0);
+        let census = census_refs.get(&b).copied().unwrap_or(0);
+        if replayed != census {
+            v.push(format!(
+                "block {b}: replay refcount {replayed}, census refcount {census}"
+            ));
+        }
+    }
+
+    let census_free: BTreeSet<BlockId> = c.free_blocks.iter().copied().collect();
+    let replay_free: BTreeSet<BlockId> = (0..r.pool_total)
+        .filter(|b| !r.refcounts.contains_key(b))
+        .collect();
+    for b in replay_free.difference(&census_free) {
+        v.push(format!("block {b} free in replay, not free in census"));
+    }
+    for b in census_free.difference(&replay_free) {
+        v.push(format!("block {b} free in census, not free in replay"));
+    }
+
+    v
+}
+
+/// Journal replay must equal AIEN's reported counters.
+pub fn check_replay_matches_metrics(r: &KvState, m: &ReportedKvMetrics) -> Vec<String> {
+    let physical = r.refcounts.len();
+    let logical: usize = r.tables.values().map(Vec::len).sum();
+    let shared = r.refcounts.values().filter(|&&rc| rc > 1).count();
+    let private = r.refcounts.values().filter(|&&rc| rc == 1).count();
+
+    let pairs = [
+        ("physical_pages", physical, m.physical_pages),
+        ("used_blocks", physical, m.used_blocks),
+        ("logical_pages", logical, m.logical_pages),
+        ("shared_pages", shared, m.shared_pages),
+        ("private_pages", private, m.private_pages),
+        ("cow_faults", r.cow_faults as usize, m.cow_faults),
+    ];
+    pairs
+        .iter()
+        .filter(|(_, replayed, reported)| replayed != reported)
+        .map(|(name, replayed, reported)| format!("{name}: replay {replayed}, reported {reported}"))
+        .collect()
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+
+    fn sid(slot: u32) -> SequenceId {
+        SequenceId {
+            boot_epoch: 1,
+            slot,
+            generation: 1,
+        }
+    }
+
+    fn census_of(s: &KvState) -> KvCensus {
+        KvCensus {
+            pool_total: s.pool_total,
+            free_blocks: (0..s.pool_total)
+                .filter(|b| !s.refcounts.contains_key(b))
+                .collect(),
+            blocks: s
+                .refcounts
+                .iter()
+                .map(|(&block_id, &ref_count)| CensusBlock {
+                    block_id,
+                    ref_count,
+                })
+                .collect(),
+            sequences: s
+                .tables
+                .iter()
+                .map(|(&seq, t)| CensusSequence {
+                    seq,
+                    block_ids: t.clone(),
+                })
+                .collect(),
+        }
+    }
+
+    #[test]
+    fn fork_diverge_release_conserves() {
+        let (p, a, b) = (sid(0), sid(1), sid(2));
+        let events = vec![
+            KvEvent::SequenceAllocated {
+                seq: p,
+                blocks: vec![0, 1],
+            },
+            KvEvent::Forked {
+                parent: p,
+                child: a,
+            },
+            KvEvent::Forked {
+                parent: p,
+                child: b,
+            },
+            KvEvent::CowFault {
+                seq: a,
+                index: 1,
+                old_block: 1,
+                new_block: 2,
+            },
+            KvEvent::BlockWrite { seq: a, block: 2 },
+        ];
+        let (state, violations) = replay(8, &events);
+        assert!(violations.is_empty(), "{violations:?}");
+        assert_eq!(state.refcounts.get(&0), Some(&3));
+        assert_eq!(state.refcounts.get(&1), Some(&2));
+        assert_eq!(state.refcounts.get(&2), Some(&1));
+
+        let census = census_of(&state);
+        assert!(check_census_conservation(&census).is_empty());
+        assert!(check_replay_matches_census(&state, &census).is_empty());
+
+        let mut events = events;
+        events.extend([
+            KvEvent::Released { seq: a },
+            KvEvent::Released { seq: b },
+            KvEvent::Released { seq: p },
+        ]);
+        let (state, violations) = replay(8, &events);
+        assert!(violations.is_empty(), "{violations:?}");
+        assert!(state.refcounts.is_empty());
+        assert!(state.tables.is_empty());
+    }
+
+    #[test]
+    fn duplicate_fork_is_a_violation_and_changes_nothing() {
+        let (p, a) = (sid(0), sid(1));
+        let fork = KvEvent::Forked {
+            parent: p,
+            child: a,
+        };
+        let events = vec![
+            KvEvent::SequenceAllocated {
+                seq: p,
+                blocks: vec![0],
+            },
+            fork.clone(),
+            fork,
+        ];
+        let (state, violations) = replay(4, &events);
+        assert_eq!(violations.len(), 1);
+        assert!(violations[0].contains("fork into existing sequence"));
+        assert_eq!(state.refcounts.get(&0), Some(&2));
+    }
+
+    #[test]
+    fn double_release_is_a_violation_without_underflow() {
+        let p = sid(0);
+        let events = vec![
+            KvEvent::SequenceAllocated {
+                seq: p,
+                blocks: vec![0],
+            },
+            KvEvent::Released { seq: p },
+            KvEvent::Released { seq: p },
+        ];
+        let (state, violations) = replay(4, &events);
+        assert_eq!(violations.len(), 1);
+        assert!(violations[0].contains("already released"));
+        assert!(state.refcounts.is_empty());
+    }
+
+    #[test]
+    fn write_to_shared_block_is_an_isolation_violation() {
+        let (p, a) = (sid(0), sid(1));
+        let events = vec![
+            KvEvent::SequenceAllocated {
+                seq: p,
+                blocks: vec![0],
+            },
+            KvEvent::Forked {
+                parent: p,
+                child: a,
+            },
+            KvEvent::BlockWrite { seq: a, block: 0 },
+        ];
+        let (_, violations) = replay(4, &events);
+        assert_eq!(violations.len(), 1);
+        assert!(violations[0].contains("without COW"));
+    }
+
+    #[test]
+    fn cow_of_private_block_is_flagged() {
+        let p = sid(0);
+        let events = vec![
+            KvEvent::SequenceAllocated {
+                seq: p,
+                blocks: vec![0],
+            },
+            KvEvent::CowFault {
+                seq: p,
+                index: 0,
+                old_block: 0,
+                new_block: 1,
+            },
+        ];
+        let (_, violations) = replay(4, &events);
+        assert!(violations.iter().any(|v| v.contains("private block")));
+    }
+
+    #[test]
+    fn journal_omitting_a_release_disagrees_with_census() {
+        let p = sid(0);
+        let journal = vec![KvEvent::SequenceAllocated {
+            seq: p,
+            blocks: vec![0, 1],
+        }];
+        let (state, _) = replay(4, &journal);
+        // The allocator actually released p, but the journal never logged it.
+        let census = census_of(&KvState::new(4));
+        let violations = check_replay_matches_census(&state, &census);
+        assert!(violations.iter().any(|v| v.contains("absent from census")));
+    }
+
+    #[test]
+    fn referenced_block_in_free_set_breaks_conservation() {
+        let p = sid(0);
+        let (state, _) = replay(
+            4,
+            &[KvEvent::SequenceAllocated {
+                seq: p,
+                blocks: vec![0],
+            }],
+        );
+        let mut census = census_of(&state);
+        census.free_blocks.push(0);
+        let violations = check_census_conservation(&census);
+        assert!(violations
+            .iter()
+            .any(|v| v.contains("referenced block 0 is in the free set")));
+    }
+
+    #[test]
+    fn reported_metrics_must_match_replay() {
+        let (p, a) = (sid(0), sid(1));
+        let (state, _) = replay(
+            4,
+            &[
+                KvEvent::SequenceAllocated {
+                    seq: p,
+                    blocks: vec![0, 1],
+                },
+                KvEvent::Forked {
+                    parent: p,
+                    child: a,
+                },
+            ],
+        );
+        let honest = ReportedKvMetrics {
+            physical_pages: 2,
+            logical_pages: 4,
+            shared_pages: 2,
+            private_pages: 0,
+            cow_faults: 0,
+            used_blocks: 2,
+        };
+        assert!(check_replay_matches_metrics(&state, &honest).is_empty());
+
+        let buggy = ReportedKvMetrics {
+            shared_pages: 1,
+            private_pages: 1,
+            ..honest
+        };
+        assert_eq!(check_replay_matches_metrics(&state, &buggy).len(), 2);
+    }
+}
diff --git a/crates/aien-campaign-verifier/src/lib.rs b/crates/aien-campaign-verifier/src/lib.rs
new file mode 100644
index 00000000..0f87cf6a
--- /dev/null
+++ b/crates/aien-campaign-verifier/src/lib.rs
@@ -0,0 +1,129 @@
+//! Independent verifier for campaign C1 (`docs/campaigns/c1/SPEC.md`).
+//!
+//! Consumes a frozen evidence bundle and the frozen spec directory, and emits PASS/FAIL per
+//! check. It links no crate under test: every judgement is rebuilt from raw bundle files.
+
+pub mod bundle;
+pub mod ids;
+pub mod kv;
+pub mod placement;
+pub mod report;
+
+use bundle::Manifest;
+use kv::{KvCensus, KvEvent, ReportedKvMetrics};
+use placement::{OpRecord, PlacementSpec, WitnessEvent};
+use report::{CheckResult, Report};
+use serde::de::DeserializeOwned;
+use serde::Deserialize;
+use std::collections::BTreeMap;
+use std::fs;
+use std::path::Path;
+
+pub fn load_json<T: DeserializeOwned>(path: &Path) -> Result<T, String> {
+    let text = fs::read_to_string(path).map_err(|e| format!("{}: {e}", path.display()))?;
+    serde_json::from_str(&text).map_err(|e| format!("{}: {e}", path.display()))
+}
+
+pub fn load_jsonl<T: DeserializeOwned>(path: &Path) -> Result<Vec<T>, String> {
+    let text = fs::read_to_string(path).map_err(|e| format!("{}: {e}", path.display()))?;
+    text.lines()
+        .enumerate()
+        .filter(|(_, line)| !line.trim().is_empty())
+        .map(|(n, line)| {
+            serde_json::from_str(line).map_err(|e| format!("{}:{}: {e}", path.display(), n + 1))
+        })
+        .collect()
+}
+
+pub fn load_toml<T: DeserializeOwned>(path: &Path) -> Result<T, String> {
+    let text = fs::read_to_string(path).map_err(|e| format!("{}: {e}", path.display()))?;
+    toml::from_str(&text).map_err(|e| format!("{}: {e}", path.display()))
+}
+
+#[derive(Debug, Deserialize)]
+struct KvContract {
+    profiles: BTreeMap<String, KvProfile>,
+}
+
+#[derive(Debug, Deserialize)]
+struct KvProfile {
+    num_blocks: u32,
+}
+
+/// Pool size comes from the frozen contract, never from the code under test.
+fn contract_pool_total(manifest: &Manifest, spec_dir: &Path) -> Result<u32, String> {
+    let contract: KvContract = load_toml(&spec_dir.join("kv_contract.toml"))?;
+    contract
+        .profiles
+        .get(&manifest.kv_profile)
+        .map(|p| p.num_blocks)
+        .ok_or_else(|| format!("kv_profile {} not in kv_contract.toml", manifest.kv_profile))
+}
+
+fn check_kv(bundle: &Path, pool_total: u32, report: &mut Report) -> Result<(), String> {
+    let events: Vec<KvEvent> = load_jsonl(&bundle.join("kv_allocations.jsonl"))?;
+    let census: KvCensus = load_json(&bundle.join("kv_census.json"))?;
+    let metrics: ReportedKvMetrics = load_json(&bundle.join("kv_metrics.json"))?;
+
+    let (state, replay_violations) = kv::replay(pool_total, &events);
+    report.push(CheckResult::from_violations(
+        "KV journal replay (identity, isolation, idempotent release)",
+        replay_violations,
+    ));
+    report.push(CheckResult::from_violations(
+        "KV census conservation",
+        kv::check_census_conservation(&census),
+    ));
+    report.push(CheckResult::from_violations(
+        "KV replay == raw census",
+        kv::check_replay_matches_census(&state, &census),
+    ));
+    report.push(CheckResult::from_violations(
+        "KV replay == reported metrics",
+        kv::check_replay_matches_metrics(&state, &metrics),
+    ));
+    Ok(())
+}
+
+fn check_placement(bundle: &Path, spec_dir: &Path) -> Result<Vec<String>, String> {
+    let spec: PlacementSpec = load_toml(&spec_dir.join("placement.toml"))?;
+    let records: Vec<OpRecord> = load_jsonl(&bundle.join("op_records.jsonl"))?;
+    let witness: Vec<WitnessEvent> = load_jsonl(&bundle.join("witness.jsonl"))?;
+    Ok(placement::check_placement(&spec, &records, &witness))
+}
+
+/// Runs every implemented check. A missing or unreadable input is itself a FAIL.
+pub fn verify_bundle(bundle: &Path, spec_dir: &Path) -> Report {
+    let mut report = Report::default();
+
+    report.push(CheckResult::from_violations(
+        "bundle integrity (sha256sums)",
+        bundle::check_sha256sums(bundle),
+    ));
+
+    let manifest = load_json::<Manifest>(&bundle.join("manifest.json"));
+    report.push(CheckResult::from_violations(
+        "manifest binds frozen spec",
+        match &manifest {
+            Ok(m) => bundle::check_manifest_against_spec(m, spec_dir),
+            Err(e) => vec![e.clone()],
+        },
+    ));
+
+    let pool_total = manifest.and_then(|m| contract_pool_total(&m, spec_dir));
+    match pool_total {
+        Ok(total) => {
+            if let Err(e) = check_kv(bundle, total, &mut report) {
+                report.push(CheckResult::from_violations("KV evidence present", vec![e]));
+            }
+        }
+        Err(e) => report.push(CheckResult::from_violations("KV contract profile", vec![e])),
+    }
+
+    report.push(CheckResult::from_violations(
+        "device placement (dispatch record == witness == placement.toml)",
+        check_placement(bundle, spec_dir).unwrap_or_else(|e| vec![e]),
+    ));
+
+    report
+}
diff --git a/crates/aien-campaign-verifier/src/main.rs b/crates/aien-campaign-verifier/src/main.rs
new file mode 100644
index 00000000..b062e388
--- /dev/null
+++ b/crates/aien-campaign-verifier/src/main.rs
@@ -0,0 +1,18 @@
+use std::path::Path;
+use std::process::ExitCode;
+
+fn main() -> ExitCode {
+    let args: Vec<String> = std::env::args().collect();
+    if args.len() != 3 {
+        eprintln!("usage: aien-campaign-verifier <bundle_dir> <spec_dir>");
+        return ExitCode::from(2);
+    }
+
+    let report = aien_campaign_verifier::verify_bundle(Path::new(&args[1]), Path::new(&args[2]));
+    print!("{}", report.render());
+    if report.passed() {
+        ExitCode::SUCCESS
+    } else {
+        ExitCode::FAILURE
+    }
+}
diff --git a/crates/aien-campaign-verifier/src/placement.rs b/crates/aien-campaign-verifier/src/placement.rs
new file mode 100644
index 00000000..e0ccdf59
--- /dev/null
+++ b/crates/aien-campaign-verifier/src/placement.rs
@@ -0,0 +1,252 @@
+//! Device placement: AIEN's per-op dispatch record must agree with the external device witness
+//! and with `placement.toml` (SPEC.md Section 6).
+
+use serde::Deserialize;
+use std::collections::{BTreeMap, BTreeSet};
+
+/// Allowlist entries with this prefix are not yet frozen and never match.
+pub const PENDING_PREFIX: &str = "PENDING";
+pub const CPU: &str = "cpu";
+
+#[derive(Debug, Clone, Deserialize)]
+pub struct OpPolicy {
+    pub allowed: Vec<String>,
+    #[serde(default)]
+    pub kernels: Vec<String>,
+}
+
+#[derive(Debug, Clone, Deserialize)]
+pub struct PlacementSpec {
+    pub ops: BTreeMap<String, OpPolicy>,
+}
+
+/// One line of `op_records.jsonl`, written by AIEN.
+#[derive(Debug, Clone, Deserialize)]
+pub struct OpRecord {
+    pub op_call_id: u64,
+    pub op: String,
+    pub reported_device: String,
+    #[serde(default)]
+    pub fallback: bool,
+}
+
+/// One line of `witness.jsonl`, written by the external device witness.
+#[derive(Debug, Clone, Deserialize)]
+pub struct WitnessEvent {
+    pub op_call_id: u64,
+    pub kernel: String,
+    pub completed: bool,
+}
+
+/// Glob match supporting `*` only.
+pub fn glob_match(pattern: &str, text: &str) -> bool {
+    let parts: Vec<&str> = pattern.split('*').collect();
+    if parts.len() == 1 {
+        return pattern == text;
+    }
+    let first = parts[0];
+    let last = parts[parts.len() - 1];
+    if text.len() < first.len() + last.len() || !text.starts_with(first) || !text.ends_with(last) {
+        return false;
+    }
+    let mut rest = &text[first.len()..text.len() - last.len()];
+    for part in &parts[1..parts.len() - 1] {
+        match rest.find(part) {
+            Some(i) => rest = &rest[i + part.len()..],
+            None => return false,
+        }
+    }
+    true
+}
+
+pub fn check_placement(
+    spec: &PlacementSpec,
+    records: &[OpRecord],
+    witness: &[WitnessEvent],
+) -> Vec<String> {
+    let mut v = Vec::new();
+
+    let mut kernels_by_call: BTreeMap<u64, Vec<&WitnessEvent>> = BTreeMap::new();
+    for w in witness {
+        kernels_by_call.entry(w.op_call_id).or_default().push(w);
+    }
+
+    let mut seen = BTreeSet::new();
+    for r in records {
+        let id = r.op_call_id;
+        if !seen.insert(id) {
+            v.push(format!("op_call {id}: duplicate op_call_id"));
+        }
+        let Some(policy) = spec.ops.get(&r.op) else {
+            v.push(format!("op_call {id}: op {} not in placement spec", r.op));
+            continue;
+        };
+        if !policy.allowed.iter().any(|d| d == &r.reported_device) {
+            v.push(format!(
+                "op_call {id}: {} ran on {}, allowed {:?}",
+                r.op, r.reported_device, policy.allowed
+            ));
+        }
+        if r.fallback {
+            v.push(format!("op_call {id}: {} fell back", r.op));
+        }
+
+        let kernels = kernels_by_call.get(&id).map(Vec::as_slice).unwrap_or(&[]);
+        if r.reported_device == CPU {
+            if !kernels.is_empty() {
+                v.push(format!(
+                    "op_call {id}: {} reported cpu but witness saw {} kernel(s)",
+                    r.op,
+                    kernels.len()
+                ));
+            }
+            continue;
+        }
+        if kernels.is_empty() {
+            v.push(format!(
+                "op_call {id}: {} reported {} but witness saw no kernel",
+                r.op, r.reported_device
+            ));
+        }
+        for k in kernels {
+            if !k.completed {
+                v.push(format!(
+                    "op_call {id}: kernel {} did not complete",
+                    k.kernel
+                ));
+            }
+            let allowed = policy
+                .kernels
+                .iter()
+                .any(|p| !p.starts_with(PENDING_PREFIX) && glob_match(p, &k.kernel));
+            if !allowed {
+                v.push(format!(
+                    "op_call {id}: kernel {} not in the frozen allowlist for {}",
+                    k.kernel, r.op
+                ));
+            }
+        }
+    }
+
+    for id in kernels_by_call.keys() {
+        if !seen.contains(id) {
+            v.push(format!(
+                "witness saw kernel(s) for op_call {id} with no dispatch record"
+            ));
+        }
+    }
+
+    v
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+
+    fn spec() -> PlacementSpec {
+        toml::from_str(
+            r#"
+            [ops.rmsnorm]
+            allowed = ["cpu"]
+
+            [ops.paged_attention_batch]
+            allowed = ["gb10"]
+            kernels = ["*paged_attention_bf16*"]
+
+            [ops.compute_logits]
+            allowed = ["gb10"]
+            kernels = ["PENDING_GATE0_CUBLAS_GEMV"]
+            "#,
+        )
+        .unwrap()
+    }
+
+    fn rec(id: u64, op: &str, device: &str) -> OpRecord {
+        OpRecord {
+            op_call_id: id,
+            op: op.into(),
+            reported_device: device.into(),
+            fallback: false,
+        }
+    }
+
+    fn kernel(id: u64, name: &str) -> WitnessEvent {
+        WitnessEvent {
+            op_call_id: id,
+            kernel: name.into(),
+            completed: true,
+        }
+    }
+
+    #[test]
+    fn glob() {
+        assert!(glob_match(
+            "*paged_attention_bf16*",
+            "void paged_attention_bf16_kernel<128>"
+        ));
+        assert!(glob_match("exact", "exact"));
+        assert!(!glob_match("exact", "exactly"));
+        assert!(glob_match("a*c", "abc"));
+        assert!(!glob_match("ab*bc", "abc"));
+    }
+
+    #[test]
+    fn honest_hybrid_run_passes() {
+        let records = [
+            rec(1, "rmsnorm", "cpu"),
+            rec(2, "paged_attention_batch", "gb10"),
+        ];
+        let witness = [kernel(2, "paged_attention_bf16_kernel")];
+        assert!(check_placement(&spec(), &records, &witness).is_empty());
+    }
+
+    #[test]
+    fn required_gpu_op_on_cpu_fails() {
+        let records = [rec(1, "paged_attention_batch", "cpu")];
+        assert!(!check_placement(&spec(), &records, &[]).is_empty());
+    }
+
+    #[test]
+    fn backend_claiming_gpu_without_kernel_fails() {
+        let records = [rec(1, "paged_attention_batch", "gb10")];
+        let v = check_placement(&spec(), &records, &[]);
+        assert!(v.iter().any(|m| m.contains("witness saw no kernel")));
+    }
+
+    #[test]
+    fn kernel_under_cpu_report_fails() {
+        let records = [rec(1, "rmsnorm", "cpu")];
+        let witness = [kernel(1, "rmsnorm_kernel")];
+        let v = check_placement(&spec(), &records, &witness);
+        assert!(v.iter().any(|m| m.contains("reported cpu")));
+    }
+
+    #[test]
+    fn wrong_kernel_symbol_fails() {
+        let records = [rec(1, "paged_attention_batch", "gb10")];
+        let witness = [kernel(1, "some_other_kernel")];
+        let v = check_placement(&spec(), &records, &witness);
+        assert!(v.iter().any(|m| m.contains("not in the frozen allowlist")));
+    }
+
+    #[test]
+    fn pending_allowlist_never_passes() {
+        let records = [rec(1, "compute_logits", "gb10")];
+        let witness = [kernel(1, "PENDING_GATE0_CUBLAS_GEMV")];
+        assert!(!check_placement(&spec(), &records, &witness).is_empty());
+    }
+
+    #[test]
+    fn fallback_fails() {
+        let mut r = rec(1, "rmsnorm", "cpu");
+        r.fallback = true;
+        assert!(!check_placement(&spec(), &[r], &[]).is_empty());
+    }
+
+    #[test]
+    fn orphan_witness_kernel_fails() {
+        let witness = [kernel(9, "paged_attention_bf16_kernel")];
+        let v = check_placement(&spec(), &[], &witness);
+        assert!(v.iter().any(|m| m.contains("no dispatch record")));
+    }
+}
diff --git a/crates/aien-campaign-verifier/src/report.rs b/crates/aien-campaign-verifier/src/report.rs
new file mode 100644
index 00000000..07ab9d66
--- /dev/null
+++ b/crates/aien-campaign-verifier/src/report.rs
@@ -0,0 +1,60 @@
+use serde::Serialize;
+use std::fmt::Write as _;
+
+#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize)]
+pub enum Verdict {
+    Pass,
+    Fail,
+}
+
+#[derive(Debug, Clone, Serialize)]
+pub struct CheckResult {
+    pub name: String,
+    pub verdict: Verdict,
+    pub violations: Vec<String>,
+}
+
+impl CheckResult {
+    pub fn from_violations(name: impl Into<String>, violations: Vec<String>) -> Self {
+        let verdict = if violations.is_empty() {
+            Verdict::Pass
+        } else {
+            Verdict::Fail
+        };
+        Self {
+            name: name.into(),
+            verdict,
+            violations,
+        }
+    }
+}
+
+#[derive(Debug, Default, Serialize)]
+pub struct Report {
+    pub checks: Vec<CheckResult>,
+}
+
+impl Report {
+    pub fn push(&mut self, check: CheckResult) {
+        self.checks.push(check);
+    }
+
+    pub fn passed(&self) -> bool {
+        self.checks.iter().all(|c| c.verdict == Verdict::Pass)
+    }
+
+    pub fn render(&self) -> String {
+        let mut out = String::new();
+        for check in &self.checks {
+            let tag = match check.verdict {
+                Verdict::Pass => "PASS",
+                Verdict::Fail => "FAIL",
+            };
+            let _ = writeln!(out, "{tag}  {}", check.name);
+            for violation in &check.violations {
+                let _ = writeln!(out, "      {violation}");
+            }
+        }
+        out
+    }
+}
diff --git a/crates/aien-campaign-verifier/tests/independence.rs b/crates/aien-campaign-verifier/tests/independence.rs
new file mode 100644
index 00000000..18c94fa9
--- /dev/null
+++ b/crates/aien-campaign-verifier/tests/independence.rs
@@ -0,0 +1,27 @@
+//! SPEC.md Section 7: the verifier must not depend on any crate under test.
+
+const FORBIDDEN_PREFIXES: [&str; 4] = ["aien-", "spark-", "cortex-", "rad-"];
+
+#[test]
+fn verifier_has_no_dependency_on_code_under_test() {
+    let manifest = std::fs::read_to_string(concat!(env!("CARGO_MANIFEST_DIR"), "/Cargo.toml"))
+        .expect("read Cargo.toml");
+    let value: toml::Value = toml::from_str(&manifest).expect("parse Cargo.toml");
+
+    for section in ["dependencies", "dev-dependencies", "build-dependencies"] {
+        let Some(deps) = value.get(section).and_then(|d| d.as_table()) else {
+            continue;
+        };
+        for (name, spec) in deps {
+            assert!(
+                !FORBIDDEN_PREFIXES.iter().any(|p| name.starts_with(p)),
+                "{name} is workspace code under test"
+            );
+            assert!(spec.get("path").is_none(), "{name} is a path dependency");
+        }
+    }
+    assert!(
+        value.get("target").is_none(),
+        "target-specific dependencies must be reviewed for independence"
+    );
+}
diff --git a/docs/campaigns/c1/SPEC.md b/docs/campaigns/c1/SPEC.md
new file mode 100644
index 00000000..cdfc2a6a
--- /dev/null
+++ b/docs/campaigns/c1/SPEC.md
@@ -0,0 +1,374 @@
+# Campaign C1: Branch-Native Inference Correctness
+
+```text
+campaign_id  = "c1"
+spec_version = 1
+status       = DRAFT (frozen on merge of feat/c1-campaign-spec)
+```
+
+## 0. Question
+
+> Does the native Agent State / scheduler / KV / transformer / GB10 architecture preserve correct inference under branching, scale, and resource pressure?
+
+C1 answers that question and nothing else. It is a correctness campaign. Performance, placement optimization, AEGIS, Cortex, MCP, tool effects, multi-model support, INT4/INT8, and distributed inference are out of scope (Section 11).
+
+Path under test:
+
+```text
+request -> aien-runtime -> aien-scheduler -> SequenceArena -> aien-kv-cache (physical KV/COW)
+        -> native transformer -> aien-inference-abi (BlackwellGb10Backend + ReferenceCpuBackend)
+        -> generated tokens
+```
+
+## 1. Evidence Model
+
+Three roles produce three levels of evidence. They are never merged.
+
+| Role | Does | Must not |
+| ---- | ---- | -------- |
+| Builder / operator | Builds the environment, runs the official harness scripts, fixes infrastructure failures | Decide PASS/FAIL, edit bundles |
+| Verifier | Runs `aien-campaign-verifier` over a frozen bundle against this spec | Modify code under test, interpret results outside the acceptance files |
+| Independent reproducer | Clones the pinned commit on another GB10 and reruns from published instructions | Receive help beyond the published instructions |
+
+Evidence levels: "passed on our machine" (builder), "artifacts satisfy the predefined acceptance criteria" (verifier), "someone else reproduced it" (reproducer). C1 targets the second level. The third is a follow-on.
+
+### 1.1 Freezing rules
+
+1. This spec, `acceptance.toml`, `placement.toml`, `kv_contract.toml`, and the verifier are merged to `main` before the harness emits its first evidence bundle.
+2. Any later change is a dated amendment in Section 14 that bumps `spec_version`, states its reason, and names exactly which gates and claims it supersedes. Results whose acceptance meaning did not change stay valid. Prose-only fixes supersede nothing.
+3. Tolerances are set from the measured noise floor (Section 5.3) and committed before any COW equivalence run they govern.
+
+### 1.2 Pass rules
+
+1. Correctness invariants are binary. Every required trial passes, or the stage fails.
+2. A failing seed or script becomes a permanent regression case.
+3. A gate result is bound to one `main` commit SHA. Any change to code in the transitive path under test reruns every earlier gate. Documentation-only changes do not.
+4. The campaign stops at the first failed gate. Later gates do not run against a commit that failed an earlier gate.
+5. Passing gates may receive annotated tags `c1/gate<N>/pass/<short-sha>` whose annotation carries the bundle manifest digest. Tags are a convenience. The evidence identity is `code commit + bundle digest + spec digest + verifier digest`.
+
+## 2. Identity Model
+
+Losing KV costs computation, not identity.
+
+```text
+LogicalBranchId            durable semantic identity, constant for the life of a branch
+  |-- TokenHistory         authoritative token sequence
+  |-- fork lineage         parent LogicalBranchId, fork_position, fork_ordinal, PrefixSnapshotId
+  |-- sampler coordinates  (LogicalBranchId; generation_step, sample_stream, draw_index)
+  `-- durable journal      StepCommit / ForkCommit / cancel / eviction records
+
+ExecutionLineage           a frozen software and model configuration
+  `-- ExecutionFingerprint
+
+SequenceId                 one runtime incarnation of a branch
+  `-- { boot_epoch: u64, slot: u32, generation: u32 }   (opaque, 128 bits, no truncating conversion)
+
+Physical KV                reconstructible execution state beneath all of the above
+```
+
+### 2.1 SequenceId
+
+- Opaque. Equality compares all three fields. `to_u64()` and every other truncating conversion is removed.
+- Every serialized reference (scheduler events, lineage, KV logs, receipts) carries the full 128-bit value.
+- A branch may hold many `SequenceId`s over its life (preemption, restart). Each binding `SequenceId -> LogicalBranchId` is journaled per epoch.
+
+### 2.2 LogicalBranchId
+
+- 256-bit digest of `(run identity, parent LogicalBranchId, fork_position, fork_ordinal)`. Root branches derive from the run seed.
+- Keys the sampler, `TokenHistory`, lineage, `PrefixSnapshot` leases, and every verifier identity check.
+
+### 2.3 TokenHistory
+
+Owned per branch: original input tokens, inherited prefix boundary, branch-specific input, every accepted generated token. A token is appended before it counts as committed. `rec.prompt` is not recovery state.
+
+### 2.4 PrefixSnapshot
+
+```text
+PrefixSnapshot { snapshot_id, fork_position, block_ids[], partial_block_valid_tokens, digest }
+```
+
+Records the physical block IDs at fork time. It is never resolved later through a parent's mutable block table.
+
+### 2.5 BranchCheckpoint
+
+```text
+BranchCheckpoint { logical_branch_id, parent_id, fork_position, prefix_snapshot_id,
+                   prefix_lease: Held | Evicted, token_history_digest, recovery }
+```
+
+Preemption drops the private suffix and keeps the prefix lease. Readmission reuses the exact leased prefix and recomputes only the divergent suffix. If the lease was evicted, recovery is a full `TokenHistory` recompute.
+
+Lease eviction is atomic: mark every affected suspended lease invalid, journal the eviction, release those suspended references, decrement physical refcounts, free only blocks that reach zero. Active references are never removed by a snapshot eviction. The scheduler reclaims private suffixes before suspended-only prefixes.
+
+### 2.6 ExecutionFingerprint
+
+Runtime binary sha256, runtime and scheduler schema versions, GPU kernel and library sha256, model manifest sha256, tokenizer sha256, `placement.toml` sha256, `kv_contract.toml` sha256, sampler algorithm and version, campaign spec version, relevant ABI versions.
+
+## 3. Invariants
+
+Every stage of every gate checks all applicable invariants. Only performance thresholds vary by stage.
+
+| # | Invariant | Definition |
+| - | --------- | ---------- |
+| I1 | Identity | Parent/child lineage, `LogicalBranchId`, and `SequenceId` bindings survive every transition. No duplicate live `SequenceId`. No child references a nonexistent fork base. |
+| I2 | Isolation | One branch's writes cannot change another branch's state. KV bytes outside legitimately COW-mutated pages are byte-for-byte identical. No write event ever targets a block with refcount > 1 or a leased snapshot block; any writer COWs first. |
+| I3 | Equivalence | COW execution matches independent recomputation from `TokenHistory` within the frozen tolerance, at every generated step (teacher forced). |
+| I4 | Conservation | Shared/private accounting equals actual allocations (Section 7). |
+| I5 | Reclamation | Destroying or cancelling a branch returns every block it solely owned. Release is idempotent: repeated or racing release never double-decrements. |
+| I6 | Parent survival | Parent inference is identical before and after child creation and destruction, except where the parent itself advances. |
+| I7 | State continuity | Preemption, suspension, readmission, cancellation, and restart do not alter the logical or numerical identity of a surviving branch. |
+
+### 3.1 Required branch behaviors
+
+- At fork, children reference the parent's physical pages. No private copies exist until a write.
+- After branch A diverges, only the affected pages become private to A. B, C, and P keep their original bytes.
+- KV contents are checked, not only metadata: selected layers, tokens, heads, and K/V planes are hashed before fork, after fork, after divergence, and after child destruction.
+- Forking into an existing sequence ID returns an error and leaves every refcount, free-list entry, block table, and existing child state byte-for-byte unchanged.
+- Releasing an already released sequence returns an error without mutating allocator state.
+- Fork positions tested (Gates 1, 2, 4): `1`, `bs - 1`, `bs`, `bs + 1`, `k*bs - 1`, `k*bs`, `k*bs + 1`, with `k` per profile in `acceptance.toml`. Every unaligned fork runs parent-writes-first, child-writes-first, parent-then-child, and child-then-parent.
+
+## 4. Gates
+
+| Gate | Purpose | Model | Preemption |
+| ---- | ------- | ----- | ---------- |
+| 0 | Measurement qualification: prove the measurement chain detects bad paths | mocks + TinyLlama | n/a |
+| 1 | Structural correctness on real runtime components; capture known KV bugs failing, fix, rerun | TinyLlama architecture | off |
+| 1.5 | Qwen qualification: checkpoint identity, 48-layer load, single-sequence reference parity | Qwen3-Coder-30B-A3B-Instruct-FP8 | off |
+| 2 | Qwen branch equivalence at low scale (2, 8, 32 branches) | Qwen | off |
+| 3 | Scale: 100 and 500 branches, fixed 40 GiB BF16 pool, max 512 private tokens per branch, idle teardown | Qwen | off (watermark 0) |
+| 4 | Resilience: oversubscription, preemption, active cancellation, crash and restart, deterministic fault points | Qwen | on |
+| 5 | Performance and placement changes. Separate campaign. | | |
+| 6 | Whole-stack chaos and soak with AEGIS, Cortex, external capabilities. Separate campaign. | | |
+
+Stage parameters (branch counts, context lengths, trial counts, fork positions) live in `acceptance.toml`.
+
+### 4.1 Gate 0: measurement qualification
+
+Test the tester. Each case has an expected verdict, and the failing cases stay in the evidence package.
+
+| Case | Expected |
+| ---- | -------- |
+| Op required on GB10 runs on CPU | FAIL |
+| Op permitted on CPU runs on CPU | PASS |
+| Backend reports GPU, witness saw no kernel | FAIL |
+| Witness saw a GPU kernel, backend reports CPU | FAIL |
+| Kernel symbol outside the op's allowlist | FAIL |
+| GPU call fails and falls back where fallback is prohibited | FAIL |
+| Bundle file altered after `sha256sums.txt` was written | FAIL |
+| Binary altered after hashing (fingerprint mismatch) | FAIL |
+| Missing device at startup with `AIEN_REQUIRE_BLACKWELL=1` | abort |
+| KV pool dtype differs from `kv_contract.toml` | abort |
+| Event journal omits a release that the raw census reflects | FAIL |
+| Mock backend that reports GPU while running the CPU reference | FAIL |
+
+### 4.2 Gate 1: TinyLlama structural correctness
+
+Order is mandatory:
+
+1. Write the tests that trigger the known defects: duplicate child ID in `fork_sequence` (table overwrite, leaked refcounts) and `free_sequence` underflow (double free).
+2. Run them. Archive the failing bundle.
+3. Land the fix commit.
+4. Rerun. Archive the passing bundle.
+
+Evidence chain: `before-fix failing bundle -> fix commit -> after-fix passing bundle`.
+
+Gate 1 also runs the adversarial script: fork 100 branches, mutate branch 73, destroy 20 arbitrary siblings, advance the parent, mutate branch 4, destroy branch 73, then verify every survivor against independent recompute. Scripts run in deterministic mode (Section 8).
+
+### 4.3 Gate 1.5: Qwen qualification
+
+Hard boundary, in order:
+
+```text
+checkpoint present
+-> every shard, index, config, tokenizer file hashed individually
+-> manifest digest over those hashes recorded
+-> architecture and config parsed
+-> all 48 layers loaded through the runtime (not the single-layer loader)
+-> single-sequence parity with the frozen Hugging Face reference harness passes
+-> only then Qwen enters Gate 2
+```
+
+Qwen enters `main` through ordinary reviewed and preflighted `feat/` PRs, not a worktree merge.
+
+### 4.4 Gate 4: resilience scenarios (minimum set)
+
+- Oversubscription: 500 branches x 1,000 private tokens against the 40 GiB pool (about 33,548 blocks required vs 27,306 available).
+- Preempt and readmit with the prefix lease held: only the private suffix is recomputed.
+- Parent terminated -> suspended children remain -> prefix becomes suspended-only -> prefix evicted -> child readmitted -> full `TokenHistory` recompute -> I3 passes.
+- Cancellation during an active write at each named fault point.
+- Release races: cancel twice, completion vs cancel, preemption vs cancel, parent teardown vs child cancel.
+- Kill between step compute and `StepCommit` fsync; kill after fsync before token exposure.
+- Restart with identical `ExecutionFingerprint`: every surviving branch recovers, with identical seeded token IDs.
+- Restart with a deliberately mismatched fingerprint: restore refused.
+
+## 5. Numerical Acceptance
+
+### 5.1 Comparisons
+
+For every compared step and every compared logit vector:
+
+- max absolute error `|a - b|`
+- max relative error `|a - b| / max(|ref|, epsilon)`, epsilon frozen in `acceptance.toml`
+- top-1 agreement
+- KL divergence of the softmax distributions
+
+Top-1 disagreement is permitted only at steps where the reference top-2 margin is below the absolute tolerance. Every such step is listed in the report.
+
+### 5.2 Exact comparisons
+
+- KV bytes not legitimately COW-mutated: zero tolerance, byte equality.
+- Seeded generation in Gate 4 continuity checks: identical token IDs. A token mismatch fails even if logits pass. Logs must show whether the cause was sampler state or a numerical boundary crossing.
+
+### 5.3 Noise floor
+
+Before any COW equivalence run, measure logit differences with no branching for the same sequence: run twice, with different batch neighbors, and prefill vs decode. Tolerance for each metric is `k x measured floor`, with `k` in `acceptance.toml`. The measured values are committed as an amendment before Gate 1 equivalence (TinyLlama) and before Gate 2 (Qwen).
+
+### 5.4 External reference
+
+Gate 1.5 compares AIEN against the Hugging Face reference on the same checkpoint and tokens (single sequence, no branching). I3 compares AIEN against itself and proves COW does not corrupt state. Both are required. Neither substitutes for the other.
+
+## 6. Device Placement
+
+"Zero fallback" is retired as a claim. Placement is enforced per op against `placement.toml`:
+
+```text
+AIEN_ENFORCE_PLACEMENT=docs/campaigns/c1/placement.toml
+```
+
+A call whose observed execution does not match the placement contract aborts the run. `AIEN_REQUIRE_BLACKWELL` keeps its existing meaning: a GB10 device must exist at startup. `fallback_count` is diagnostic telemetry only.
+
+### 6.1 Two witnesses
+
+1. AIEN dispatch record: every op call has an `op_call_id` and records requested and reported path.
+2. External device witness: `aien-campaign-device-witness`, a CUPTI activity library loaded via `CUDA_INJECTION64_PATH`, records actual kernel launches and completions. AIEN brackets each op call with an NVTX range carrying its `op_call_id`. The verifier consumes the witness trace but does not link the witness library.
+
+For an op required on GB10: AIEN reports GPU, the witness saw a kernel matching the op's allowlist inside the op's range, the kernel completed, and no CPU fallback event occurred. For an op permitted on CPU: AIEN reports CPU, `placement.toml` permits CPU, and the witness saw no kernel inside the op's range.
+
+Kernel symbol allowlists are glob patterns bound to the frozen kernel and library digests. cuBLAS kernel names are internal and version-specific, so their patterns are frozen from the Gate 0 qualification trace by amendment.
+
+## 7. KV Contract and Conservation
+
+`KvDType::Bf16` is mandatory. The receipt records `kv_dtype`, element size, block size, bytes per block, total blocks, and configured pool bytes. A mismatch with `kv_contract.toml` aborts the run. This matters because some existing transformer constructors default to an FP32 pool.
+
+The scheduler computes block demand only through a `KvPoolGeometry` value supplied by `aien-kv-cache` (block size, bytes per block, block count, dtype, layers, KV heads, head dim). The hardcoded `16` in the scheduler admission path is removed.
+
+The verifier rebuilds state from three independent sources and requires all three to agree:
+
+```text
+1. mutation journal     kv_allocations.jsonl, branch_lineage.jsonl
+2. raw final census     kv_census.json (sequence tables, free set, physical refcounts)
+3. reported metrics     kv_metrics.json (AIEN's own counters)
+
+replayed == census     replayed == reported
+```
+
+Conservation equations:
+
+```text
+allocated + free = pool_total
+refcount(block)  = live references + suspended lease references reconstructed from lineage
+no referenced block in free set
+no unreferenced block outside free set
+no duplicate live SequenceId
+no child references a nonexistent fork base
+```
+
+Leak metric hierarchy on GB10 unified memory: primary is allocator block conservation; secondary are process RSS and total unified memory pressure.
+
+## 8. Determinism
+
+- Deterministic mode: the scheduler consumes a seeded event script at step boundaries. Seeds and scripts are recorded in the bundle.
+- Named fault-injection points (`cow_copy_mid`, `fork_mid`, `release_mid`, `step_pre_commit`, `step_post_commit_pre_expose`) fire on the Nth hit. Used from Gate 4.
+- Sampler: counter-based (Philox-style). Key is `LogicalBranchId`. Counter is `(generation_step, sample_stream, draw_index)`. No mutable sampler state survives across steps.
+- Gates 1 to 3 run greedy decoding plus one frozen seeded-sampling configuration.
+- Random chaos belongs to Gate 6 only.
+
+## 9. Durability (Gate 4)
+
+A model step is committed only when its `StepCommit` has been appended to the durable branch journal and synchronously persisted. No token is exposed externally before its commit is durable.
+
+```text
+StepCommit { logical_branch_id, step_number, previous_history_length, input_token,
+             accepted_output_token, token_history_digest, sampler_coordinates,
+             fork_base_id, logits_digest (campaign mode), execution_fingerprint }
+
+ForkCommit { logical_child_id, logical_parent_id, fork_position, prefix_snapshot_id,
+             token_history_digest }
+```
+
+- Journal: append-only, sequence-numbered, checksummed. A torn final record is discarded on replay (it was never exposed).
+- One fsync covering every `StepCommit` of a scheduler step counts as synchronous. Modes that expose tokens before fsync are Gate 5 modes and never inherit the restart claim.
+- A child does not exist externally until its `ForkCommit` is durable. Cancellation and prefix eviction are journaled.
+- Boot epoch is the first record of each boot (`BootCommit`): acquire exclusive startup lock, read prior epoch, increment, append, fsync the journal, fsync its directory when the file was created or renamed, release lock, then accept requests.
+- Processed-operation idempotency is derived from the journal. The separate `/tmp` processed-ops file is retired.
+- After restart every lease is `Evicted` and recovery is full `TokenHistory` recompute.
+- Physical KV is never persisted as the source of truth.
+- Exactly-once external tool effects are out of scope (AEGIS campaign).
+
+### 9.1 Restore vs migrate
+
+Restore requires the persisted `ExecutionFingerprint` to equal the current one. Otherwise restore is refused. Migration (recompute durable history under a new fingerprint, new `ExecutionLineage`, `MigrationReceipt`) is out of scope for C1 except the refusal test.
+
+## 10. Bundle and Receipt
+
+Every run emits an immutable, content-addressed bundle stored outside Git:
+
+```text
+manifest.json            campaign_id, spec_commit, acceptance_sha256, placement_sha256,
+                         kv_contract_sha256, kv_profile, verifier_commit, verifier_binary_sha256,
+                         code_under_test_commit, dirty_tree, model_manifest_sha256,
+                         execution_fingerprint, instrumentation_enabled, seeds
+environment.json         driver, CUDA, Mojo, Rust toolchain, OS
+hardware.json            device name, compute capability, memory
+kv_contract.json         observed geometry and dtype
+op_records.jsonl         AIEN dispatch record per op_call_id
+witness.jsonl            device witness trace (hashed by the witness)
+kv_allocations.jsonl     KV mutation journal
+branch_lineage.jsonl     fork, teardown, lease, binding events
+kv_census.json           raw final allocator state
+kv_metrics.json          AIEN-reported counters
+logits_reference/        recompute and HF reference logits
+logits_cow/              COW-path logits
+memory_samples.csv
+latency_samples.csv
+failures.jsonl
+sha256sums.txt           over every file above
+```
+
+Only `bundle_sha256`, `manifest_sha256`, and `PASS/FAIL` are committed to the repository.
+
+Instrumentation (KV hashing, witness, per-op records) is controlled by a runtime flag recorded in the manifest. Correctness gates run instrumented. Scale runs are repeated uninstrumented with end-to-end logit comparison. No timing number from an instrumented run supports a performance statement.
+
+## 11. Scope
+
+In scope: the path in Section 0 on one frozen model configuration with BF16 KV.
+
+Cut from C1: Cortex, distillation, Harvester, MCP, tool use and external effects, cockpit UI, AEGIS policy, vLLM or other comparisons, multi-model, INT4/INT8 and exotic quantization, distributed inference, deadline scheduling (deadlines are stored but not enforced by `aien-scheduler`; nothing in C1 tests them).
+
+Parallel track, not C1: the unrestricted `bash -c` path in `aien-cli/src/tools.rs` is a release-blocking security issue handled in the AEGIS security track.
+
+## 12. Build Prerequisites
+
+| Before | Required |
+| ------ | -------- |
+| Gate 0 | Per-op dispatch records; fail-closed placement enforcement; device witness; bundle and receipt schema with `ExecutionFingerprint`; `KvPoolGeometry` and KV contract check; raw state census API; this verifier |
+| Gate 1 | 128-bit `SequenceId`; `LogicalBranchId`; `TokenHistory`; duplicate-fork rejection; idempotent release; deterministic scheduler scripts |
+| Gate 1.5 | 48-layer Qwen runtime integration; checkpoint manifest; Hugging Face reference harness |
+| Gate 3 | Per-branch teardown and cancel API sharing one idempotent release primitive |
+| Gate 4 | `BranchCheckpoint` and `PrefixSnapshot` leases; durable journal with `BootCommit`, `StepCommit`, `ForkCommit`; named fault points; counter-based sampler; fingerprint-checked restore |
+
+## 13. Claims
+
+Frozen wording. Published claims are quoted verbatim with their evidence bundle digest.
+
+- **G0**: "The measurement system detects every seeded violation in the qualification suite."
+- **G1**: "On the TinyLlama architecture, AIEN's KV/COW, SequenceArena, and scheduler satisfy all seven invariants across the defined fork, mutation, preemption-free teardown, and reclamation scripts."
+- **G1.5**: "AIEN loads the frozen Qwen3-Coder-30B-A3B-Instruct-FP8 checkpoint identified by manifest `<sha>` and matches the frozen Hugging Face reference harness within the specified numerical tolerances for the defined single-sequence qualification workload."
+- **G2/G3**: "With the frozen device-placement specification and no disallowed execution paths, COW-branched inference on the frozen Qwen3-Coder checkpoint is numerically equivalent to independent recomputation at the tested branch counts through N branches with a 32K-token parent context."
+- **G4**: "With the frozen device-placement specification and no disallowed execution paths, COW-branched inference remains numerically equivalent to independent recomputation and preserves branch state continuity under the defined oversubscription, preemption, cancellation, and restart fault scenarios."
+
+Wording rules: C1 never claims "production". "Blackwell-native" and "zero fallback" may appear only in a later frozen claim that defines and proves them.
+
+## 14. Amendments
+
+None.
diff --git a/docs/campaigns/c1/acceptance.toml b/docs/campaigns/c1/acceptance.toml
new file mode 100644
index 00000000..2457d3be
--- /dev/null
+++ b/docs/campaigns/c1/acceptance.toml
@@ -0,0 +1,134 @@
+# Campaign C1 acceptance criteria. Frozen on merge. Changes only by amendment (SPEC.md Section 14).
+
+[campaign]
+id = "c1"
+spec_version = 1
+
+[correctness]
+# Correctness invariants are binary: every required trial passes.
+required_pass_fraction = 1.0
+# KV bytes outside legitimately COW-mutated pages must be byte-identical.
+unmodified_kv_byte_tolerance = 0
+max_leaked_blocks = 0
+max_duplicate_live_sequence_ids = 0
+max_stale_id_reuse = 0
+max_disallowed_placement_events = 0
+max_nan_or_inf_logits = 0
+max_lost_completions = 0
+max_scheduler_deadlocks = 0
+
+[numerics]
+# Tolerance for each metric = noise_multiplier_k x measured noise floor (SPEC.md Section 5.3).
+noise_multiplier_k = 2.0
+# Denominator floor for relative error: |a - b| / max(|ref|, relative_error_epsilon).
+relative_error_epsilon = 1.0e-3
+# Top-1 disagreement is allowed only where the reference top-2 margin is below the absolute tolerance.
+top1_margin_exemption = "reference_top2_margin_below_abs_tolerance"
+compare_every_generated_step = true
+
+# Measured noise floors. Filled by amendment before the equivalence runs they govern.
+# A run whose governing floor is "unmeasured" cannot produce a PASS for I3.
+[numerics.noise_floor.tinyllama]
+status = "unmeasured"
+
+[numerics.noise_floor.qwen3_coder_30b_a3b_fp8]
+status = "unmeasured"
+
+[sampling]
+gates_1_to_3 = ["greedy", "seeded"]
+seeded_temperature = 0.7
+seeded_top_p = 0.95
+sampler = "philox4x32_10"
+# Gate 4 continuity: seeded runs must produce identical token IDs.
+gate4_token_identity_required = true
+
+[fork_positions]
+# Positions are 1, bs-1, bs, bs+1, k*bs-1, k*bs, k*bs+1 (bs = block_size from kv_contract.toml).
+small = ["1", "bs-1", "bs", "bs+1"]
+large = ["k*bs-1", "k*bs", "k*bs+1"]
+write_orders = ["parent_first", "child_first", "parent_then_child", "child_then_parent"]
+
+[fork_positions.k]
+tinyllama = 64                   # 1024 tokens with bs = 16
+qwen3_coder_30b_a3b_fp8 = 2000   # 32000 tokens with bs = 16
+
+# Stages. Correctness invariants are identical at every stage; only these parameters change.
+
+[[gate1.stage]]
+name = "A"
+parent_context_tokens = 64
+branches = 2
+trials = 10
+
+[[gate1.stage]]
+name = "B"
+parent_context_tokens = 2048     # TinyLlama maximum context
+branches = 32
+trials = 100
+
+[[gate1.stage]]
+name = "adversarial_fork100"
+parent_context_tokens = 1024
+branches = 100
+trials = 10
+script = "fork100_mutate73_destroy20_advance_parent_mutate4_destroy73"
+
+[[gate2.stage]]
+name = "A"
+parent_context_tokens = 64
+branches = 2
+trials = 10
+
+[[gate2.stage]]
+name = "B"
+parent_context_tokens = 4096
+branches = 8
+trials = 10
+
+[[gate2.stage]]
+name = "C"
+parent_context_tokens = 4096
+branches = 32
+trials = 100
+
+[[gate3.stage]]
+name = "C"
+parent_context_tokens = 16384
+branches = 100
+max_private_tokens_per_branch = 512
+divergence = "mixed"
+trials = 10
+
+[[gate3.stage]]
+name = "D"
+parent_context_tokens = 32768
+branches = 500
+max_private_tokens_per_branch = 512
+divergence = "mixed"
+trials = 3
+
+[gate3]
+preemption = false
+watermark_blocks = 0
+uninstrumented_repeat_required = true
+
+[gate4]
+preemption = true
+oversubscription_branches = 500
+oversubscription_private_tokens_per_branch = 1000
+parent_context_tokens = 32768
+fault_points = [
+    "cow_copy_mid",
+    "fork_mid",
+    "release_mid",
+    "step_pre_commit",
+    "step_post_commit_pre_expose",
+]
+release_races = [
+    "cancel_twice",
+    "completion_vs_cancel",
+    "preemption_vs_cancel",
+    "parent_teardown_vs_child_cancel",
+]
+restart_same_fingerprint = true
+restart_mismatched_fingerprint_must_refuse = true
diff --git a/docs/campaigns/c1/kv_contract.toml b/docs/campaigns/c1/kv_contract.toml
new file mode 100644
index 00000000..c9e7dfb6
--- /dev/null
+++ b/docs/campaigns/c1/kv_contract.toml
@@ -0,0 +1,32 @@
+# Campaign C1 KV contract. A run whose observed pool geometry differs from its profile aborts.
+# bytes_per_block = 2 (K and V) x num_layers x block_size x num_kv_heads x head_dim x element_bytes
+
+[contract]
+campaign_id = "c1"
+spec_version = 1
+dtype = "Bf16"
+element_bytes = 2
+block_size = 16
+
+[profiles.tinyllama]
+gates = ["1"]
+num_layers = 22
+num_kv_heads = 4
+head_dim = 64
+bytes_per_token = 22528
+bytes_per_block = 360448
+num_blocks = 4096
+pool_bytes = 1476395008            # 1.375 GiB
+
+[profiles.qwen3_coder_30b_a3b_fp8]
+gates = ["1.5", "2", "3", "4"]
+num_layers = 48
+num_kv_heads = 4
+head_dim = 128
+bytes_per_token = 98304             # 96 KiB
+bytes_per_block = 1572864           # 1.5 MiB
+num_blocks = 27306
+pool_bytes = 42948624384            # 27306 x 1.5 MiB, just under 40 GiB
+# Reference sizing (not enforced):
+# 32K parent + 500 x 512 private tokens  ~ 18,048 blocks (Gate 3 stage D fits)
+# 32K parent + 500 x 1000 private tokens ~ 33,548 blocks (Gate 4 oversubscription exceeds pool)
diff --git a/docs/campaigns/c1/placement.toml b/docs/campaigns/c1/placement.toml
new file mode 100644
index 00000000..555b5bf7
--- /dev/null
+++ b/docs/campaigns/c1/placement.toml
@@ -0,0 +1,44 @@
+# Campaign C1 device placement contract. Enforced per op call via AIEN_ENFORCE_PLACEMENT.
+# Op names match the backend trait methods in aien-inference-abi.
+# A call whose observed execution is not in `allowed` aborts the run.
+# `kernels` are glob patterns the external device witness must observe inside the op's NVTX range.
+# Patterns marked PENDING are frozen by amendment from the Gate 0 qualification trace
+# (cuBLAS kernel names are internal and bound to the frozen library digest).
+
+[placement]
+campaign_id = "c1"
+spec_version = 1
+policy = "hybrid"
+
+[ops.rmsnorm]
+allowed = ["cpu"]
+
+[ops.apply_rope]
+allowed = ["cpu"]
+
+[ops.swiglu]
+allowed = ["cpu"]
+
+[ops.gqa_attention]
+allowed = ["cpu"]
+
+[ops.matmul_vec]
+allowed = ["gb10"]
+kernels = ["PENDING_GATE0_CUBLAS_GEMV"]
+
+[ops.matmul_batch]
+allowed = ["gb10"]
+kernels = ["PENDING_GATE0_CUBLAS_GEMM"]
+
+[ops.paged_attention]
+# Single-sequence path delegates to paged_attention_batch.
+allowed = ["gb10"]
+kernels = ["*paged_attention_bf16*"]
+
+[ops.paged_attention_batch]
+allowed = ["gb10"]
+kernels = ["*paged_attention_bf16*"]
+
+[ops.compute_logits]
+allowed = ["gb10"]
+kernels = ["PENDING_GATE0_CUBLAS_GEMV"]