docs(testing): record unified quality gate rollout
This commit is contained in:
@@ -1833,3 +1833,56 @@
|
||||
- public alias 尽量留在插件层,stock host 的 shadow provider 优先承载 canonical model
|
||||
- 最终证据优先级固定为:真实数据面 > host usage logs > route logs > provider/inventory 投影 > probe-only 信号
|
||||
- false-negative 应通过修正状态语义解决,而不是简单隐藏失败
|
||||
|
||||
## 2026-05-30 已增强测试治理与质量门禁
|
||||
|
||||
**目标**:把“手动记忆若干命令”的测试习惯收口成可执行、可汇总、可非回归的统一质量门禁
|
||||
|
||||
**本次新增**:
|
||||
|
||||
- `scripts/test/verify_quality_gates.sh`
|
||||
- 统一执行:
|
||||
- `gofmt -l .`
|
||||
- `go vet ./...`
|
||||
- `go test -cover ./internal/...`
|
||||
- `go test ./tests/integration/... -count=1`
|
||||
- 生成 coverage gate 报告
|
||||
- 按 `tests/quality/coverage_thresholds.tsv` 执行包级覆盖率门槛
|
||||
- `tests/quality/coverage_thresholds.tsv`
|
||||
- 将覆盖率治理拆成:
|
||||
- `core`:当前硬门槛
|
||||
- `watch`:显式非回归监控
|
||||
- `scripts/test/test_real_host_scripts.sh`
|
||||
- 新增对统一质量门禁脚本与 coverage 阈值配置的静态回归
|
||||
- `internal/overlay/executor_test.go`
|
||||
- 补充 nested output、missing patch、metadata、`.git` 过滤、symlink 保留等覆盖
|
||||
|
||||
**本地验证结果**:
|
||||
|
||||
- `go test ./internal/overlay -count=1` => `ok`
|
||||
- `bash ./scripts/test/test_real_host_scripts.sh` => `PASS`
|
||||
- `bash ./scripts/test/verify_quality_gates.sh` => `PASS`
|
||||
- report path:
|
||||
- `/tmp/sub2api-cn-relay-manager-test-quality-RHdxu4/coverage-report.md`
|
||||
|
||||
**统一质量门禁最新结果**:
|
||||
|
||||
- `internal/access` = `84.3%` (`core`, pass)
|
||||
- `internal/pack` = `75.7%` (`core`, pass)
|
||||
- `internal/provision` = `80.4%` (`core`, pass)
|
||||
- `internal/app` = `69.9%` (`watch`, pass under current non-regression threshold `69.5`)
|
||||
- `internal/overlay` = `71.6%` (`watch`, pass;本轮已从 `66.4%` 抬升)
|
||||
- `internal/routing` = `73.1%` (`watch`, pass)
|
||||
- `internal/store/sqlite` = `76.1%` (`watch`, pass)
|
||||
|
||||
**环境处理说明**:
|
||||
|
||||
- `tests/integration/...` 里的 `httptest` 需要本地监听端口
|
||||
- 当前统一质量门禁脚本已把“环境禁止开端口导致 blocked”和“测试本身失败”分开处理
|
||||
- 在本轮实际执行中,使用 unrestricted 环境跑通了完整 integration gate,不再把环境噪音误判成业务失败
|
||||
|
||||
**结论**:
|
||||
|
||||
- 这轮已经把测试能力从“人工执行命令”提升到“统一脚本 + 覆盖率配置 + 非回归报告”
|
||||
- 后续提测前的推荐入口应优先改为:
|
||||
- `bash ./scripts/test/verify_quality_gates.sh`
|
||||
|
||||
Reference in New Issue
Block a user