test(quality): promote routing coverage to core gate
This commit is contained in:
@@ -1967,3 +1967,56 @@
|
||||
- `internal/routing`
|
||||
- `internal/store/sqlite`
|
||||
- `internal/overlay`
|
||||
|
||||
## 2026-05-30 已将 internal/routing 从 watch 提升为 core
|
||||
|
||||
**目标**:把 `logical_group -> route -> sticky -> failover -> cooldown -> route log` 这条高杠杆运行时链路纳入硬门槛,避免只作为显式观察项放行回归
|
||||
|
||||
**评估结果**:
|
||||
|
||||
- `go test -coverprofile=/tmp/internal-routing.cover ./internal/routing` => `coverage: 73.1% of statements`
|
||||
- 现有测试覆盖面已包含:
|
||||
- `sticky key` 构造
|
||||
- `memory sticky store`
|
||||
- `redis sticky store` round-trip
|
||||
- `failure / cooldown` 状态
|
||||
- `async log writer` append / flush / close
|
||||
- 当前低覆盖点主要集中在:
|
||||
- `sticky_redis.go`
|
||||
- `ClearRouteFailure`
|
||||
- `ClearCooldown`
|
||||
- `logwriter.go`
|
||||
- `Flush`
|
||||
- `loop`
|
||||
- 这些缺口已记录,但不影响把该包提升为 `core`,因为包级覆盖率已稳定高于硬门槛,且核心行为已被真实测试覆盖
|
||||
|
||||
**本次调整**:
|
||||
|
||||
- `tests/quality/coverage_thresholds.tsv`
|
||||
- `internal/routing`
|
||||
- tier:`watch -> core`
|
||||
- threshold:`70.0` 保持不变
|
||||
|
||||
**验证结果**:
|
||||
|
||||
- `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%`
|
||||
- 高于新的 `core` 门槛 `70.0%`
|
||||
|
||||
**结论**:
|
||||
|
||||
- `internal/routing` 已完成第二批 `watch -> core` 升级
|
||||
- 当前 `core` 包集合变为:
|
||||
- `internal/access`
|
||||
- `internal/pack`
|
||||
- `internal/provision`
|
||||
- `internal/app`
|
||||
- `internal/routing`
|
||||
- 下一批候选可继续看:
|
||||
- `internal/store/sqlite`
|
||||
- `internal/overlay`
|
||||
|
||||
@@ -4,5 +4,5 @@ internal/pack core 70.0 pack loading and validation
|
||||
internal/provision core 70.0 provider import orchestration
|
||||
internal/app core 70.0 HTTP control plane is now above 70 and must stay as a hard gate
|
||||
internal/overlay watch 70.0 utility package should stay above a healthy baseline
|
||||
internal/routing watch 70.0 route resolve and sticky runtime should not regress
|
||||
internal/routing core 70.0 route resolve and sticky runtime are product-critical and must stay above the hard gate
|
||||
internal/store/sqlite watch 75.0 sqlite repo layer is high leverage and should stay well-covered
|
||||
|
||||
|
Reference in New Issue
Block a user