Governance Engine

Deterministic verification pipeline enforcing AI safety through fail-closed, cryptographically attested governance.

Overview

EVE AI Core's governance engine enforces safety policies through deterministic, fail-closed verification. Every AI output passes through an 8-stage pipeline before reaching end users. No output leaves the system without a cryptographic attestation proving it was verified against the full charter.

The pipeline is called the Telemetry Verification Engine (TVE). It operates as a pure function: given an input request and the current policy state, the TVE produces a deterministic verdict. No randomness, no model inference, no side effects. The same input under the same policy version produces the same output.

Design Principle

Safety-critical decisions must be computable by side-effect-free logic that could run on embedded hardware. The TVE pipeline contains zero LLM calls, zero network I/O, and zero mutable global state. Every stage operates on immutable inputs and produces typed outputs consumed by the next stage.

TVE Pipeline Architecture

The pipeline processes every request through eight sequential stages. The entire sequence completes in under 2 milliseconds on commodity hardware.

Intent Classification Charter Compliance Circuit Breaker Truth Store CRD Scoring Veto Engine Attestation Audit Trail
1
Intent Classification

Categorizes the request type and assigns an initial risk level. Uses pure keyword and pattern matching (no LLM calls) to classify into one of four stakes levels: ROUTINE, CREATIVE_EXPLORATION, MISSION_TEAMING, or SAFETY_CRITICAL. The classification determines which governance profile threads through all downstream stages, controlling lock thresholds, tolerance bands, and skip flags.

2
Charter Compliance

Checks the request against 15 immutable rules derived from 12 foundational principles. Each rule maps to a deterministic check function. Violations produce one of four verdicts: PASS, SOFT_BLOCK (overridable with justification), HARD_BLOCK (non-overridable), or ESCALATION (requires human review). Five ethical red lines (impersonate_human, bypass_safety_checks, harm_user, deceive_user, violate_privacy) result in permanent blocks with no override path.

3
Circuit Breaker

Three-state machine preventing cascade failures across the governance subsystem itself. If upstream providers or internal modules experience repeated failures, the circuit breaker transitions from CLOSED (normal operation) through HALF_OPEN (testing recovery) to OPEN (all requests blocked until recovery). This ensures that governance degradation fails safe, never fails open.

4
Truth Store

Pre-computed reality layer containing SHA-256 hashed verified facts. The Truth Store holds curated ground-truth entries across multiple categories (world leaders, current events, science, technology). During verification, response claims are matched against the store. Any contradiction between an AI output and a hashed fact triggers automatic correction before the output reaches the user.

5
CRD Scoring

Confidence-Reality Divergence measurement. Computes the gap between the model's stated confidence and the evidence available in the Truth Store and Claims Ledger. High CRD scores indicate overconfidence relative to evidence, triggering qualification or retraction. The formula applies domain-specific multipliers so that factual claims face stricter thresholds than creative content.

6
Veto Engine

Graduated intervention system consuming all upstream signals. Produces one of four outcomes based on the aggregate risk profile. The veto engine is the single decision point: it synthesizes charter results, circuit breaker state, truth store matches, and CRD score into a final verdict.

7
Attestation

Cryptographic signing of the verification result. Every verdict is signed with HMAC-SHA256 using a server-side secret, producing a tamper-evident attestation that any auditor can verify without accessing internal state. The attestation includes a content hash of the verified output, the verdict, a timestamp, and the pipeline version.

8
Audit Trail

Immutable hash-chain evidence log. Each entry links to the previous via SHA-256, forming a tamper-evident chain. The audit trail records every pipeline invocation including the input, all intermediate stage results, the final verdict, and the attestation signature. Retention is 7+ years for regulatory compliance.

CRD Formula

The Confidence-Reality Divergence score quantifies how far a model's stated confidence diverges from the available evidence. It is computed as:

CRD = min(1.0, |confidence - evidence| / max(floor, evidence) * domain_multiplier)

Where:

  • confidence — the model's self-reported certainty for a given claim (0.0 to 1.0)
  • evidence — the evidence strength from the Truth Store and Claims Ledger (0.0 to 1.0)
  • floor — domain-specific minimum denominator preventing division-by-zero and stabilizing low-evidence scores
  • domain_multiplier — calibration weight per knowledge domain (factual domains use higher multipliers, creative domains use lower)

CRD < 0.2

Low divergence. Confidence aligns with evidence. Output passes without modification.

CRD 0.2 – 0.5

Moderate divergence. Qualifiers injected ("likely", "based on available data") to hedge overconfidence.

CRD 0.5 – 0.8

High divergence. Assertive language softened and uncertainty disclosure appended.

CRD > 0.8

Critical divergence. Claim flagged for retraction or replacement with verified fact.

Domain Floors: Factual domains (science, law, medicine) use a floor of 0.15 and a multiplier of 1.3. Creative domains (fiction, humor, speculation) use a floor of 0.05 and a multiplier of 0.6. This ensures creative expression is not penalized by the same thresholds applied to factual assertions.

Three-Plane Isolation

The TVE pipeline enforces strict separation between three architectural planes. No signal path exists from the Governed Inference Layer back to the Authority Resolution Layer, preventing any output-generation process from influencing the governance rules that verify it.

AUTHORITY RESOLUTION LAYER
Charter rules
Policy state
Veto thresholds
Sealed constants
EXECUTION PLANE
LLM inference
Response generation
Token streaming
Tool invocation
EVIDENCE PLANE
Truth Store
Claims Ledger
Audit trail
Attestation log
Control → Execution → Evidence  |  No reverse signal path from Execution to Control
  • Authority Resolution Layer: Holds immutable charter rules, governance profiles, veto thresholds, and sealed constants. Read-only to all other planes. Updated only through governed self-modification with human approval for high-risk changes.
  • Governed Inference Layer: Contains LLM inference, response generation, tool invocation, and all mutable processing. Receives governance constraints from the Authority Resolution Layer. Cannot write back to it.
  • Cryptographic Authority Chain Layer: Append-only storage for the Truth Store, Claims Ledger, hash-chain audit trail, and attestation signatures. Both Control and Execution planes write evidence; neither can delete or modify existing entries.

Circuit Breaker States

The circuit breaker protects the governance pipeline from cascading failures. It tracks consecutive failures per upstream dependency and transitions between three states:

State Behavior Transition Trigger
CLOSED Normal operation. All requests flow through the full pipeline. Default state. Re-entered after successful HALF_OPEN probe.
HALF_OPEN Testing recovery. A single probe request is sent through. If it succeeds, transition to CLOSED. If it fails, transition back to OPEN. Cooldown timer expires after entering OPEN state.
OPEN All requests blocked. Returns a safe default response. No AI output is delivered until recovery. Consecutive failure count exceeds threshold (default: 5).
Fail-Safe Guarantee: The circuit breaker always fails safe. When OPEN, no unverified output reaches the user. The system returns a governance-approved degraded response rather than bypassing verification.

Veto Engine Verdicts

The Veto Engine is the single decision authority. It consumes all upstream signals and produces one of four graduated verdicts:

Verdict Action Override
PASS Output delivered to user without modification. N/A
SOFT_VETO Output modified with qualifiers, hedging, or corrections. CRD-driven adjustments applied. Overridable with explicit justification logged to audit trail.
HARD_VETO Output blocked. Replacement response generated from safe templates. Non-overridable. Requires re-submission with modified input.
CHARTER_VETO Output blocked. Ethical red line violated. Incident recorded for review. Cannot be overridden under any circumstances. Immutable.

Sub-Millisecond Decision Latency

The TVE pipeline is engineered for near-zero overhead on the critical path. Typical end-to-end latency is under 2 milliseconds, achieved through:

  • Zero LLM calls: Every stage uses deterministic logic, pattern matching, or hash lookups. No neural inference on the governance path.
  • Pre-compiled patterns: Intent classification and charter rules use pre-compiled regex and frozen lookup tables loaded at startup.
  • O(1) lookups: Truth Store facts are indexed by content hash. Charter rules are stored in a frozenset. CRD domain multipliers are dictionary lookups.
  • No I/O on hot path: Audit trail writes are append-only and buffered. Attestation signing uses in-memory HMAC. No disk or network I/O blocks the verdict.
  • Nanosecond instrumentation: Per-stage timing is recorded with nanosecond precision for waterfall analysis and p50/p95/p99 monitoring.

p50 Latency

0.8 ms typical pipeline completion for routine requests.

p95 Latency

1.4 ms including full attestation signing and audit append.

p99 Latency

1.9 ms worst case under sustained load with all stages active.

Zero Warm-up

All lookup tables and compiled patterns loaded at process start. No lazy initialization.

Hardware Enforcement

The veto logic is designed to be compilable to hardware. The core decision module (veto_core.py) uses zero imports outside dataclasses, enum, and typing — zero I/O, zero threading, zero global state. This purity constraint enables direct translation to FPGA firmware.

PolarFire SoC FPGA Target

The hardware enforcement target is the Microchip PolarFire SoC, combining a RISC-V processor with radiation-tolerant FPGA fabric. In that target design, veto logic is fused into the FPGA as a hardware interlock that software cannot bypass; today the veto runs as a deterministic software core. A C header (veto_interface.h, 401 lines) already defines the firmware API contract between the software pipeline and the future hardware veto gate.

Three pure entry points define the hardware interface:

  • check_charter(action_type, action_params, context) — evaluates 15 charter rules against 12 principles. Returns a CharterVetoResult with compliance status, violated principles, and veto type.
  • check_cognitive_locks(request, state) — evaluates 6 cognitive locks (emotional stability, ethical clearance, goal alignment, uncertainty threshold, consequence awareness, identity coherence) with risk-scaled thresholds.
  • check_drift_budget(category, cost, target, budget) — enforces identity drift limits with 13 protected invariants that cannot be modified under any budget.

Frozen constants sealed at compilation:

  • 15 charter rules with deterministic check functions
  • 5 ethical red lines (permanent block, no override)
  • 13 protected invariants (core values, ethical boundaries, identity anchors)
  • 6 cognitive lock thresholds scaled by risk level
Determinism Guarantee: The veto module is covered by 87 tests verifying determinism (same input = same output), equivalence (software and hardware paths produce identical verdicts), and purity (no side effects, no state mutation). These tests run on every build.

Attestation and Verification

Every verified output carries a cryptographic attestation that any auditor can verify independently:

{
  "content_hash": "sha256:a1b2c3d4...",
  "verdict": "PASS",
  "crd_score": 0.12,
  "charter_compliant": true,
  "pipeline_version": "2.4.1",
  "timestamp": "2026-03-24T14:30:00.000Z",
  "signature": "hmac-sha256:e5f6g7h8..."
}

Verification requires only the attestation payload and the public verification endpoint. The HMAC-SHA256 signature binds the content hash to the verdict, ensuring that neither the output nor the governance decision can be altered after signing.

Related Topics

Architecture

System architecture and service topology

Sovereign Infrastructure

Hardware security enclaves and mesh identity

Integrity Systems

Configuration drift budgets and self-modification governance

Part of the EVE AI Core control plane Deterministic AI Governance Control Plane → Policy decisions that return the same result for the same input every time, before execution.