Files
aio-01d4-stu/Last3Mon/76/answers/20-lab03-half.txt
T

249 lines
7.0 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
$ uv run tools/flow.py test cases/lab03-half.json -v
✔ before: POST http://localhost:8800/tickets-reset · HTTP 200 · 0.0s · {"cleared": 5}
→ request POST http://localhost:8800/tickets-reset
{}
← response HTTP 200
{
"cleared": 5
}
✔ 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": 2}
→ request POST http://localhost:8800/alerts-clear
{}
← response HTTP 200
{
"cleared": 2
}
✔ 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 · 6 case(s) × 1
✔ before: POST http://localhost:8800/admin/fault · HTTP 200 · 0.0s · {"faq": "ok", "tickets": "slow", "prompts": "ok", "usage": "ok", "dlq": "ok", "slow_seconds": 8}
→ request POST http://localhost:8800/admin/fault
{
"tickets": "slow"
}
← response HTTP 200
{
"faq": "ok",
"tickets": "slow",
"prompts": "ok",
"usage": "ok",
"dlq": "ok",
"slow_seconds": 8
}
✔ 1 · API가 느림 → 기다리다 실패 · 11.6s
→ 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": "timeout of 3000ms exceeded"
},
{
"id": "R-302",
"status": "failed",
"reason": "timeout of 3000ms exceeded"
}
],
"dlq_saved": true,
"alert": "sent"
}
✔ 2 · DLQ에 2건 · 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": "timeout of 3000ms exceeded",
"workflow": "intake",
"at": 1793251086.0805922
},
{
"dlq_id": "D-2",
"attempts": 1,
"parked": false,
"item": {
"id": "R-302",
"user": "이준호",
"text": "노트북 배터리가 금방 닳아요"
},
"reason": "timeout of 3000ms exceeded",
"workflow": "intake",
"at": 1793251086.080595
}
]
}
… before: wait 8s
✔ 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
}
✔ 3 · 그런데 접수 건은 이미 2개 · 0.0s
→ request POST http://localhost:8800/tickets-created/list
{}
← response HTTP 200
{
"count": 2,
"tickets": [
{
"ticket_id": "T-2001",
"key": "R-301",
"title": "사내 위키 로그인이 안 돼요",
"requester": "정우성",
"category": "계정",
"priority": "높음"
},
{
"ticket_id": "T-2002",
"key": "R-302",
"title": "노트북 배터리가 금방 닳아요",
"requester": "이준호",
"category": "장비",
"priority": "보통"
}
]
}
✔ 4 · 재처리 · 이미 있는 건이라 duplicate · 1.1s
→ request POST /webhook/my-replay
{}
← response HTTP 200
{
"replayed": 2,
"ok": 2,
"still_failed": 0,
"parked": 0,
"duplicates": 2
}
✔ 5 · 그래도 2개 (중복 없음) · 0.0s
→ request POST http://localhost:8800/tickets-created/list
{}
← response HTTP 200
{
"count": 2,
"tickets": [
{
"ticket_id": "T-2001",
"key": "R-301",
"title": "사내 위키 로그인이 안 돼요",
"requester": "정우성",
"category": "계정",
"priority": "높음"
},
{
"ticket_id": "T-2002",
"key": "R-302",
"title": "노트북 배터리가 금방 닳아요",
"requester": "이준호",
"category": "장비",
"priority": "보통"
}
]
}
✔ 6 · DLQ가 비었음 · 0.0s
→ request POST http://localhost:8800/dlq/list
{}
← response HTTP 200
{
"size": 0,
"parked": 0,
"items": []
}
Passed 6/6
report: runs/lab03-half-20261029-141815.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-301 계정/높음 사내 위키 로그인이 안 돼요
T-2002 key R-302 장비/보통 노트북 배터리가 금방 닳아요
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