# Project Sovereign — Evolution 2 of 42: final report

Session cain-studio-platform-46, 2026-10-12. Labels: **[observed]** run or read in this session; **[model]** inside
the Z3 model under its assumptions; **[peer]** reported by another session with its commit; **[owner]** your decision.

## A. Executive verdict: **BLOCKED** (production) · local development gate PASS

Evolution 2 made the approved precedence rule real: **a capability token never widens the operator allowlist or
skips mandatory approval** (eaf8d4fa). It is proved end to end on both transports with a side-effect counter.
It also:
- verified the deployed quarantine fix;
- measured what the stdio kernel sandbox really blocks;
- put the authorization suites into CI, and found and fixed 5 dependency gaps a clean checkout exposed;
- split live-host health from code tests without hiding the host's real DEGRADED state;
- extended the formal model (28/28).

Production stays BLOCKED for three reasons:
- there is no kernel-level enforcement on the hosted path;
- no CI service has executed the suite (no git remote);
- the precedence fix is not deployed.

## B. Revision and working tree

Branch `ironclad-prompt8-qualification`, no git remote. Evolution 2 started at d906baf8. The deployed tag is
`deploy/20261012T034805Z` at bf225092 (includes c0b6a64b and 3eff02c2; does **not** include eaf8d4fa).
Commits by -46, each made by explicit path (shared index; peers' modified files were left unstaged):

| Commit | What |
|---|---|
| eaf8d4fa | Token branch runs the boundary baseline (allowlist, risk floor, containment); 9 tests updated; 20 side-effect tests |
| 26653a1c, 59c45fa5 | Evo-1 manifest rehash for s17 8ffc6ce9; model source withdrawn from the Evo-1 kit slot |
| 4a78bfb8 | CI job, runner with canaries, suite-isolation test, sentinel split, `live_host` marker |
| 2712f485 | Resolved dependency lock and Rust enforcer build step (from the clean-checkout run) |
| bf5a0038 | Measured seccomp reality test, added to the gate |
| (this commit) | `reports/sovereign/evolution-02/` |

## C. Allowlist precedence [owner] — decision and evidence

Rule: effective permission = the intersection of the token's checks and the boundary policy. In
`cain/mcp_proxy.py`, after the token's signature, principal, model-continuity, parameter-hash and containment checks,
the same `_evaluate_deterministic_baseline` that a token-less call gets is applied before the nonce is consumed.
A REQUIRE_APPROVAL outcome stays REQUIRE_APPROVAL. **[observed]**
- 20 end-to-end tests pass. They fail on d906baf8 (4) and on 6cfa3b9e (7); see TEST_RESULTS.md §1.
- 9 existing tests that encoded the old precedence now allowlist the tool under test, with their own assertions
  unchanged. `delete_file` now asserts REQUIRE_APPROVAL with the binding still passing.
- Other token consumers were checked: OpenShell's `evaluate_syscall` and the frontier runtime only *add* checks with
  a token. `ChainCapabilityStage` takes its signer pin from caller arguments (T-E2-02, reported to its owner -82).
  It cannot grant, because strict mode only honours the proof stage's ALLOW.

## D. MCPGate quarantine path audit

Trace: HTTP `handle_jsonrpc` / stdio `run` → `process_incoming_request` → `evaluate_tool_call` → token branch
(containment, then baseline) → `consume_jit_capability` → forward. Quarantine and authorization are decided
**before** the tool server receives anything. **[observed]** Side-effect counters: 0 executions for quarantined token
holders on HTTP and on stdio (with a real child process), and 0 when the containment store throws. 3eff02c2 is
deployed **[peer -17, verified read-only by -46]**. It was not probed live, since that would require quarantining a
live agent. That makes this local regression evidence, not deployment evidence.

## E. Hosted proof stage

c0b6a64b is re-checked: pinned signer and ledger required, empty fields refused, argument/caller/expiry binding, the
nonce consumed last, and strict mode requiring the proof stage's own ALLOW. Its 25 tests are in the CI gate.
**It is not on the production route**: the live gateway runs pipeline v27 with strict mode off, and the stage arrives
in v28. So these fixes secure nothing in production today. The optional-pin libraries
(`cain_proof_carrying_action.py`, `z3_solver_gate.verify_proof_action` and two others) are unchanged and tracked as
T-S46-09.

## F. Kernel enforcement reality (`ENFORCEMENT_MAP.json`)

- **stdio tool servers:** `PR_SET_NO_NEW_PRIVS` + seccomp (default ALLOW, EPERM list). Measured: setuid, chroot,
  bpf and ptrace are blocked by the kernel; **exec, file write, unlink and TCP connect succeed**.
- **Hosted tools:** run in the gateway process with no kernel hook. Per -17, `cain_enforce.bpf.c` is a tracepoint
  program that always returns 0 (telemetry), and BPF LSM is not active. **[peer]** The published overclaim was
  corrected in V33–V45 (656dac9a); the enforcement gap remains.
- **Bypass routes:**
  - an agent that reaches a tool server directly;
  - a malicious or compromised tool server;
  - the SDK accepting an unsigned gateway ALLOW (T-S17-04);
  - authenticated gateway exec routes (operator or tenant credentials; see s17).
- **Available here:** Landlock ABI 8 (unprivileged; filesystem, execute, TCP). It is not implemented because it needs
  a per-tool-server policy decision (Evolution 3, E3-1).

## G. CI

`.github/workflows/ci.yml` job `authorization-regression-gate` runs `scripts/ci/run_authorization_suite.py`. It covers
24 required files and fails on any failure, any skip, a suite that collects nothing, or a write to the
production-ledger canaries. `live_host` tests are deselected and counted. Clean-checkout run (fresh worktree, fresh
venv, lock file, Rust enforcer built with `--locked`): **263 passed, 0 skipped, exit 0** **[observed]**. That is the
same command CI runs, but **not** a CI service run: there is no remote.

## H. Formal model (`formal/z3_results.json`; model source kept in the source tree)

28/28 results match. **[model]** For E2 (eaf8d4fa), every forbidden decision state is UNSAT:
- allowlist bypass, approval skip, permission wider than the token-less policy;
- contained agent executes; unreadable containment state executes;
- changed arguments, cross-tenant/tool use, invalid or unregistered token;
- the same token executed twice;
- the transports disagreeing.

E1 and BEFORE give SAT on the precedence properties, and BEFORE gives SAT on containment (sensitivity). Two caveats:
`transports_disagree` is UNSAT by construction of assumption A8 (its evidence is the paired tests), and
`tool_server_performs_unauthorized_exec_file_or_network_op` is **SAT**, which is the kernel gap. UNSAT means no
counterexample inside the model under A1–A9. It does not show that the code matches the model.

## I. Evidence ledger and auditor kit

- **Live ledger:** `verify_chain` → `(True, 1166)`. Rows 1133–1150 (0-based line indices) are the test-origin rows
  (`query_database` and `db_query` only). sha256 of those 18 lines:
  `715887fa67733ffe1bebde60f6aa75fa0217ab8c712d117c3ffc956aa87a38ee`. They are kept, not rewritten. No suite run in
  Evolution 2 changed the ledger.
- **Kit:** Evo-1 is in kit 8.3.0 **[peer -82]**, but 8.3.0 also carries `formal/authorization_model.py`, which is
  model source under the code-secret directive. My slot listed it as a verifier, and -82 staged it. It is now
  withdrawn from the slot (59c45fa5); withdrawing 8.3.0 is your decision.
- **Evolution 2 slot:** `KIT_SLOT.json` + `EVIDENCE_MANIFEST.json`, results and reports only. **Unsigned**; the
  signing input is in `KIT_SIGNING_INPUT.md`.
- **Independent Human Verification Resource Kit (`ihvrk/`, owner -98):** still uncommitted, so no -98 artifact is
  hashed or included. The request was passed to -98.
- **Memory archive:** 130 entries are byte-identical to the planned split, and all 130 links resolve. The only
  "changed" line is -17's own legitimate update of its entry.

## J. Files changed

`changed files`: `cain/mcp_proxy.py`, 9 test files (5 updated + `test_sovereign_e1_mcpgate_capability_boundary.py`
+ 3 new), `tests/test_cain_sentinel_guardian.py`, `pytest.ini`, `.github/workflows/ci.yml`,
`scripts/ci/run_authorization_suite.py`, `scripts/ci/requirements-authorization.txt`, the Evo-1 manifest and slot,
and this folder. Commits are listed in B.

## K. Remaining blockers, owners, decisions

| Item | Owner | Needed |
|---|---|---|
| T-S17-05 / T-E2-01 no kernel enforcement (hosted; stdio exec/file/net) | owner + Evo-3 | approve Landlock scope (E3-1/E3-2) |
| T-E2-03 no CI service | owner | remote with Actions, or an approved local runner |
| eaf8d4fa not deployed | owner | approve rolling deploy |
| T-E2-04 kit 8.3.0 contains model source | owner / -82 | withdraw and cut 8.3.1? |
| T-S46-05/06, T-S17-04/06, T-S46-09, T-E2-02 | Evo-3 / -17 / -82 | see EVOLUTION-03-SPEC.md |
| T-E2-05 host degraded (mr-01 DEGRADED, node-1 FAILED) | ops | repair the cluster node |

## L. Release gate (`release_gate.json`)

R2 and R3 PASS (R3 secures nothing in production because the stage isn't routed). R1, R4 and R7 PARTIAL. R5, R6
and R8 FAIL. **BLOCKED.**

## M. Evolution 3

`EVOLUTION-03-SPEC.md`: Landlock enforcement for tool servers and hosted tools first, then the shared nonce store,
authenticated hosted identity, signed SDK decisions, a durable MCPGate ledger, and pin removal.

## Reusable capabilities by family (Phase 10): implemented and evidenced only, no novelty claims, registry unchanged

| Family | Capability | Status | Evidence |
|---|---|---|---|
| Guard | Token-as-additional-requirement precedence at the MCP boundary; containment before dispatch | IMPLEMENTED_AND_TESTED (not deployed) | eaf8d4fa, side-effect tests, model |
| Verify | Authorization CI gate with production-ledger canaries and a clean-checkout reproduction | IMPLEMENTED (no CI service yet) | runner, TEST_RESULTS §6 |
| Verify | Counterexample model with pre-fix mutant columns | FORMALLY_CHECKED_WITH_STATED_ASSUMPTIONS | z3_results.json |
| Kernel | Measured stdio seccomp boundary (what it does and does not block) | IMPLEMENTED_AND_TESTED (narrow) | seccomp reality test |
| Sentinel | Separation of host-health reporting from code tests | IMPLEMENTED | live_host split |
| Passport, Quorum, Comply, Frontier | nothing new in Evolution 2 | — | — |

The Top-100 registry was not edited: no duplicates added and no statuses changed.
