补充AI下次时间接口异常入参与验证记录
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
# AI 下次抽烟时间验证记录(2026-02-28)
|
||||
|
||||
对应 issue:`#4 [P0][T1] AI 下次抽烟时间端到端验证`
|
||||
|
||||
## 验证结论
|
||||
|
||||
- 关键场景:通过(默认模式、AI 模式、缓存命中/过期判定)。
|
||||
- 边界场景:通过(空节点、非法时间、睡眠区间调整、未来计划日期最小时间)。
|
||||
- 异常场景:通过(非法 `mode` 返回 `400`,错误文案明确)。
|
||||
|
||||
## 覆盖明细
|
||||
|
||||
1. 正常链路
|
||||
- `internal/smoke/service/smoke_ai_next_smoke_service_test.go::TestShouldRefreshCache`
|
||||
- 覆盖当天有效缓存命中。
|
||||
- `internal/smoke/service/smoke_ai_next_smoke_service_test.go::TestNormalizeNodesFiltersInvalidAndDuplicate`
|
||||
- 覆盖节点去重、非当天过滤、睡眠区间过滤。
|
||||
|
||||
2. 边界数据
|
||||
- `internal/smoke/service/smoke_ai_next_smoke_service_test.go::TestComputeMinNotBeforeForFuturePlanUsesWakeUp`
|
||||
- 覆盖明日计划默认 07:00 与按起床时间约束。
|
||||
|
||||
3. 异常输入/兜底
|
||||
- `internal/smoke/handler/smoke_next_handler_test.go::TestResolveNextSmokeMode`
|
||||
- 覆盖 `mode` 非法值校验,保证返回 `400` 而不是隐式降级。
|
||||
|
||||
## 执行命令
|
||||
|
||||
```bash
|
||||
go test ./...
|
||||
```
|
||||
|
||||
## 问题清单
|
||||
|
||||
- 当前未引入真实外部 AI 服务的在线回归(依赖环境密钥与网络),本次以可复现单元测试覆盖核心逻辑路径。
|
||||
Reference in New Issue
Block a user