test: add Phase 2 checkpoint acceptance tests

18 integration tests validating all 7 Phase 2 checkpoint criteria:
1. Order query routes to order_lookup agent
2. Multi-intent classification with routing hint injection
3. Ambiguous message triggers clarification prompt
4. 30-min interrupt TTL auto-cancel with retry prompt
5. Webhook POST escalation with retry on failure
6. E-commerce template loads 4 correctly configured agents
7. Coverage at 92.60% (188 tests total)
This commit is contained in:
Yaojia Wang
2026-03-30 21:38:25 +02:00
parent 6e7b824b64
commit 512f988dd0
2 changed files with 494 additions and 7 deletions

View File

@@ -387,13 +387,13 @@ Smart Support 是一个 AI 客服行动层框架。核心价值主张: "粘贴
### Phase 2 检查点标准
- [ ] 发送 "查询订单 1042" -> 路由到订单查询 Agent
- [ ] 发送 "取消订单 1042 并给我一个 10% 折扣" -> 顺序执行两个 Agent
- [ ] 发送模糊消息 -> 回退 Agent 请求澄清
- [ ] interrupt 超过 30 分钟 -> 自动取消 + 提供重试选项
- [ ] Agent 升级 -> Webhook POST 发送成功 (或重试后日志记录)
- [ ] 使用电商模板启动 -> 3 个预配置 Agent 正常工作
- [ ] `pytest --cov` 覆盖率 >= 80% (Phase 1 + Phase 2 代码)
- [x] 发送 "查询订单 1042" -> 路由到订单查询 Agent
- [x] 发送 "取消订单 1042 并给我一个 10% 折扣" -> 顺序执行两个 Agent
- [x] 发送模糊消息 -> 回退 Agent 请求澄清
- [x] interrupt 超过 30 分钟 -> 自动取消 + 提供重试选项
- [x] Agent 升级 -> Webhook POST 发送成功 (或重试后日志记录)
- [x] 使用电商模板启动 -> 3 个预配置 Agent 正常工作 (实际 4 个: +discount)
- [x] `pytest --cov` 覆盖率 >= 80% (实际 92.60%, 188 tests)
### Phase 2 测试要求