{
  "schema": "cain42.sovereign.evo03.enforcement_matrix.v1",
  "generated": "2026-10-12",
  "kernel": "Linux 7.0.0-38-generic",
  "landlock_abi": 8,
  "rule": "observation is not enforcement; 'in_production' reflects verified routing, not intent",
  "routes": [
    {
      "route": "MCPGate HTTP proxy (cain/mcp_proxy.py create_mcp_proxy_app)",
      "in_production": false,
      "production_note": "no host runs it; not in any distributed SDK (DEPLOYMENT_PREFLIGHT.md)",
      "identity_policy": "registered identity key for tokens; operator allowlist + risk floor + containment for every call (eaf8d4fa)",
      "action_binding": "action_hash over canonical arguments; JIT token bound to context digest",
      "human_approval": "REQUIRE_APPROVAL from the risk floor; a token cannot satisfy it",
      "expiry_replay": "token expires_at; atomic per-process nonce; JIT single use",
      "enforcement_before_side_effect": "yes: decision + JIT consumption before httpx forward (side-effect counter 0 on every deny)",
      "kernel_runtime_controls": "none (proxy forwards over HTTP to a remote tool server)",
      "bypass_tests": [
        "test_sovereign_e2_token_precedence_side_effects.py::test_http_*",
        "test_sovereign_e3_resource_exhaustion.py"
      ],
      "limitations": [
        "direct network access to the tool server bypasses it",
        "cross-process replay (T-S46-06)"
      ],
      "owner": "-46"
    },
    {
      "route": "MCPGate stdio proxy (StdioMCPProxy.run)",
      "in_production": false,
      "production_note": "same as above",
      "identity_policy": "same decision",
      "action_binding": "same",
      "human_approval": "same",
      "expiry_replay": "same",
      "enforcement_before_side_effect": "yes: before writing to the child's stdin (counter 0)",
      "kernel_runtime_controls": "seccomp EPERM list (always, unless CAIN_STDIO_ALLOW_UNSANDBOXED=1) + Landlock profile (opt-in, bfe0637e)",
      "bypass_tests": [
        "test_sovereign_e2_token_precedence_side_effects.py::test_stdio_*",
        "test_sovereign_e3_landlock.py::test_stdio_proxy_*"
      ],
      "limitations": [
        "Landlock off unless a profile is configured",
        "UDP/raw sockets/other syscalls not covered"
      ],
      "owner": "-46"
    },
    {
      "route": "Hosted /mcp on the gateway (HostedPipelineMiddleware v27 + carve-out guard stack)",
      "in_production": true,
      "production_note": "live on blue+green",
      "identity_policy": "API key on the MCP connection; pipeline agent/tenant are self-asserted arguments (T-S46-05)",
      "action_binding": "per-stage (proof stage binds arguments but is not routed)",
      "human_approval": "guard-stack REQUIRE_APPROVAL where configured",
      "expiry_replay": "replay stage only when the caller supplies _cain_nonce (advisory)",
      "enforcement_before_side_effect": "yes: restriction-only stages before the tool body",
      "kernel_runtime_controls": "NONE: tool bodies run inside the gateway process",
      "bypass_tests": [
        "test_sovereign_e1_hosted_proof_stage_fail_closed.py"
      ],
      "limitations": [
        "no kernel enforcement (T-S17-05)",
        "self-asserted caller identity"
      ],
      "owner": "owner decision + Evolution 4"
    },
    {
      "route": "Hosted proof stage (SovereignProofActionStage, pipeline v28+)",
      "in_production": false,
      "production_note": "live runs v27; stage not routed",
      "identity_policy": "pinned signer, mandatory agent/tenant",
      "action_binding": "arguments_digest mandatory",
      "human_approval": "n/a",
      "expiry_replay": "valid_until mandatory; NonceLedger consumed last",
      "enforcement_before_side_effect": "would be (restriction-only)",
      "kernel_runtime_controls": "none",
      "bypass_tests": [
        "test_sovereign_e1_hosted_proof_stage_fail_closed.py"
      ],
      "limitations": [
        "PROVED is a signed claim; Z3 not re-run",
        "promotion to production needs a reviewed migration"
      ],
      "owner": "-46"
    },
    {
      "route": "SDK guard (cain.guard / cain_sdk.guard)",
      "in_production": true,
      "production_note": "in-process in customer code via the served cainstudio SDK? (guard is in cain/; served wheel is cainstudio client only -- distribution unverified)",
      "identity_policy": "local allowlist or remote gateway decision",
      "action_binding": "per call",
      "human_approval": "gateway-dependent",
      "expiry_replay": "n/a",
      "enforcement_before_side_effect": "yes when the host app calls the guard",
      "kernel_runtime_controls": "none",
      "bypass_tests": [
        "test_guard_default_path_bypasses.py",
        "test_cain_guard_jit_integration.py"
      ],
      "limitations": [
        "T-S17-04 unsigned gateway ALLOW accepted",
        "offline fallback fixed 9672bdc1"
      ],
      "owner": "-17"
    },
    {
      "route": "Gateway exec/sandbox routes (/sandbox/execute, /frontier/kernel/sandbox-run, /fabric/openshell/execute-sandboxed, /fabric/contracts/invoke-exec, /fabric/continuum/verify/run)",
      "in_production": true,
      "production_note": "per s17 alternative_routes_checked",
      "identity_policy": "tenant key / operator credential / disabled by default",
      "action_binding": "route-specific",
      "human_approval": "none",
      "expiry_replay": "n/a",
      "enforcement_before_side_effect": "authentication only",
      "kernel_runtime_controls": "not re-verified in Evolution 3",
      "bypass_tests": [
        "s17 tests"
      ],
      "limitations": [
        "no MCPGate decision; credential theft"
      ],
      "owner": "-17"
    },
    {
      "route": "Subprocess / filesystem / network performed by a running tool server",
      "in_production": "n/a",
      "production_note": "",
      "identity_policy": "none",
      "action_binding": "none",
      "human_approval": "none",
      "expiry_replay": "none",
      "enforcement_before_side_effect": "stdio: kernel blocks fs/TCP outside a Landlock profile when configured; privilege syscalls via seccomp. hosted: nothing",
      "kernel_runtime_controls": "Landlock ABI 8 + seccomp (stdio only)",
      "bypass_tests": [
        "test_sovereign_e3_landlock.py",
        "test_sovereign_e2_stdio_seccomp_reality.py"
      ],
      "limitations": [
        "telemetry (eBPF tracepoint) is NOT counted as enforcement"
      ],
      "owner": "-46 / owner"
    }
  ]
}