300 lines
9.9 KiB
Plaintext
300 lines
9.9 KiB
Plaintext
$ uv run tools/flow.py push answers/76-lab01-challenge2-rules.json
|
||
! unpublished '76 Intake · LLM fallback (answer, Lab 01 task 1)' (w0f5e1ef11aa4c14): it used the same webhook path
|
||
✔ pushed '76 Intake · request rules (answer, Lab 01 task 2)' (id w4bb85fc171aea9d)
|
||
POST http://localhost:5678/webhook/my-intake
|
||
|
||
$ uv run tools/flow.py test cases/lab01-challenge2.json -v
|
||
✔ before: POST http://localhost:8800/tickets-reset · HTTP 200 · 0.0s · {"cleared": 16}
|
||
→ request POST http://localhost:8800/tickets-reset
|
||
{}
|
||
← response HTTP 200
|
||
{
|
||
"cleared": 16
|
||
}
|
||
✔ 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
|
||
✔ 같은 id가 두 번이면 두 번째는 거절 · 3.4s
|
||
→ request POST /webhook/my-intake
|
||
{
|
||
"requests": [
|
||
{
|
||
"id": "R-401",
|
||
"user": "김민지",
|
||
"text": "회의실 화면 공유가 안 돼요"
|
||
},
|
||
{
|
||
"id": "R-401",
|
||
"user": "김민지",
|
||
"text": "회의실 화면 공유가 안 돼요"
|
||
},
|
||
{
|
||
"id": "R-402",
|
||
"user": "최유진",
|
||
"text": "비밀번호를 바꾸라는 창이 계속 떠요"
|
||
}
|
||
]
|
||
}
|
||
← response HTTP 200
|
||
{
|
||
"total": 3,
|
||
"created": 2,
|
||
"failed": 0,
|
||
"rejected": 1,
|
||
"duplicates": 0,
|
||
"unclassified": 0,
|
||
"results": [
|
||
{
|
||
"id": "R-401",
|
||
"status": "created",
|
||
"ticket_id": "T-2001",
|
||
"duplicate": false,
|
||
"category": "네트워크",
|
||
"priority": "높음"
|
||
},
|
||
{
|
||
"id": "R-402",
|
||
"status": "created",
|
||
"ticket_id": "T-2002",
|
||
"duplicate": false,
|
||
"category": "계정",
|
||
"priority": "보통"
|
||
},
|
||
{
|
||
"id": "R-401",
|
||
"status": "rejected",
|
||
"reason": "duplicate id in this request"
|
||
}
|
||
]
|
||
}
|
||
✔ 11건은 400 (한 번에 10건까지) · 0.2s
|
||
→ request POST /webhook/my-intake
|
||
{
|
||
"requests": [
|
||
{
|
||
"id": "R-501",
|
||
"user": "박서연",
|
||
"text": "모니터 1번이 켜지지 않아요"
|
||
},
|
||
{
|
||
"id": "R-502",
|
||
"user": "최유진",
|
||
"text": "모니터 2번이 켜지지 않아요"
|
||
},
|
||
{
|
||
"id": "R-503",
|
||
"user": "정우성",
|
||
"text": "모니터 3번이 켜지지 않아요"
|
||
},
|
||
{
|
||
"id": "R-504",
|
||
"user": "한지훈",
|
||
"text": "모니터 4번이 켜지지 않아요"
|
||
},
|
||
{
|
||
"id": "R-505",
|
||
"user": "김민지",
|
||
"text": "모니터 5번이 켜지지 않아요"
|
||
},
|
||
{
|
||
"id": "R-506",
|
||
"user": "이준호",
|
||
"text": "모니터 6번이 켜지지 않아요"
|
||
},
|
||
{
|
||
"id": "R-507",
|
||
"user": "박서연",
|
||
"text": "모니터 7번이 켜지지 않아요"
|
||
},
|
||
{
|
||
"id": "R-508",
|
||
"user": "최유진",
|
||
"text": "모니터 8번이 켜지지 않아요"
|
||
},
|
||
{
|
||
"id": "R-509",
|
||
"user": "정우성",
|
||
"text": "모니터 9번이 켜지지 않아요"
|
||
},
|
||
{
|
||
"id": "R-510",
|
||
"user": "한지훈",
|
||
"text": "모니터 10번이 켜지지 않아요"
|
||
},
|
||
{
|
||
"id": "R-511",
|
||
"user": "김민지",
|
||
"text": "모니터 11번이 켜지지 않아요"
|
||
}
|
||
]
|
||
}
|
||
← response HTTP 400
|
||
{
|
||
"error": "too many requests (max 10)"
|
||
}
|
||
✔ 400이면 하나도 만들지 않음 · 0.0s
|
||
→ request POST http://localhost:8800/tickets-created/list
|
||
{}
|
||
← response HTTP 200
|
||
{
|
||
"count": 2,
|
||
"tickets": [
|
||
{
|
||
"ticket_id": "T-2001",
|
||
"key": "R-401",
|
||
"title": "회의실 화면 공유가 안 돼요",
|
||
"requester": "김민지",
|
||
"category": "네트워크",
|
||
"priority": "높음"
|
||
},
|
||
{
|
||
"ticket_id": "T-2002",
|
||
"key": "R-402",
|
||
"title": "비밀번호를 바꾸라는 창이 계속 떠요",
|
||
"requester": "최유진",
|
||
"category": "계정",
|
||
"priority": "보통"
|
||
}
|
||
]
|
||
}
|
||
✔ 평소 요청은 그대로 · 3.7s
|
||
→ request POST /webhook/my-intake
|
||
{
|
||
"requests": [
|
||
{
|
||
"id": "R-101",
|
||
"user": "이준호",
|
||
"text": "VPN이 아침부터 계속 끊겨서 고객 미팅을 못 하고 있어요"
|
||
},
|
||
{
|
||
"id": "R-102",
|
||
"user": "박서연",
|
||
"text": "새 모니터를 하나 더 받을 수 있을까요?"
|
||
},
|
||
{
|
||
"id": "R-103",
|
||
"user": "최유진",
|
||
"text": "엑셀 라이선스가 만료됐다고 나와요"
|
||
}
|
||
]
|
||
}
|
||
← response HTTP 200
|
||
{
|
||
"total": 3,
|
||
"created": 3,
|
||
"failed": 0,
|
||
"rejected": 0,
|
||
"duplicates": 0,
|
||
"unclassified": 0,
|
||
"results": [
|
||
{
|
||
"id": "R-101",
|
||
"status": "created",
|
||
"ticket_id": "T-2003",
|
||
"duplicate": false,
|
||
"category": "네트워크",
|
||
"priority": "높음"
|
||
},
|
||
{
|
||
"id": "R-102",
|
||
"status": "created",
|
||
"ticket_id": "T-2004",
|
||
"duplicate": false,
|
||
"category": "장비",
|
||
"priority": "낮음"
|
||
},
|
||
{
|
||
"id": "R-103",
|
||
"status": "created",
|
||
"ticket_id": "T-2005",
|
||
"duplicate": false,
|
||
"category": "소프트웨어",
|
||
"priority": "높음"
|
||
}
|
||
]
|
||
}
|
||
Passed 4/4
|
||
report: runs/lab01-challenge2-20261029-141401.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 test cases/lab01.json
|
||
✔ before: POST http://localhost:8800/tickets-reset · HTTP 200 · 0.0s · {"cleared": 5}
|
||
✔ before: POST http://localhost:8800/dlq-clear · HTTP 200 · 0.0s · {"cleared": 0}
|
||
✔ before: POST http://localhost:8800/alerts-clear · HTTP 200 · 0.0s · {"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}
|
||
POST http://localhost:5678/webhook/my-intake · 6 case(s) × 1
|
||
✔ 정상 3건 · 2.8s
|
||
✔ 같은 요청을 다시 보내도 중복 없음 · 2.8s
|
||
✔ 만들어진 접수 건은 3개 · 0.0s
|
||
✔ 잘못된 항목은 그 항목만 거절 · 1.8s
|
||
✔ 목록이 아니면 400 · 0.0s
|
||
✔ before: POST http://localhost:8800/admin/fault · HTTP 200 · 0.0s · {"faq": "ok", "tickets": "flaky", "prompts": "ok", "usage": "ok", "dlq": "ok", "slow_seconds": 8}
|
||
✔ 가끔 실패하는 API · 다시 해 보기로 성공 · 2.4s
|
||
✔ after: POST http://localhost:8800/admin/fault · HTTP 200 · 0.0s · {"faq": "ok", "tickets": "ok", "prompts": "ok", "usage": "ok", "dlq": "ok", "slow_seconds": 8}
|
||
Passed 6/6
|
||
report: runs/lab01-20261029-141411.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}
|
||
|
||
$ uv run tools/flow.py test cases/lab01-challenge.json
|
||
✔ before: POST http://localhost:8800/tickets-reset · HTTP 200 · 0.0s · {"cleared": 7}
|
||
✔ before: POST http://localhost:8800/dlq-clear · HTTP 200 · 0.0s · {"cleared": 0}
|
||
✔ before: POST http://localhost:8800/alerts-clear · HTTP 200 · 0.0s · {"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}
|
||
POST http://localhost:5678/webhook/my-intake · 3 case(s) × 1
|
||
✔ 평소에는 분류됨 · 2.0s
|
||
✔ OpenAI credential: broken key (drill). Restore with: uv run tools/flow.py llm up
|
||
✔ LLM이 멈추면 미분류로 접수 · 1.4s
|
||
✔ OpenAI credential: real key from .env restored
|
||
✔ 미분류도 접수 건으로 · 0.0s
|
||
Passed 3/3
|
||
report: runs/lab01-challenge-20261029-141421.json
|
||
✔ OpenAI credential: real key from .env restored
|
||
✔ after: POST http://localhost:8800/admin/fault · HTTP 200 · 0.0s · {"faq": "ok", "tickets": "ok", "prompts": "ok", "usage": "ok", "dlq": "ok", "slow_seconds": 8}
|