{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "schemas/callback_owner_validation.schema.json",
  "title": "anu_v3.callback_owner_validation.v1",
  "description": "task-2553+49 AUTHORITATIVE §5.A/§5.C — callback owner/key/role runtime validator result, wired into the real callback registration helper path. PASS => registration allowed; FAIL/HOLD => registration BLOCKED (mismatch -> 등록 안 함, structural). Owner/key/role identity is authoritative; prompt text is NOT.",
  "type": "object",
  "required": [
    "schema",
    "verdict",
    "classifications",
    "registration_allowed",
    "owner_is_independent_anu",
    "task_id",
    "executor_key",
    "collector_key",
    "collector_role",
    "enforcement",
    "reasons"
  ],
  "properties": {
    "schema": { "const": "anu_v3.callback_owner_validation.v1" },
    "verdict": { "enum": ["PASS", "FAIL", "HOLD_FOR_CHAIR"] },
    "classifications": {
      "type": "array",
      "items": {
        "enum": [
          "SELF_COLLECTOR_FORBIDDEN",
          "EXECUTOR_SELF_ADJUDICATION_FORBIDDEN",
          "SELF_DISPATCH_FORBIDDEN",
          "EXECUTOR_SELF_DISPATCH_FORBIDDEN",
          "CALLBACK_OWNER_MISMATCH",
          "CALLBACK_COLLECTOR_NOT_ANU",
          "CALLBACK_4TUPLE_INVALID",
          "DISPATCH_PATH_BYPASSED_CONTRACT",
          "WRITEBACK_BINDING_CONFLICT"
        ]
      }
    },
    "primary_classification": { "type": ["string", "null"] },
    "registration_allowed": { "type": "boolean" },
    "owner_is_independent_anu": { "type": "boolean" },
    "task_id": { "type": "string" },
    "executor_key": { "type": "string" },
    "collector_key": { "type": "string" },
    "collector_role": { "type": "string" },
    "enforcement": { "type": "object" },
    "reasons": { "type": "array", "items": { "type": "string" } }
  },
  "allOf": [
    {
      "if": { "properties": { "verdict": { "const": "PASS" } } },
      "then": {
        "properties": {
          "registration_allowed": { "const": true },
          "owner_is_independent_anu": { "const": true }
        }
      }
    },
    {
      "if": { "properties": { "verdict": { "enum": ["FAIL", "HOLD_FOR_CHAIR"] } } },
      "then": { "properties": { "registration_allowed": { "const": false } } }
    }
  ],
  "additionalProperties": true
}
