{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "schemas/cancel_on_success_e2e_audit.schema.json",
  "title": "task-2553+48.cancel-on-success-e2e-audit_v1",
  "description": "task-2553+48 회장 §1/§3 — cancel-on-success live remove END-TO-END 실증 audit. 단일 레코드는 (a) properly-bound 4-tuple 이 +44 guard 정합 기록 + +47 write_back_completed COMPLETED 로 구성되어 live cron id == ledger id·role=fallback 임을, (b) 이 properly-bound 상태에서 +45 run_cancel_on_success_live_wiring 경유 → +37→+25→+23 seam → live verifier 5조건 AND PASS → bound fallback 1건 cron-remove 됨을, (c) normal durable-success 후 fallback 발화 0(실 제거 입증) 임을 전수 기록한다. normal_success_unchanged 는 디커플 절대불변(true) — cron-remove 실패/skip/exception 이 normal collector success 를 뒤집지 않는다 (회장 §3, 9-R.1 Layer A/B). 실 운영 cron 무접촉(전용 격리 FakeCronWorld/Spy) — 실 운영 fallback cron 강제삭제 0.",
  "type": "object",
  "required": [
    "schema",
    "event_id",
    "task_id",
    "target_cron_id",
    "verdict",
    "properly_bound",
    "lookup_status",
    "binding_construction",
    "binding_integrity",
    "cancel_audit",
    "five_condition_results",
    "seam_invoked",
    "cron_remove_invoked",
    "fallback_cancelled",
    "fallback_preserved",
    "fallback_fire_proof",
    "wired_via_operational_collector_wiring",
    "normal_success_unchanged"
  ],
  "properties": {
    "schema": {
      "type": "string",
      "const": "task-2553+48.cancel-on-success-e2e-audit_v1"
    },
    "event_id": { "type": "string", "minLength": 1 },
    "task_id": { "type": "string", "minLength": 1 },
    "target_cron_id": {
      "type": "string",
      "minLength": 1,
      "description": "properly-bound fallback_callback_cron_id (live cron id == ledger id). properly-bound 불성립 시 '<UNBOUND>' (remove 0)."
    },
    "verdict": {
      "type": "string",
      "enum": ["E2E_PASS", "E2E_PRESERVED", "E2E_DECOUPLED"],
      "description": "E2E_PASS = properly-bound + 5조건 AND PASS + 실제 cron-remove + fallback 발화 0. E2E_PRESERVED = mismatch/missing/unverified 보존·decouple. E2E_DECOUPLED = cron-remove 실패 → normal success decouple 유지."
    },
    "properly_bound": {
      "type": "boolean",
      "description": "+44 guard 정합 기록 + +47 write-back COMPLETED 로 4-tuple 이 live cron id == ledger id·role=fallback 로 구성되었는지."
    },
    "lookup_status": {
      "type": "string",
      "enum": [
        "LOOKUP_VERIFIED",
        "LOOKUP_NO_LEDGER_RECORD",
        "LOOKUP_NO_FALLBACK_BOUND",
        "LOOKUP_TRACK_MISMATCH",
        "LOOKUP_CHAT_MISMATCH",
        "LOOKUP_ROLE_MISMATCH",
        "LOOKUP_ERROR"
      ]
    },
    "binding_construction": {
      "type": "object",
      "description": "+44 guard 정합 기록 + +47 write_back_completed COMPLETED 구성 증거.",
      "required": [
        "guard_registered_appended",
        "writeback_status",
        "writeback_appended",
        "ledger_path"
      ],
      "properties": {
        "guard_registered_appended": { "type": "boolean" },
        "writeback_status": {
          "type": "string",
          "enum": [
            "WRITEBACK_COMPLETED",
            "WRITEBACK_IDEMPOTENT_SKIP",
            "CALLBACK_MANDATORY_VIOLATION",
            "SKIPPED_EXTERNAL_LEDGER"
          ]
        },
        "writeback_appended": { "type": "boolean" },
        "ledger_path": { "type": "string" }
      },
      "additionalProperties": true
    },
    "binding_integrity": {
      "type": "object",
      "description": "properly-bound 무결성 — live cron id == ledger id · role=fallback.",
      "required": [
        "ok",
        "completed_present",
        "role_is_fallback",
        "chat_owned",
        "single_live_fallback",
        "live_eq_ledger",
        "marker_eq_ledger"
      ],
      "properties": {
        "ok": { "type": "boolean" },
        "completed_present": { "type": "boolean" },
        "role_is_fallback": { "type": "boolean" },
        "chat_owned": { "type": "boolean" },
        "single_live_fallback": {
          "type": "boolean",
          "description": "task/role 매칭 live fallback 이 정확히 1건 (Codex F1 — 모호 binding 시 false → 보존). bound·verified single cancel 보장(회장 §1·Layer B)."
        },
        "live_eq_ledger": { "type": "boolean" },
        "marker_eq_ledger": { "type": "boolean" },
        "ledger_fallback_cron_id": { "type": ["string", "null"] },
        "live_cron_id": { "type": ["string", "null"] },
        "marker_fallback_cron_id": { "type": ["string", "null"] }
      },
      "additionalProperties": true
    },
    "cancel_audit": {
      "type": "object",
      "description": "+45 cancel_on_success_audit.schema.json 정합 레코드 (nested — 별도 검증). 본 e2e audit 는 그것을 wrap 한다.",
      "additionalProperties": true
    },
    "five_condition_results": {
      "type": ["object", "null"],
      "description": "+23 live cron-state verifier 5조건 AND 결과 (seam 미진입 시 null).",
      "properties": {
        "c1_task_id_match": { "type": ["boolean", "null"] },
        "c2_chat_id_owned": { "type": ["boolean", "null"] },
        "c3_role_fallback": { "type": ["boolean", "null"] },
        "c4_marker_id_crosscheck": { "type": ["boolean", "null"] },
        "c5_pending_not_fired_not_removed": { "type": ["boolean", "null"] },
        "all_satisfied": { "type": ["boolean", "null"] }
      },
      "additionalProperties": true
    },
    "seam_invoked": { "type": "boolean" },
    "cron_remove_invoked": { "type": "boolean" },
    "fallback_cancelled": { "type": "boolean" },
    "fallback_preserved": { "type": "boolean" },
    "fallback_fire_proof": {
      "type": "object",
      "description": "normal durable-success 후 fallback 발화 0 end-to-end 입증.",
      "required": [
        "cron_removed",
        "post_success_fire_attempts",
        "fallback_fired_count"
      ],
      "properties": {
        "cron_removed": { "type": "boolean" },
        "post_success_fire_attempts": { "type": "integer", "minimum": 0 },
        "fallback_fired_count": {
          "type": "integer",
          "minimum": 0,
          "description": "E2E_PASS 시 반드시 0 — bound fallback cron 실제 제거로 이후 발화 불가."
        },
        "note": { "type": "string" }
      },
      "additionalProperties": true
    },
    "wired_via_operational_collector_wiring": {
      "type": "boolean",
      "description": "live collector path 가 operational_collector_wiring 를 경유함 (회장 §3 결선 증명)."
    },
    "normal_success_unchanged": {
      "type": "boolean",
      "const": true,
      "description": "디커플 절대불변 — cron-remove 실패/skip/exception 이 normal collector success 를 실패로 바꾸지 않는다 (회장 §3)."
    },
    "canonical_root": { "type": ["string", "null"] },
    "ledger_path": { "type": ["string", "null"] },
    "notes": { "type": "array", "items": { "type": "string" } },
    "ts_utc": { "type": ["string", "null"] }
  },
  "additionalProperties": true
}
