docs(testing): record hotspot branch coverage uplift
This commit is contained in:
@@ -2134,3 +2134,64 @@
|
|||||||
- `internal/routing`
|
- `internal/routing`
|
||||||
- `internal/store/sqlite`
|
- `internal/store/sqlite`
|
||||||
- `internal/overlay`
|
- `internal/overlay`
|
||||||
|
|
||||||
|
## 2026-05-30 已补齐 routing / sqlite / overlay 的低覆盖热点分支
|
||||||
|
|
||||||
|
**目标**:在全部 `watch -> core` 升级完成后,不再继续调阈值,而是直接补已记录的低覆盖热点分支,降低“虽然过线但边角不稳”的风险
|
||||||
|
|
||||||
|
**本次补测点**:
|
||||||
|
|
||||||
|
- `internal/routing`
|
||||||
|
- `RedisStickyStore.ClearRouteFailure`
|
||||||
|
- `RedisStickyStore.ClearCooldown`
|
||||||
|
- `AsyncLogWriter.Flush` 的 close 后路径
|
||||||
|
- `internal/store/sqlite`
|
||||||
|
- `SyncProviderAccountsFromLatestImportBatches`
|
||||||
|
- 多 provider latest reconcilable batch 同步路径
|
||||||
|
- `internal/overlay`
|
||||||
|
- `applyPatchFile` invalid patch 错误路径
|
||||||
|
- `Apply` existing output dir 错误路径
|
||||||
|
- `copyFile` missing source 错误路径
|
||||||
|
|
||||||
|
**验证结果**:
|
||||||
|
|
||||||
|
- 定向测试:
|
||||||
|
- `go test ./internal/routing ./internal/store/sqlite ./internal/overlay -count=1` => `ok`
|
||||||
|
- 定向覆盖率:
|
||||||
|
- `go test -coverprofile=/tmp/routing-hotspots.cover ./internal/routing` => `75.5%`
|
||||||
|
- `go test -coverprofile=/tmp/sqlite-hotspots.cover ./internal/store/sqlite` => `76.4%`
|
||||||
|
- `go test -coverprofile=/tmp/overlay-hotspots.cover ./internal/overlay` => `75.4%`
|
||||||
|
- 热点函数回读:
|
||||||
|
- `internal/routing`
|
||||||
|
- `Flush = 71.4%`
|
||||||
|
- `ClearRouteFailure = 75.0%`
|
||||||
|
- `ClearCooldown = 75.0%`
|
||||||
|
- `internal/overlay`
|
||||||
|
- `Apply = 70.6%`
|
||||||
|
- `applyPatchFile = 90.0%`
|
||||||
|
- `copyFile = 76.9%`
|
||||||
|
- `internal/store/sqlite`
|
||||||
|
- `SyncProviderAccountsFromLatestImportBatches = 66.7%`
|
||||||
|
- 全量门禁:
|
||||||
|
- `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`
|
||||||
|
|
||||||
|
**覆盖率变化**:
|
||||||
|
|
||||||
|
- `internal/routing`
|
||||||
|
- 本轮前:`73.1%`
|
||||||
|
- 本轮后:`75.5%`
|
||||||
|
- `internal/store/sqlite`
|
||||||
|
- 本轮前:`76.1%`
|
||||||
|
- 本轮后:`76.4%`
|
||||||
|
- `internal/overlay`
|
||||||
|
- 本轮前:`71.6%`
|
||||||
|
- 本轮后:`75.4%`
|
||||||
|
|
||||||
|
**结论**:
|
||||||
|
|
||||||
|
- 这轮已经把此前执行板里明确记录的三组低覆盖热点分支补掉了一批
|
||||||
|
- 当前质量治理不再只是“包级过线”,而是开始向关键边界分支收口
|
||||||
|
|||||||
Reference in New Issue
Block a user