{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "schemas/live_cancel_verifier_result.schema.json",
  "title": "live_cron_state_verification_v1",
  "description": "task-2553+45 회장 §3 — live cron-state verifier 5조건 AND 결과. 운영 collector 가 durable-bound fallback callback cron 을 실제 제거하기 직전, 실 cron 상태를 live 조회해 5조건(task_id·chat_id·role·marker crosscheck·pending-not-fired-not-removed) 전부 positive 확정 시에만 remove_allowed=true. 하나라도 미충족/조회실패/idempotent → SKIP, 실 remove 0, fallback 보존 (+23 utils.live_cron_state_verifier.LiveCronStateVerification.to_dict() 와 동일 형상). live 조회가 권위, marker.fallback_cron_id 는 교차입력일 뿐 단독 권위 아님.",
  "type": "object",
  "required": [
    "schema",
    "task_id",
    "target_cron_id",
    "classification",
    "remove_allowed",
    "checks"
  ],
  "properties": {
    "schema": {
      "type": "string",
      "const": "live_cron_state_verification_v1"
    },
    "task_id": {
      "type": "string",
      "minLength": 1
    },
    "target_cron_id": {
      "type": "string",
      "minLength": 1
    },
    "classification": {
      "type": "string",
      "enum": [
        "VERIFIED",
        "SKIP_QUERY_FAILED",
        "SKIP_NOT_FOUND",
        "SKIP_ALREADY_REMOVED",
        "SKIP_ALREADY_FIRED",
        "SKIP_MISMATCH",
        "SKIP_MARKER_ABSENT"
      ],
      "description": "VERIFIED 만 remove 허용. 그 외 모든 분류 → remove_allowed=false, 실 remove 0, fallback 보존."
    },
    "remove_allowed": {
      "type": "boolean",
      "description": "5조건 AND 전부 positive 확정(VERIFIED) 시에만 true. fail-safe: 모르면 false(보존)."
    },
    "checks": {
      "type": "object",
      "required": [
        "c1_task_id_match",
        "c2_chat_id_owned",
        "c3_role_fallback",
        "c4_marker_id_crosscheck",
        "c5_pending_not_fired_not_removed",
        "all_satisfied"
      ],
      "properties": {
        "c1_task_id_match": {
          "type": "boolean",
          "description": "live cron entry.task_id == 처리 task_id."
        },
        "c2_chat_id_owned": {
          "type": "boolean",
          "description": "live cron entry.chat_id == 6937032012 (ANU 소유)."
        },
        "c3_role_fallback": {
          "type": "boolean",
          "description": "live cron entry.role == 'fallback'."
        },
        "c4_marker_id_crosscheck": {
          "type": "boolean",
          "description": "dispatch-fired marker.fallback_callback_cron_id == target_cron_id == live entry.id (교차입력 일치)."
        },
        "c5_pending_not_fired_not_removed": {
          "type": "boolean",
          "description": "해당 cron 미발화(pending) AND 미제거."
        },
        "all_satisfied": {
          "type": "boolean",
          "description": "5조건 AND. true 일 때만 VERIFIED/remove_allowed=true."
        }
      }
    },
    "live_entry": {
      "type": ["object", "null"]
    },
    "marker_fallback_cron_id": {
      "type": ["string", "null"]
    },
    "skip_reason": {
      "type": "string"
    },
    "notes": {
      "type": "array",
      "items": { "type": "string" }
    },
    "ts_utc": {
      "type": "string"
    }
  },
  "additionalProperties": true
}
