{
 "authority": "NONE",
 "commit": "d18d89d850b85a23647bf7959e816bad97a573dc",
 "conditions": {
  "concurrency": 1,
  "cpu": "Intel Xeon Processor (Cascadelake)",
  "cpu_count": 2,
  "host": "vultr",
  "note": "single-host, in-process measurements of the library; not production traffic",
  "process": "single process, in-memory",
  "python": "3.14.4"
 },
 "enabled_in_production": false,
 "gate": "6_mcpgate_dynamic_routing_no_bypass",
 "gate_verdict": "PASS",
 "gate_verdict_reason": "gate 6 asks for dynamic routing with no authorization bypass: the router is wired into the MCPGate proxy behind CAIN_MCP_RESIDENCY and the bypass suite passes on that real path (every tools/call decision identical with residency on and off; evicted tools fully evaluated; a tool flooded into HOT still denied). The flag is OFF in production: no production traffic has used it",
 "generated_at": "2026-09-29T14:45:52Z",
 "measurements": [
  {
   "context_bytes_all_schemas": 16324,
   "context_bytes_resident": 2623,
   "context_reduction_x": 6.22,
   "denied_by_cain": 40,
   "evidence_chain_intact": true,
   "evidence_records": 2000,
   "max_resident": 8,
   "residency_plan": {
    "p50_us": 813.54,
    "p95_us": 2770.91,
    "p99_us": 3306.3,
    "samples": 50
   },
   "resident_now": 8,
   "route_cold_loaded_tool": {
    "p50_us": 17.01,
    "p95_us": 59.92,
    "p99_us": 512.2,
    "samples": 1680
   },
   "route_resident_tool": {
    "p50_us": 17.16,
    "p95_us": 75.73,
    "p99_us": 416.68,
    "samples": 320
   },
   "tools": 50
  },
  {
   "context_bytes_all_schemas": 65424,
   "context_bytes_resident": 5252,
   "context_reduction_x": 12.46,
   "denied_by_cain": 20,
   "evidence_chain_intact": true,
   "evidence_records": 2000,
   "max_resident": 16,
   "residency_plan": {
    "p50_us": 6178.55,
    "p95_us": 32450.98,
    "p99_us": 51361.0,
    "samples": 50
   },
   "resident_now": 16,
   "route_cold_loaded_tool": {
    "p50_us": 18.52,
    "p95_us": 94.69,
    "p99_us": 611.31,
    "samples": 1840
   },
   "route_resident_tool": {
    "p50_us": 19.77,
    "p95_us": 181.56,
    "p99_us": 461.73,
    "samples": 160
   },
   "tools": 200
  },
  {
   "context_bytes_all_schemas": 327558,
   "context_bytes_resident": 10522,
   "context_reduction_x": 31.13,
   "denied_by_cain": 20,
   "evidence_chain_intact": true,
   "evidence_records": 2000,
   "max_resident": 32,
   "residency_plan": {
    "p50_us": 41426.58,
    "p95_us": 110335.05,
    "p99_us": 143027.7,
    "samples": 50
   },
   "resident_now": 32,
   "route_cold_loaded_tool": {
    "p50_us": 17.48,
    "p95_us": 40.45,
    "p99_us": 355.75,
    "samples": 1936
   },
   "route_resident_tool": {
    "p50_us": 17.52,
    "p95_us": 61.2,
    "p99_us": 80.56,
    "samples": 64
   },
   "tools": 1000
  }
 ],
 "module_sha256": "09cb3614a7ae6e44526aa35bb473968053cdbb4b94122b926da178cff5a42a7a",
 "properties_tested": [
  "residency bounded by count and bytes; pinned always resident",
  "planning deterministic",
  "prediction never grants authorization (a flooded HOT tool is still denied by CAIN)",
  "evicted tools remain callable only through full authorization (cold load)",
  "canonical schemas are never deleted",
  "a tampered resident schema copy is discarded; the canonical digest-checked schema is used",
  "unknown tool / missing arguments / oversize request never reach the tool",
  "authorizer error is DENY",
  "the authorizer receives no residency information",
  "every decision is hash-chained evidence; tampering is detected",
  "evidence backlog limit produces backpressure, not growth"
 ],
 "schema": "cain42.aplus.gate6.mcp-residency.v1",
 "status": "IMPLEMENTED_AND_WIRED_BEHIND_FLAG",
 "tests": {
  "errors": 0,
  "failed": 0,
  "files": [
   "tests/test_mcp_residency_router.py",
   "tests/test_mcp_proxy_residency_wiring.py"
  ],
  "passed": 20,
  "summary": "20 passed in 2.28s"
 },
 "tiers": [
  "PINNED",
  "HOT",
  "WARM",
  "COLD",
  "EVICTED"
 ],
 "wired_into_mcpgate_proxy": "cain/mcp_proxy.py, CAIN_MCP_RESIDENCY=1 (default OFF)"
}
