{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "schemas/self_collector_guard.schema.json",
  "title": "anu_v3.self_collector_guard.v1",
  "description": "task-2553+49 AUTHORITATIVE §3/§5.A — executor self-collector / self-adjudication / self-dispatch runtime structural-block guard result. self iff actor_key==executor_key OR collector_key==executor_key OR explicit self-session escalation. FAIL blocks the action (self_collector | self_adjudication | self_dispatch).",
  "type": "object",
  "required": [
    "schema",
    "verdict",
    "classification",
    "is_executor_self_session",
    "blocked_action",
    "reasons"
  ],
  "properties": {
    "schema": { "const": "anu_v3.self_collector_guard.v1" },
    "verdict": { "enum": ["PASS", "FAIL"] },
    "classification": {
      "type": ["string", "null"],
      "enum": [
        "SELF_COLLECTOR_FORBIDDEN",
        "EXECUTOR_SELF_ADJUDICATION_FORBIDDEN",
        "EXECUTOR_SELF_DISPATCH_FORBIDDEN",
        "CALLBACK_COLLECTOR_NOT_ANU",
        null
      ]
    },
    "is_executor_self_session": { "type": "boolean" },
    "blocked_action": {
      "type": ["string", "null"],
      "enum": ["self_collector", "self_adjudication", "self_dispatch", null]
    },
    "reasons": { "type": "array", "items": { "type": "string" } }
  },
  "allOf": [
    {
      "if": { "properties": { "verdict": { "const": "FAIL" } } },
      "then": {
        "properties": {
          "classification": { "type": "string" },
          "blocked_action": { "type": "string" }
        }
      }
    },
    {
      "if": { "properties": { "verdict": { "const": "PASS" } } },
      "then": {
        "properties": {
          "classification": { "const": null },
          "blocked_action": { "const": null }
        }
      }
    }
  ],
  "additionalProperties": true
}
