{
  "schema_version": 1,
  "diagram_type": "sequence",
  "meta": {
    "title": "Sonnet: отказ → новый оффер",
    "quality_profile": "showcase",
    "column_fit": "spread",
    "viewBox": [
      1260,
      780
    ]
  },
  "participants": [
    {
      "id": "gw",
      "label": "api-gateway",
      "type": "backend"
    },
    {
      "id": "ts",
      "label": "task-service",
      "type": "backend"
    },
    {
      "id": "nats",
      "label": "NATS",
      "type": "messagebus"
    },
    {
      "id": "ms",
      "label": "matching-service",
      "type": "backend"
    },
    {
      "id": "ns",
      "label": "notification-service",
      "type": "backend"
    }
  ],
  "messages": [
    {
      "from": "gw",
      "to": "ts",
      "y": 180,
      "label": "DeclineOffer",
      "variant": "default"
    },
    {
      "from": "ts",
      "to": "nats",
      "y": 252,
      "label": "offer.declined / outbox",
      "variant": "dashed"
    },
    {
      "from": "nats",
      "to": "ms",
      "y": 324,
      "label": "offer.declined",
      "variant": "dashed"
    },
    {
      "from": "ms",
      "to": "nats",
      "y": 396,
      "label": "match.found / outbox",
      "variant": "dashed"
    },
    {
      "from": "nats",
      "to": "ts",
      "y": 468,
      "label": "match.found → assigned",
      "variant": "dashed"
    },
    {
      "from": "nats",
      "to": "ns",
      "y": 540,
      "label": "match.found",
      "variant": "dashed"
    }
  ],
  "cards": [
    {
      "dot": "amber",
      "title": "Что происходит внутри",
      "items": [
        "matching: дедуп (task_id, attempt), затем snapshot[attempt].",
        "notification: дедуп match_id; оффер и уведомление клиента представлены логами."
      ]
    }
  ]
}