{
  "$defs": {
    "EvaluationSource": {
      "additionalProperties": false,
      "properties": {
        "artifact_index_sha256": {
          "pattern": "^[0-9a-f]{64}$",
          "title": "Artifact Index Sha256",
          "type": "string"
        },
        "candidate_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Candidate Id",
          "type": "string"
        },
        "contract_version": {
          "const": "1.0.0",
          "default": "1.0.0",
          "title": "Contract Version",
          "type": "string"
        },
        "input_snapshot_sha256": {
          "pattern": "^[0-9a-f]{64}$",
          "title": "Input Snapshot Sha256",
          "type": "string"
        },
        "manifest_sha256": {
          "pattern": "^[0-9a-f]{64}$",
          "title": "Manifest Sha256",
          "type": "string"
        },
        "result_index_sha256": {
          "pattern": "^[0-9a-f]{64}$",
          "title": "Result Index Sha256",
          "type": "string"
        },
        "run_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Run Id",
          "type": "string"
        }
      },
      "required": [
        "candidate_id",
        "run_id",
        "manifest_sha256",
        "input_snapshot_sha256",
        "result_index_sha256",
        "artifact_index_sha256"
      ],
      "title": "EvaluationSource",
      "type": "object"
    },
    "ReconciliationItem": {
      "additionalProperties": false,
      "properties": {
        "disposition": {
          "enum": [
            "agreement",
            "disagreement",
            "deterministic_blind_spot",
            "agent_correction",
            "unresolved"
          ],
          "title": "Disposition",
          "type": "string"
        },
        "evidence_ids": {
          "items": {
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
            "type": "string"
          },
          "minItems": 1,
          "title": "Evidence Ids",
          "type": "array"
        },
        "finding_ids": {
          "default": [],
          "items": {
            "maxLength": 128,
            "minLength": 1,
            "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
            "type": "string"
          },
          "title": "Finding Ids",
          "type": "array"
        },
        "item_id": {
          "maxLength": 128,
          "minLength": 1,
          "pattern": "^[a-z][a-z0-9]*(?:[._:-][a-z0-9]+)*$",
          "title": "Item Id",
          "type": "string"
        },
        "rationale": {
          "maxLength": 3000,
          "minLength": 1,
          "title": "Rationale",
          "type": "string"
        }
      },
      "required": [
        "item_id",
        "disposition",
        "evidence_ids",
        "rationale"
      ],
      "title": "ReconciliationItem",
      "type": "object"
    }
  },
  "$id": "urn:sindri:contracts:1.0.0:review-reconciliation",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "assessment_sha256": {
      "pattern": "^[0-9a-f]{64}$",
      "title": "Assessment Sha256",
      "type": "string"
    },
    "authority": {
      "const": "advisory",
      "default": "advisory",
      "title": "Authority",
      "type": "string"
    },
    "blind_review_sha256": {
      "pattern": "^[0-9a-f]{64}$",
      "title": "Blind Review Sha256",
      "type": "string"
    },
    "items": {
      "default": [],
      "items": {
        "$ref": "#/$defs/ReconciliationItem"
      },
      "maxItems": 100,
      "title": "Items",
      "type": "array"
    },
    "schema_kind": {
      "const": "review_reconciliation",
      "default": "review_reconciliation",
      "title": "Schema Kind",
      "type": "string"
    },
    "schema_version": {
      "const": "1.0.0",
      "default": "1.0.0",
      "title": "Schema Version",
      "type": "string"
    },
    "source": {
      "$ref": "#/$defs/EvaluationSource"
    },
    "summary": {
      "maxLength": 4000,
      "minLength": 1,
      "title": "Summary",
      "type": "string"
    }
  },
  "required": [
    "source",
    "blind_review_sha256",
    "assessment_sha256",
    "summary"
  ],
  "title": "ReviewReconciliation",
  "type": "object",
  "x-sindri-contract-suite": "sindri.contracts",
  "x-sindri-contract-version": "1.0.0"
}
