{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/eccaai-com/json-schema/eccaai-com-proof-record-schema.json",
  "title": "ProofRecord",
  "x-generated": "2026-11-06",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/eccaai-com-api-openapi.json#/components/schemas/ProofRecord",
  "type": "object",
  "properties": {
    "schema": {
      "const": "ecca.adjudicated-answer.v1"
    },
    "id": {
      "type": "string"
    },
    "prompt": {
      "type": "string",
      "maxLength": 6000
    },
    "answer": {
      "type": "string",
      "maxLength": 60000
    },
    "synthesis": {
      "type": "object",
      "properties": {
        "ratified_conclusion": {
          "type": "string"
        },
        "consensus_score": {
          "type": [
            "number",
            "null"
          ]
        },
        "divergence_score": {
          "type": [
            "number",
            "null"
          ]
        },
        "convergence_method": {
          "type": "string"
        },
        "providers": {
          "type": "array",
          "maxItems": 6,
          "items": {
            "$ref": "#/$defs/Engine"
          }
        },
        "disagreements": {
          "type": "array",
          "maxItems": 10
        },
        "adversarial_refutations": {
          "type": "array",
          "maxItems": 20
        },
        "engine_outputs": {
          "type": "array",
          "maxItems": 6,
          "items": {
            "$ref": "#/$defs/ProofEngineOutput"
          }
        }
      }
    },
    "verification": {
      "type": "object",
      "properties": {
        "findings": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "type": "object",
            "properties": {
              "label": {
                "type": "string"
              },
              "evidence": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "domain": {
      "type": "string"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "permanence": {
      "const": "durable-no-expiry"
    },
    "fixturePurpose": {
      "type": "string",
      "description": "Non-empty only on the two reserved recorded fixtures (fixture-base-rate-reasoning, fixture-document-claim-boundary)."
    },
    "documentLabel": {
      "type": "string"
    },
    "documentExcerpt": {
      "type": "string"
    },
    "check": {
      "type": [
        "object",
        "null"
      ],
      "description": "Present on proofs minted by mode check on POST /api/ecca-router: the CheckResult fields plus the candidate text (cut past 8000 characters, with candidateTruncated). Only the router's own in-process mint can store one; a check sent directly to this route is never stored. null otherwise."
    },
    "sources": {
      "type": "array",
      "maxItems": 10,
      "items": {
        "$ref": "#/$defs/ProofCitation"
      }
    }
  },
  "$defs": {
    "Engine": {
      "type": "object",
      "description": "One registered engine role. Identity only (id/name/role) on the registry read; live telemetry (status/ok/ms) after a dispatch. The registry holds up to 6 roles; how many answered is measured per response in meta.enginesLive.",
      "properties": {
        "id": {
          "type": "string",
          "enum": [
            "speed",
            "depth",
            "breadth",
            "logic",
            "context",
            "agentic"
          ]
        },
        "name": {
          "type": "string"
        },
        "role": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "live",
            "gated",
            "unavailable",
            "unconfigured"
          ]
        },
        "ok": {
          "type": "boolean"
        },
        "ms": {
          "type": [
            "integer",
            "null"
          ]
        },
        "receipt": {
          "type": "string"
        }
      }
    },
    "ProofCitation": {
      "type": "object",
      "description": "A citation from the dispatch's search receipt (meta.sources), copied. https only; a non-https or over-long url is dropped, never rewritten.",
      "properties": {
        "title": {
          "type": "string",
          "maxLength": 300
        },
        "url": {
          "type": "string",
          "format": "uri",
          "pattern": "^https://",
          "maxLength": 2048
        }
      }
    },
    "ProofEngineOutput": {
      "type": "object",
      "description": "One engine's own answer as the dispatch reported it, copied: a registered engine id, its role, whether it returned, and its text (null when it did not answer; up to 8000 characters).",
      "properties": {
        "engine": {
          "type": "string",
          "enum": [
            "speed",
            "depth",
            "breadth",
            "logic",
            "context",
            "agentic"
          ]
        },
        "role": {
          "type": "string"
        },
        "ok": {
          "type": "boolean"
        },
        "text": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 8000
        }
      }
    }
  }
}