Files

200 lines
5.7 KiB
Plaintext
Raw Permalink Normal View History

$ uv run tools/flow.py push reference/lab03-example1-replay.json
✔ pushed '76 Replay (reference, Lab 03 example 1)' (id we4c5fdffca93da1)
POST http://localhost:5678/webhook/my-replay
$ uv run tools/flow.py test cases/lab03.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": 2}
→ request POST http://localhost:8800/dlq-clear
{}
← response HTTP 200
{
"cleared": 2
}
✔ before: POST http://localhost:8800/alerts-clear · HTTP 200 · 0.0s · {"cleared": 1}
→ request POST http://localhost:8800/alerts-clear
{}
← response HTTP 200
{
"cleared": 1
}
✔ 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 · 5 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
}
✔ API가 멈춘 동안 2건 → DLQ · 4.4s
→ 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)\\\"}\""
}
],
"dlq_saved": true,
"alert": "sent"
}
✔ 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
}
✔ 고친 뒤 다시 돌리기 · 1.1s
→ request POST /webhook/my-replay
{}
← response HTTP 200
{
"replayed": 2,
"ok": 2,
"still_failed": 0,
"parked": 0,
"duplicates": 0
}
✔ DLQ가 비었음 · 0.0s
→ request POST http://localhost:8800/dlq/list
{}
← response HTTP 200
{
"size": 0,
"parked": 0,
"items": []
}
✔ 접수 건은 2개 (중복 없음) · 0.0s
→ request POST http://localhost:8800/tickets-created/list
{}
← response HTTP 200
{
"count": 2,
"tickets": [
{
"ticket_id": "T-2001",
"key": "R-302",
"title": "노트북 배터리가 금방 닳아요",
"requester": "이준호",
"category": "장비",
"priority": "보통"
},
{
"ticket_id": "T-2002",
"key": "R-301",
"title": "사내 위키 로그인이 안 돼요",
"requester": "정우성",
"category": "계정",
"priority": "높음"
}
]
}
✔ 한 번 더 돌려도 할 일 없음 · 0.0s
→ request POST /webhook/my-replay
{}
← response HTTP 200
{
"replayed": 0,
"ok": 0,
"still_failed": 0,
"parked": 0
}
Passed 5/5
report: runs/lab03-20261029-141738.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: 2
T-2001 key R-302 장비/보통 노트북 배터리가 금방 닳아요
T-2002 key R-301 계정/높음 사내 위키 로그인이 안 돼요
DLQ: 0 (parked 0)
alerts: 1
[high] intake · dlq · Send to DLQ · count 2 · 2 request(s) could not be created and wait in the DLQ