MITR SENTINEL & Z3 GATE STRUCTURE · DECISIONS ADR-0013, ADR-0039, ADR-0232

Zero-Time Precomputed Predicate Matrices, the Z3 Solver, and the retry_of Immune Loop

The central engineering contradiction in autonomous agent security lies between mathematical soundness and runtime latency. Compiling natural-language policy documents on the fly or querying a secondary supervisor language model adds hundreds of milliseconds to every tool call while leaving formal safety unproved.

The MITR design resolves this contradiction by separating policy compilation from runtime evaluation. Domain security rules are precompiled ahead of time into quantifier-free linear integer arithmetic predicates with uninterpreted functions (QF_UFLIA). At runtime, the Z3 solver evaluates the precomputed matrix in milliseconds, while recurring read-only signatures hit an in-memory cryptographic digest cache.

1. Execution Pipeline Across the R0–R5 Reversibility Scale

Every outgoing tool call is intercepted before reaching the network socket or storage engine. Depending on the classified reversibility tier, the gateway enforces the exact verification depth required to prevent irreversible harm.

SIX-TIER ACTION REVERSIBILITY LADDER (R0-R5) & MITR GATEWAY PIPELINE 1. Agent Tool Call Action + Params 2. Memory Filter mcp-sentinel 0.016 ms 3. R0-R5 Classifier 48% R0 ... 4% R5 4. Z3 SMT Prover UNSAT=Allow / SAT=Block 5. Chained Receipt gate_actions.jsonl

End-to-end tool call pipeline: parameter parsing, sub-millisecond in-memory contract filtering via mcp-sentinel 1.1.2, six-tier R0–R5 classification, formal Z3 proof, and append-only receipt generation in gate_actions.jsonl.

Tier Traffic Share Representative Legal & Financial Operations Verification Depth & Boundary Enforcement
R048%Read litigation file summary, query counterparty status, inspect account balanceIn-memory scope check (~0.016 ms); zero external state mutation
R114%Save internal working note, create ephemeral draft inside isolated workspaceFully reversible in place; logged to local session journal
R211%Assign internal classification tags, compute statutory fee or commission scheduleSchema and numeric bound validation without external network calls
R316%Stage arbitration motion draft, place payment order into revocable approval queueAuthority and threshold verification; revocable prior to executive signature
R47%Dispatch external webhook or formal notice, write to operational tableMandatory outbound personal data redaction (ADR-0073) and injection taint guard
R54%Execute irrevocable wire transfer, submit court waiver, permanently purge case recordStrict default-deny (fail-closed); full Z3 formal proof (p99 = 4.5 ms)

2. Closed Self-Correction Loop (Unsat Core Injection / retry_of)

Conventional network gateways reject blocked calls with an opaque permission error, causing autonomous agents to enter infinite retry loops or crash. The MITR gateway exploits the formal witness output of Z3: whenever a candidate action violates policy invariants, the solver identifies the exact minimal set of conflicting clauses.

Those violated predicate identifiers and boundary thresholds are injected back into the tool response inside the retry_of field. Guided by deterministic mathematical feedback, the calling agent automatically downgrades an unapproved R5 debit or deletion into a safe R3 staged draft within three rounds (MITR_GATE_ROUNDS_MAX = 3) without human intervention.

3. Zero-Trust Standalone Hash-Chain Replay

Every gateway verdict is appended to gate_actions.jsonl with dual cryptographic digests (SHA-256 and GOST R 34.11-2012 Streebog-256) and periodic OpenTimestamps Bitcoin block anchors. Any external auditor can replay and verify the entire ledger offline using the Python standard library:

python verify_chain_standalone.py --replay --ledger gate_actions.jsonl
python iss_verifier.py --ledger audit.jsonl

Modifying, deleting, or inserting a single historical line breaks the hash chain immediately and fails verification with a non-zero exit code.