|
3 | 3 | # |
4 | 4 | # 注意:文件排除配置已迁移到 pyproject.toml 的 [tool.coverage.*] 部分 |
5 | 5 | # Note: File exclusion settings have been moved to [tool.coverage.*] in pyproject.toml |
| 6 | +# |
| 7 | +# 调整策略 / Calibration strategy: |
| 8 | +# - 全量阈值取自当前真实覆盖率(line 90.74% / branch 82.85%)下方约 5% 的 buffer, |
| 9 | +# 作为"不回退"闸;既能挡住明显回归,又不会被 CI 抖动误伤。 |
| 10 | +# - 增量阈值更高一些,推动新增代码自带测试;首次新建文件等极端情况下仍可通过。 |
| 11 | +# - memory_collection 和 conversation_service 历史覆盖率较低,单独 override |
| 12 | +# 到不严于当前现状的水位,等待后续专项补测试再统一上调。 |
| 13 | +# |
| 14 | +# Calibration strategy: |
| 15 | +# - Full thresholds sit ~5% below current real coverage (line 90.74% / branch 82.85%) |
| 16 | +# to act as a "no regression" gate without flapping on CI noise. |
| 17 | +# - Incremental thresholds are higher to drive tests for new code. |
| 18 | +# - memory_collection / conversation_service have historically lower coverage; |
| 19 | +# their overrides sit no stricter than today and will be tightened in a |
| 20 | +# dedicated test-improvement pass later. |
6 | 21 |
|
7 | 22 | # ============================================================================ |
8 | 23 | # 全量代码覆盖率要求 |
9 | 24 | # ============================================================================ |
10 | 25 | full: |
11 | 26 | # 分支覆盖率要求 (百分比) |
12 | | - branch_coverage: 0 |
| 27 | + branch_coverage: 78 |
13 | 28 | # 行覆盖率要求 (百分比) |
14 | | - line_coverage: 0 |
| 29 | + line_coverage: 85 |
15 | 30 |
|
16 | 31 | # ============================================================================ |
17 | 32 | # 增量代码覆盖率要求 (相对于基准分支的变更代码) |
18 | 33 | # ============================================================================ |
19 | 34 | incremental: |
20 | 35 | # 分支覆盖率要求 (百分比) |
21 | | - branch_coverage: 0 |
| 36 | + branch_coverage: 75 |
22 | 37 | # 行覆盖率要求 (百分比) |
23 | | - line_coverage: 0 |
| 38 | + line_coverage: 85 |
24 | 39 |
|
25 | 40 | # ============================================================================ |
26 | 41 | # 特定目录的覆盖率要求 |
27 | 42 | # 可以为特定目录设置不同的覆盖率阈值 |
28 | 43 | # ============================================================================ |
29 | 44 | directory_overrides: |
30 | | - # 示例:为特定目录设置不同的阈值 |
31 | | - agentrun/knowledgebase: |
32 | | - full: |
33 | | - branch_coverage: 0 |
34 | | - line_coverage: 0 |
35 | | - incremental: |
36 | | - branch_coverage: 0 |
37 | | - line_coverage: 0 |
38 | | - agentrun/utils: |
39 | | - full: |
40 | | - branch_coverage: 90 |
41 | | - line_coverage: 90 |
42 | | - incremental: |
43 | | - branch_coverage: 90 |
44 | | - line_coverage: 90 |
| 45 | + # utils 模块要求高覆盖率(基础设施代码) |
| 46 | + # / utils module is infrastructure code, requires high coverage |
| 47 | + agentrun/utils: |
| 48 | + full: |
| 49 | + branch_coverage: 90 |
| 50 | + line_coverage: 90 |
| 51 | + incremental: |
| 52 | + branch_coverage: 90 |
| 53 | + line_coverage: 90 |
| 54 | + |
| 55 | + # knowledgebase 历史保持高覆盖率 |
| 56 | + # / knowledgebase has historically maintained high coverage |
| 57 | + agentrun/knowledgebase: |
| 58 | + full: |
| 59 | + branch_coverage: 90 |
| 60 | + line_coverage: 95 |
| 61 | + incremental: |
| 62 | + branch_coverage: 90 |
| 63 | + line_coverage: 90 |
| 64 | + |
| 65 | + # memory_collection 历史 branch 覆盖率较低(56.11%),先放行不回退 |
| 66 | + # / memory_collection has historically low branch coverage (56.11%); allow |
| 67 | + # current state, plan to tighten later |
| 68 | + agentrun/memory_collection: |
| 69 | + full: |
| 70 | + branch_coverage: 50 |
| 71 | + line_coverage: 80 |
| 72 | + incremental: |
| 73 | + branch_coverage: 75 |
| 74 | + line_coverage: 85 |
| 75 | + |
| 76 | + # conversation_service 历史覆盖率较低(line 70.68% / branch 64.94%) |
| 77 | + # / conversation_service has historically lower coverage; allow current state |
| 78 | + agentrun/conversation_service: |
| 79 | + full: |
| 80 | + branch_coverage: 60 |
| 81 | + line_coverage: 65 |
| 82 | + incremental: |
| 83 | + branch_coverage: 75 |
| 84 | + line_coverage: 85 |
0 commit comments