Test Coverage Findings: PR {number}
Test Coverage Findings: PR #{number}【免费下载链接】ArchonThe first open-source harness builder for AI coding. Make AI coding deterministic and repeatable.项目地址: https://gitcode.com/GitHub_Trending/archon3/ArchonReviewer: test-coverage-agentDate: {ISO timestamp}Source Files: {count}Test Files: {count}#### Summary 与 Verdict markdown ## Summary {2-3 sentence overview of test coverage quality} **Verdict**: {APPROVE | REQUEST_CHANGES | NEEDS_DISCUSSION}结论三选一APPROVE覆盖充分放行、REQUEST_CHANGES存在必须补齐的缺口、NEEDS_DISCUSSION需要人工讨论例如实现本身存在争议。Coverage Map 覆盖映射表## Coverage Map | Source File | Test File | New Code Tested | Modified Code Tested | |-------------|-----------|-----------------|---------------------| | src/x.ts | src/x.test.ts | FULL/PARTIAL/NONE | FULL/PARTIAL/NONE | | src/y.ts | (missing) | N/A | N/A |每个源文件一行测试文件列给出对应测试缺失则标注(missing)新增代码与修改代码分别用FULL/PARTIAL/NONE标注覆盖程度。这是整份报告的「地图」让读者一眼看到哪些文件无人值守。Findings 发现条目核心## Findings ### Finding 1: {Descriptive Title} **Severity**: CRITICAL | HIGH | MEDIUM | LOW **Category**: missing-test | weak-test | implementation-coupled | missing-edge-case **Location**: {file}:{line} (source) / {test-file} (test) **Criticality Score**: {1-10}每个 Finding 的字段设计Severity四档严重度CRITICAL / HIGH / MEDIUM / LOWCategory缺口类型分类——missing-test完全缺测试、weak-test测试太弱、implementation-coupled测试与实现耦合、missing-edge-case缺少边界用例Location源文件位置 测试文件位置双定位Criticality Score1–10 的量化评分供后续统计与排序。Issue 描述与未测试代码**Issue**: {Clear description of the coverage gap} **Untested Code**: typescript // This code at {file}:{line} is not tested {untested code}**Why This Matters** 部分要求给出「如果……用户会看到……」「未来对 X 的修改可能在不被察觉的情况下破坏 Y」这类**具体后果推演**避免空泛的缺少测试式评论 markdown **Why This Matters**: {Specific bugs or regressions this could miss: - If {scenario}, users would see {bad outcome} - A future change to {X} could break {Y} without detection}这与 review-tests.md 的「一个 finding 必须包含四要素」行为或不变量 / 覆盖映射 / 可信回归 / 最小有价值的测试要求完全同构——先命名可观测的失败再谈缺哪行测试。测试建议选项表#### Test Suggestions | Option | Approach | Catches | Effort | |--------|----------|---------|--------| | A | {test approach} | {what it catches} | LOW/MED/HIGH | | B | {alternative} | {what it catches} | LOW/MED/HIGH | **Recommended**: Option {X}每个缺口给出至少两个候选测试方案各自标注能捕获什么、工作量多高然后基于以下理由推荐其一与代码库既有测试模式一致Matches codebase test patterns测行为而非实现Tests behavior not implementation成本收益比良好Good cost/benefit ratio能捕获最关键的失败Catches the most critical failures推荐测试代码可直接复用describe({feature}, () { it(should {expected behavior}, () { // Arrange {setup} // Act {action} // Assert {assertions} }); it(should handle {edge case}, () { // Test edge case }); });模板按 Arrange / Act / Assert 三段式组织并强制同时覆盖正常行为与边界情况两个it用例——这本身就是「行为测试 边界用例」的规范样例。代码库模式引用**Test Pattern Reference**: typescript // SOURCE: {test-file}:{lines} // This is how similar functionality is tested {existing test from codebase}【免费下载链接】ArchonThe first open-source harness builder for AI coding. Make AI coding deterministic and repeatable.项目地址: https://gitcode.com/GitHub_Trending/archon3/Archon创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考