$ uv run tools/flow.py push reference/lab02-example1-dlq.json
! unpublished '76 Intake · request rules (answer, Lab 01 task 2)' (w4bb85fc171aea9d): it used the same webhook path
✔ pushed '76 Intake · DLQ (reference, Lab 02 example 1, includes Lab 01 tasks)' (id w92de92194fc1657)
   POST http://localhost:5678/webhook/my-intake

$ uv run tools/flow.py test cases/lab02.json -v
✔ before: POST http://localhost:8800/tickets-reset · HTTP 200 · 0.0s · {"cleared": 0}
    → request  POST http://localhost:8800/tickets-reset
      {}
    ← response HTTP 200
      {
        "cleared": 0
      }
✔ before: POST http://localhost:8800/dlq-clear · HTTP 200 · 0.0s · {"cleared": 0}
    → request  POST http://localhost:8800/dlq-clear
      {}
    ← response HTTP 200
      {
        "cleared": 0
      }
✔ before: POST http://localhost:8800/alerts-clear · HTTP 200 · 0.0s · {"cleared": 0}
    → request  POST http://localhost:8800/alerts-clear
      {}
    ← response HTTP 200
      {
        "cleared": 0
      }
✔ before: POST http://localhost:8800/admin/fault · HTTP 200 · 0.0s · {"faq": "ok", "tickets": "ok", "prompts": "ok", "usage": "ok", "dlq": "ok", "slow_seconds": 8}
    → request  POST http://localhost:8800/admin/fault
      {
        "faq": "ok",
        "tickets": "ok",
        "prompts": "ok",
        "usage": "ok",
        "dlq": "ok"
      }
    ← response HTTP 200
      {
        "faq": "ok",
        "tickets": "ok",
        "prompts": "ok",
        "usage": "ok",
        "dlq": "ok",
        "slow_seconds": 8
      }
POST http://localhost:5678/webhook/my-intake · 4 case(s) × 1
✔ before: POST http://localhost:8800/admin/fault · HTTP 200 · 0.0s · {"faq": "ok", "tickets": "error", "prompts": "ok", "usage": "ok", "dlq": "ok", "slow_seconds": 8}
    → request  POST http://localhost:8800/admin/fault
      {
        "tickets": "error"
      }
    ← response HTTP 200
      {
        "faq": "ok",
        "tickets": "error",
        "prompts": "ok",
        "usage": "ok",
        "dlq": "ok",
        "slow_seconds": 8
      }
✔ 예제 1 · API가 멈추면 실패로 표시 · 200 · 4.1s
    → request  POST /webhook/my-intake
      {
        "requests": [
          {
            "id": "R-301",
            "user": "정우성",
            "text": "사내 위키 로그인이 안 돼요"
          },
          {
            "id": "R-302",
            "user": "이준호",
            "text": "노트북 배터리가 금방 닳아요"
          }
        ]
      }
    ← response HTTP 200
      {
        "total": 2,
        "created": 0,
        "failed": 2,
        "rejected": 0,
        "duplicates": 0,
        "unclassified": 0,
        "results": [
          {
            "id": "R-301",
            "status": "failed",
            "reason": "500 - \"{\\\"error\\\": \\\"tickets service is failing (fault switch)\\\"}\""
          },
          {
            "id": "R-302",
            "status": "failed",
            "reason": "500 - \"{\\\"error\\\": \\\"tickets service is failing (fault switch)\\\"}\""
          }
        ]
      }
✔ after: POST http://localhost:8800/admin/fault · HTTP 200 · 0.0s · {"faq": "ok", "tickets": "ok", "prompts": "ok", "usage": "ok", "dlq": "ok", "slow_seconds": 8}
    → request  POST http://localhost:8800/admin/fault
      {
        "faq": "ok",
        "tickets": "ok",
        "prompts": "ok",
        "usage": "ok",
        "dlq": "ok"
      }
    ← response HTTP 200
      {
        "faq": "ok",
        "tickets": "ok",
        "prompts": "ok",
        "usage": "ok",
        "dlq": "ok",
        "slow_seconds": 8
      }
✔ 예제 1 · 실패한 2건은 DLQ에 · 0.0s
    → request  POST http://localhost:8800/dlq/list
      {}
    ← response HTTP 200
      {
        "size": 2,
        "parked": 0,
        "items": [
          {
            "dlq_id": "D-1",
            "attempts": 1,
            "parked": false,
            "item": {
              "id": "R-301",
              "user": "정우성",
              "text": "사내 위키 로그인이 안 돼요"
            },
            "reason": "500 - \"{\\\"error\\\": \\\"tickets service is failing (fault switch)\\\"}\"",
            "workflow": "intake",
            "at": 1793250889.918716
          },
          {
            "dlq_id": "D-2",
            "attempts": 1,
            "parked": false,
            "item": {
              "id": "R-302",
              "user": "이준호",
              "text": "노트북 배터리가 금방 닳아요"
            },
            "reason": "500 - \"{\\\"error\\\": \\\"tickets service is failing (fault switch)\\\"}\"",
            "workflow": "intake",
            "at": 1793250889.918718
          }
        ]
      }
✔ 예제 2 · 예상 못 한 오류 (nightly-report) · 0.1s
    → request  POST /webhook/nightly-report
      {}
    ← response HTTP 500
      {
        "message": "Error in workflow"
      }
… before: wait 3s
✘ 예제 2 · Error Workflow가 알림을 남김 · 0.0s · severity = null (expected critical); reason = null (expected unexpected); workflow = null (expected 76 Nightly report (provided, has a bug)); node has none of ['Count by category']
    → request  POST http://localhost:8800/alerts/latest
      {}
    ← response HTTP 200
      {}
Passed 3/4
report: runs/lab02-20261029-141452.json
✔ after: POST http://localhost:8800/admin/fault · HTTP 200 · 0.0s · {"faq": "ok", "tickets": "ok", "prompts": "ok", "usage": "ok", "dlq": "ok", "slow_seconds": 8}
    → request  POST http://localhost:8800/admin/fault
      {
        "faq": "ok",
        "tickets": "ok",
        "prompts": "ok",
        "usage": "ok",
        "dlq": "ok"
      }
    ← response HTTP 200
      {
        "faq": "ok",
        "tickets": "ok",
        "prompts": "ok",
        "usage": "ok",
        "dlq": "ok",
        "slow_seconds": 8
      }

$ uv run tools/flow.py ops
fault switch: all ok
created tickets: 0
DLQ: 2 (parked 0)
  D-1  R-301  attempts 1  parked False  500 - "{\"error\": \"tickets service is failing (f
  D-2  R-302  attempts 1  parked False  500 - "{\"error\": \"tickets service is failing (f
alerts: 0
