{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://oms.local/schemas/codex-grader-output.schema.json",
  "title": "OMS Codex grader model output",
  "type": "object",
  "additionalProperties": false,
  "required": ["verdict", "summary", "deterministic_evidence", "failures"],
  "properties": {
    "verdict": { "type": "string", "enum": ["pass", "fail"] },
    "summary": { "type": "string", "minLength": 1, "maxLength": 8192 },
    "deterministic_evidence": {
      "type": "object",
      "additionalProperties": false,
      "required": ["evidence_id", "sha256", "file_name"],
      "properties": {
        "evidence_id": { "type": "string", "pattern": "^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$" },
        "sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
        "file_name": { "type": "string", "minLength": 6, "maxLength": 69 }
      }
    },
    "failures": {
      "type": "array",
      "maxItems": 64,
      "items": { "type": "string", "minLength": 1, "maxLength": 4096 }
    }
  }
}
