{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "urn:orbiplex:schema:corpus-reasoning-experiment-review:v4",
  "title": "Corpus Reasoning Experiment Review v4",
  "description": "A reviewer's signed verdict over exactly one typed experiment proposal: its ref and digest and the exact candidate artifact it carries. `evidence-state/digest` names the evidence the reviewer saw, the executed-run records published to the Room, in place of the Story 012 terminal snapshot. A reviewer never supplies a replacement candidate: `request-regeneration` asks the solver for a new candidate, which is a new proposal that needs its own review. Whether a review, a Chair decision and a proposal belong together is decided by the Corpus relation gate, not by this schema.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schema/v",
    "review/ref",
    "query/id",
    "room/id",
    "proposal/ref",
    "proposal/digest",
    "candidate",
    "reviewer",
    "reviewer/node-id",
    "reviewer-turn/id",
    "evidence-state/digest",
    "verdict",
    "findings",
    "class/key",
    "reviewed-at",
    "expires-at",
    "idempotency/key",
    "signature"
  ],
  "properties": {
    "schema/v": {
      "const": 4
    },
    "review/ref": {
      "type": "string",
      "pattern": "^corpus-experiment-review:sha256:[A-Za-z0-9_-]{43}$"
    },
    "query/id": {
      "type": "string",
      "pattern": "^query:[^\\s]+$",
      "maxLength": 512
    },
    "room/id": {
      "type": "string",
      "pattern": "^room:[^\\s]+$",
      "maxLength": 512
    },
    "proposal/ref": {
      "type": "string",
      "pattern": "^corpus-experiment:sha256:[A-Za-z0-9_-]{43}$"
    },
    "proposal/digest": {
      "type": "string",
      "pattern": "^sha256:[A-Za-z0-9_-]{43}$"
    },
    "candidate": {
      "$ref": "corpus-reasoning-experiment-proposal.v2.schema.json#/$defs/candidate"
    },
    "reviewer": {
      "$ref": "corpus-reasoning-room-policy.v1.schema.json#/$defs/room-subject"
    },
    "reviewer/node-id": {
      "type": "string",
      "pattern": "^node:did:key:[^\\s]+$",
      "maxLength": 512
    },
    "reviewer-turn/id": {
      "type": "string",
      "pattern": "^corpus-turn:sha256:[A-Za-z0-9_-]{43}$"
    },
    "evidence-state/digest": {
      "type": "string",
      "pattern": "^sha256:[A-Za-z0-9_-]{43}$"
    },
    "verdict": {
      "enum": [
        "accept",
        "reject",
        "request-regeneration"
      ]
    },
    "findings": {
      "type": "array",
      "minItems": 1,
      "maxItems": 16,
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 1024
      }
    },
    "reviewed/patches": {
      "$ref": "corpus-task-pack-review-verdict.v1.schema.json#/$defs/patches",
      "description": "Exact review claims covered by this signature. Historical reviews may omit them; new task-pack repair admission and recipe publication require complete coverage at the owning relation gate. Absence is never enriched into historical coverage."
    },
    "class/key": {
      "enum": [
        "Public",
        "Community",
        "Personal"
      ]
    },
    "reviewed-at": {
      "type": "string",
      "format": "date-time"
    },
    "expires-at": {
      "type": "string",
      "format": "date-time"
    },
    "idempotency/key": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256
    },
    "signature": {
      "$ref": "corpus-reasoning-experiment-proposal.v1.schema.json#/$defs/signature"
    }
  },
  "x-dia-status": "draft",
  "x-dia-basis": [
    "doc/project/40-proposals/069-corpus.md",
    "doc/project/40-proposals/094-operator-task-packs-for-bounded-problem-solving.md",
    "doc/project/30-stories/story-013-qmail-task-pack.md"
  ]
}
