{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/mumo-chat/json-schema/mumo-chat-replay-ack-schema.json",
  "title": "ReplayAck",
  "description": "An idempotent replay whose round entered the refund lifecycle. Carries every `Ack` field, with `status` reshaped and refund detail added. `processing_refund` means a refund is pending and `retry_after_ms` points at the 60s SLO deadline; `failed` with `refund_status: \"credited\"` is terminal and the round will not produce results. A replay whose round is HEALTHY returns the cached ack unchanged and is described by `Ack`, not this schema.",
  "x-generated": "2026-11-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/mumo-chat-openapi.yml#/components/schemas/ReplayAck",
  "type": "object",
  "required": [
    "session_id",
    "round_id",
    "round_index",
    "status",
    "refund_status"
  ],
  "properties": {
    "session_id": {
      "type": "string",
      "description": "Session UUID."
    },
    "round_id": {
      "type": "string",
      "description": "UUID of the replayed round."
    },
    "round_index": {
      "type": "integer",
      "description": "Zero-based index of the round."
    },
    "status": {
      "type": "string",
      "enum": [
        "processing_refund",
        "failed"
      ],
      "description": "`processing_refund` while a refund is pending, `failed` once it has credited. A healthy replay keeps `processing` and matches `Ack` instead."
    },
    "refund_status": {
      "type": "string",
      "enum": [
        "pending",
        "credited"
      ],
      "description": "Always present on this shape — it is what distinguishes a reshaped replay from a plain ack."
    },
    "failure_code": {
      "type": [
        "string",
        "null"
      ],
      "description": "Why the round failed, when the refund lifecycle was entered."
    },
    "retry_after_ms": {
      "type": "integer",
      "description": "Milliseconds until the 60s refund SLO deadline. Present only while `refund_status` is `pending`; clamped at 0."
    }
  },
  "additionalProperties": true
}