{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "schemas/authoritative_verdict_selection.schema.json",
  "title": "anu_v3.authoritative_verdict_selection.v1",
  "description": "task-2553+49 AUTHORITATIVE §5.D — authoritative verdict selection. self-chain verdict is permanently QUARANTINED (non-authoritative). independent-ANU verdict (collector_key is an ANU key, != executor_key, role=ANU, not executor self-session) is authoritative. dead-man DUPLICATE_CALLBACK_IGNORED is valid ONLY when an independent-ANU authoritative verdict also exists. self-chain only => AUTHORITATIVE_VERDICT_PENDING + verdict FAIL (independent ANU verdict 없이 self-chain 만으로 PASS 확정 금지). AUTHORITATIVE_PASS requires an independent-ANU PASS.",
  "type": "object",
  "required": [
    "schema",
    "verdict",
    "classification",
    "task_id",
    "authoritative_verdict",
    "authoritative_source_kind",
    "quarantined_count",
    "independent_anu_count",
    "deadman_duplicate_seen",
    "deadman_valid",
    "reasons"
  ],
  "properties": {
    "schema": { "const": "anu_v3.authoritative_verdict_selection.v1" },
    "verdict": { "enum": ["PASS", "FAIL", "HOLD_FOR_CHAIR"] },
    "classification": {
      "enum": [
        "SELF_CHAIN_QUARANTINED",
        "AUTHORITATIVE_VERDICT_PENDING",
        "AUTHORITATIVE_PASS"
      ]
    },
    "task_id": { "type": "string" },
    "authoritative_verdict": { "type": ["string", "null"] },
    "authoritative_source_kind": { "type": ["string", "null"] },
    "quarantined_count": { "type": "integer", "minimum": 0 },
    "independent_anu_count": { "type": "integer", "minimum": 0 },
    "deadman_duplicate_seen": { "type": "boolean" },
    "deadman_valid": { "type": "boolean" },
    "reasons": { "type": "array", "items": { "type": "string" } }
  },
  "allOf": [
    {
      "if": { "properties": { "classification": { "const": "AUTHORITATIVE_PASS" } } },
      "then": {
        "properties": {
          "verdict": { "const": "PASS" },
          "independent_anu_count": { "minimum": 1 },
          "authoritative_verdict": { "const": "PASS" }
        }
      }
    },
    {
      "if": { "properties": { "independent_anu_count": { "const": 0 } } },
      "then": {
        "properties": {
          "verdict": { "const": "FAIL" },
          "classification": { "const": "AUTHORITATIVE_VERDICT_PENDING" },
          "authoritative_verdict": { "const": null },
          "deadman_valid": { "const": false }
        }
      }
    }
  ],
  "additionalProperties": true
}
