{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "schemas/runtime_event_enactor_result.schema.json",
  "title": "runtime_event_enactor_result.v1",
  "description": "task-2553+55 — result of the bounded runtime-event enactor. The enactor consumes +54 proposal candidates and enacts ONLY authorized bounded actions: Track A (final consolidated closeout) is enacted as an ADDITIVE artifact only; Track B (next_dispatch_candidate) is verify-only (dispatch-ready, never promoted here); Track C (hold_packet) is verify-only routing. merge/PR/credential/branch is BLOCKED. A dead-man/fixed-time/fallback progress trigger is a hard FAIL. Idempotent across re-processing.",
  "type": "object",
  "required": [
    "schema",
    "verdict",
    "progress_trigger",
    "fixed_time_used",
    "dead_man_used",
    "fallback_used",
    "authority",
    "auto_executed",
    "merge_pr_branch_credential",
    "loop_result_sha256",
    "proposals_total",
    "enacted_count",
    "idempotent_skip_count",
    "dispatch_ready_count",
    "blocked_count",
    "hold_routed_count",
    "records",
    "additive_artifacts",
    "hold_for_chair"
  ],
  "properties": {
    "schema": {"const": "runtime_event_enactor_result.v1"},
    "generated_at_kst": {"type": "string"},
    "verdict": {
      "type": "string",
      "enum": [
        "ENACTED",
        "IDEMPOTENT_SKIP",
        "NO_ACTION",
        "FORBIDDEN_TRIGGER_SOURCE",
        "HOLD_FOR_CHAIR"
      ]
    },
    "progress_trigger": {
      "type": ["string", "null"],
      "enum": ["registry_completed_event", null],
      "description": "ALWAYS registry_completed_event; null when the trigger was rejected (FORBIDDEN_TRIGGER_SOURCE)."
    },
    "fixed_time_used": {
      "const": false,
      "description": "Invariant — a fixed-time gate is NEVER a progress trigger."
    },
    "dead_man_used": {
      "const": false,
      "description": "Invariant — a dead-man fallback is NEVER a progress trigger."
    },
    "fallback_used": {
      "const": false,
      "description": "Invariant — a fallback source is NEVER a progress trigger."
    },
    "authority": {
      "const": "none",
      "description": "The enactor has zero merge/PR/branch/credential/dispatch authority."
    },
    "auto_executed": {"const": false},
    "merge_pr_branch_credential": {
      "const": "blocked",
      "description": "merge / PR / branch-write / credential is blocked by default (회장 §2.7/§6)."
    },
    "loop_result_sha256": {"type": "string", "minLength": 64},
    "proposals_total": {"type": "integer", "minimum": 0},
    "enacted_count": {"type": "integer", "minimum": 0},
    "idempotent_skip_count": {"type": "integer", "minimum": 0},
    "dispatch_ready_count": {"type": "integer", "minimum": 0},
    "blocked_count": {"type": "integer", "minimum": 0},
    "hold_routed_count": {"type": "integer", "minimum": 0},
    "records": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "proposal_type",
          "action",
          "source_id",
          "authorized",
          "enacted",
          "idempotent_skip"
        ],
        "properties": {
          "proposal_type": {
            "type": "string",
            "enum": [
              "consolidated_summary",
              "closeout_candidate",
              "next_dispatch_candidate",
              "hold_packet",
              "unknown_proposal"
            ]
          },
          "action": {
            "type": "string",
            "enum": [
              "ENACT_ADDITIVE",
              "DISPATCH_READY",
              "PROPOSAL_ONLY",
              "BLOCKED",
              "HOLD_ROUTED"
            ]
          },
          "authorized": {"type": "boolean"},
          "enacted": {"type": "boolean"},
          "idempotent_skip": {"type": "boolean"},
          "artifact_target": {"type": ["string", "null"]},
          "enact_id": {"type": ["string", "null"]}
        },
        "additionalProperties": true
      }
    },
    "additive_artifacts": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["target", "enact_id", "written"],
        "properties": {
          "target": {"type": "string"},
          "enact_id": {"type": "string"},
          "written": {"type": "boolean"}
        },
        "additionalProperties": true
      }
    },
    "hold_for_chair": {"type": "boolean"},
    "reasons": {"type": "array", "items": {"type": "string"}}
  },
  "additionalProperties": true
}
