{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "schemas/executor_completion_contract.schema.json",
  "title": "executor_completion_contract.v1",
  "description": "task-2553+32 §4.4/§4.6/§4.7 — executor completion lifecycle contract. The executor normal completion callback is a MANDATORY lifecycle signal (회장 정정 doctrine, memory/events/task-2553.normal-callback-mandatory-doctrine-correction_260518.json). NO-CRON == registry/checkpoint MUST NOT arbitrarily add/remove cron; it does NOT forbid the executor completion callback (§4.2/§6.3/§6.5). runtime checkpoint (+31) is a RECOVERY layer, never the primary path (§4.7/§6.13).",
  "type": "object",
  "required": [
    "schema",
    "task_id",
    "executor_completion_callback_required",
    "no_cron_corrected_definition",
    "callback_4tuple",
    "closeout_checklist",
    "primary_path",
    "recovery_layer"
  ],
  "properties": {
    "schema": { "type": "string", "const": "executor_completion_contract.v1" },
    "task_id": { "type": "string", "minLength": 1 },
    "executor_completion_callback_required": {
      "type": "boolean",
      "const": true,
      "description": "MANDATORY lifecycle signal (§4.6). Always true."
    },
    "no_cron_corrected_definition": {
      "type": "string",
      "minLength": 1,
      "description": "§4.2/§6.3 — registry/checkpoint no arbitrary cron add/remove; executor completion callback is the exempt mandatory lifecycle signal."
    },
    "callback_4tuple": { "$ref": "callback_4tuple.schema.json" },
    "closeout_checklist": {
      "type": "object",
      "required": [
        "result_json_present",
        "done_marker_present",
        "report_present",
        "normal_callback_registration_evidence"
      ],
      "properties": {
        "result_json_present": { "type": "boolean" },
        "done_marker_present": { "type": "boolean" },
        "report_present": { "type": "boolean" },
        "normal_callback_registration_evidence": {
          "type": "boolean",
          "const": true,
          "description": "§4.4 — required evidence the executor registered its normal completion callback. Absence => not a valid normal lifecycle completion (§4.6)."
        },
        "claims_finalization_authority": {
          "type": "boolean",
          "description": "9-R.2/§6.15 — must be false. Lifecycle signal, never repository/task-state finalization-authority escalation."
        }
      },
      "additionalProperties": true
    },
    "primary_path": {
      "type": "string",
      "const": "executor_normal_completion_callback",
      "description": "§6.13 — the callback is primary; registry/checkpoint never replaces it."
    },
    "recovery_layer": {
      "type": "string",
      "const": "anu_v3.runtime_reconcile_checkpoint",
      "description": "§4.7/§6.7 — +31 checkpoint is the read-only recovery layer (not primary)."
    },
    "safety_path": {
      "type": "string",
      "const": "fallback_dead_man_callback",
      "description": "§4.8/§6.6/§6.14 — fallback preserved as safety path; never discarded."
    },
    "result_ready_no_normal_callback_is_recovery_state": {
      "type": "boolean",
      "const": true,
      "description": "§6.8/§6.9 — RESULT_READY_NO_NORMAL_CALLBACK is a recovery state, not a normal lifecycle complete."
    }
  },
  "additionalProperties": true
}
