{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schemaVersion", "recordType", "candidateId", "sourceCommit", "gitTree",
    "scopeSha256", "exerciseId", "objectiveId", "startedAtUtc", "endedAtUtc",
    "participantIdentityIds", "channelIds", "assertions", "allPassed"
  ],
  "properties": {
    "schemaVersion": {"const": "1.0.0"},
    "recordType": {"const": "incident-objective-output"},
    "candidateId": {"type": "string", "pattern": "^sha256:[0-9a-f]{64}$"},
    "sourceCommit": {"type": "string", "pattern": "^[0-9a-f]{40}$"},
    "gitTree": {"type": "string", "pattern": "^[0-9a-f]{40}$"},
    "scopeSha256": {"type": "string", "pattern": "^[0-9a-f]{64}$"},
    "exerciseId": {"type": "string", "pattern": "^incident-exercise:[0-9a-f]{64}$"},
    "objectiveId": {"enum": ["detect", "triage", "escalate", "contain", "notify-partner"]},
    "startedAtUtc": {"type": "string", "format": "date-time"},
    "endedAtUtc": {"type": "string", "format": "date-time"},
    "participantIdentityIds": {
      "type": "array", "minItems": 3, "maxItems": 3, "uniqueItems": true,
      "items": {"type": "string", "pattern": "^identity:[0-9a-f]{64}$"}
    },
    "channelIds": {
      "type": "array", "minItems": 1, "uniqueItems": true,
      "items": {"type": "string", "pattern": "^channel:[0-9a-f]{64}$"}
    },
    "assertions": {
      "type": "array", "minItems": 1, "uniqueItems": true,
      "items": {
        "type": "object", "additionalProperties": false,
        "required": ["assertionId", "expectedOutcome", "observedOutcome", "passed", "evidencePath", "evidenceSha256"],
        "properties": {
          "assertionId": {"type": "string", "pattern": "^assertion:[0-9a-f]{64}$"},
          "expectedOutcome": {"const": "objective-satisfied"},
          "observedOutcome": {"const": "objective-satisfied"},
          "passed": {"const": true},
          "evidencePath": {"type": "string", "pattern": "^pr10/partner-package/evidence/organizational/incident-assertions/[a-z0-9-]+\\.json$"},
          "evidenceSha256": {"type": "string", "pattern": "^[0-9a-f]{64}$"}
        }
      }
    },
    "allPassed": {"const": true}
  }
}
