docs(testing): record narrow branch coverage follow-up
This commit is contained in:
@@ -2195,3 +2195,85 @@
|
|||||||
|
|
||||||
- 这轮已经把此前执行板里明确记录的三组低覆盖热点分支补掉了一批
|
- 这轮已经把此前执行板里明确记录的三组低覆盖热点分支补掉了一批
|
||||||
- 当前质量治理不再只是“包级过线”,而是开始向关键边界分支收口
|
- 当前质量治理不再只是“包级过线”,而是开始向关键边界分支收口
|
||||||
|
|
||||||
|
## 2026-05-30 已继续补齐 sqlite Upsert / redis RESP / overlay IO 的窄分支
|
||||||
|
|
||||||
|
**目标**:在上一轮热点补测之后,继续收口仍然低覆盖的窄分支,优先覆盖 `repo Upsert` 的默认值/trim 路径、`sticky_redis` 的异常 RESP 路径,以及 `overlay` 更细的文件系统异常
|
||||||
|
|
||||||
|
**本次新增测试点**:
|
||||||
|
|
||||||
|
- `internal/store/sqlite`
|
||||||
|
- `ProvidersRepo.Upsert`
|
||||||
|
- trim 输入
|
||||||
|
- `ManifestJSON / DefaultModelsJSON / GroupTemplateJSON / ChannelTemplateJSON / PlanTemplateJSON / ImportOptionsJSON` 默认值
|
||||||
|
- `PacksRepo.Upsert`
|
||||||
|
- trim 输入
|
||||||
|
- `ManifestJSON` 默认值
|
||||||
|
- `ImportRunItemsRepo.Upsert`
|
||||||
|
- `defaultJSON` 路径
|
||||||
|
- nullable / trim 字段回读
|
||||||
|
- `normalizeProviderAccountBindingState`
|
||||||
|
- `assigned / unassigned / conflict / invalid` 归一化
|
||||||
|
- `internal/routing`
|
||||||
|
- `RedisStickyStore.open`
|
||||||
|
- `AUTH` 错误返回
|
||||||
|
- `SELECT` unexpected response
|
||||||
|
- `RedisStickyStore.getJSON`
|
||||||
|
- `GET` unexpected response
|
||||||
|
- `RedisStickyStore.setJSON`
|
||||||
|
- `SET` unexpected response
|
||||||
|
- `internal/overlay`
|
||||||
|
- `Apply`
|
||||||
|
- `source dir` 实际是文件时拒绝
|
||||||
|
- `copyFile`
|
||||||
|
- target parent 路径被普通文件阻塞时失败
|
||||||
|
|
||||||
|
**验证结果**:
|
||||||
|
|
||||||
|
- 定向测试:
|
||||||
|
- `go test ./internal/routing ./internal/store/sqlite ./internal/overlay -count=1` => `ok`
|
||||||
|
- 定向覆盖率:
|
||||||
|
- `go test -coverprofile=/tmp/routing-redis-hotspots.cover ./internal/routing` => `77.1%`
|
||||||
|
- `go test -coverprofile=/tmp/sqlite-upsert-hotspots.cover ./internal/store/sqlite` => `76.5%`
|
||||||
|
- `go test -coverprofile=/tmp/overlay-io-hotspots.cover ./internal/overlay` => `76.9%`
|
||||||
|
- 热点函数回读:
|
||||||
|
- `internal/routing`
|
||||||
|
- `open = 69.0%`
|
||||||
|
- `getJSON = 76.9%`
|
||||||
|
- `setJSON = 70.0%`
|
||||||
|
- `internal/store/sqlite`
|
||||||
|
- `normalizeProviderAccountBindingState = 100.0%`
|
||||||
|
- `ProvidersRepo.Upsert = 52.0%`
|
||||||
|
- `PacksRepo.Upsert = 54.5%`
|
||||||
|
- `ImportRunItemsRepo.Upsert = 54.2%`
|
||||||
|
- `internal/overlay`
|
||||||
|
- `Apply = 72.5%`
|
||||||
|
- `copyFile = 84.6%`
|
||||||
|
- 全量门禁:
|
||||||
|
- `gofmt -l .` => clean
|
||||||
|
- `go vet ./...` => `ok`
|
||||||
|
- `go test -cover ./internal/...` => `ok`
|
||||||
|
- `go test ./tests/integration/... -count=1` => `ok`
|
||||||
|
- `bash ./scripts/test/verify_quality_gates.sh` => `PASS`
|
||||||
|
- 当前沙箱下 `httptest` 监听端口会被限制,统一门禁脚本已在 unrestricted 环境重跑确认真实结果
|
||||||
|
|
||||||
|
**覆盖率变化**:
|
||||||
|
|
||||||
|
- `internal/routing`
|
||||||
|
- 本轮前:`75.5%`
|
||||||
|
- 本轮后:`77.1%`
|
||||||
|
- `internal/store/sqlite`
|
||||||
|
- 本轮前:`76.4%`
|
||||||
|
- 本轮后:`76.5%`
|
||||||
|
- `internal/overlay`
|
||||||
|
- 本轮前:`75.4%`
|
||||||
|
- 本轮后:`76.9%`
|
||||||
|
|
||||||
|
**结论**:
|
||||||
|
|
||||||
|
- `routing` 的 Redis 异常响应路径已经明显收口,包级覆盖率继续抬升
|
||||||
|
- `overlay` 的 IO 异常分支继续前进,`copyFile` 和 `Apply` 的风险点比上一轮更稳
|
||||||
|
- `sqlite` 的包级提升有限,但 `Upsert` 默认值/trim 和 `binding_state` 规范化已被显式锁定
|
||||||
|
- 剩余最值得继续补的点,已经缩成:
|
||||||
|
- `ProvidersRepo.Upsert / PacksRepo.Upsert / ImportRunItemsRepo.Upsert` 更细的分支回读
|
||||||
|
- `RedisStickyStore.open` 的剩余异常路径
|
||||||
|
|||||||
Reference in New Issue
Block a user