-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcodecov.yml
More file actions
108 lines (102 loc) · 4.21 KB
/
Copy pathcodecov.yml
File metadata and controls
108 lines (102 loc) · 4.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# Codecov configuration (v0.7.10 P2).
#
# Closes the OpenSSF Best Practices Silver-tier `test_statement_
# coverage80` MUST criterion. The project carries ≥ 80% statement
# coverage measured by Codecov, an independent test-coverage
# service.
#
# Coverage scope is configured in `pyproject.toml [tool.coverage.run]`
# — display-layer CLI wrappers + environmental-dependency modules
# (Sigstore, FastAPI launcher) are explicitly omitted with rationale.
coverage:
status:
project:
default:
# v0.9.7 P1.3: target bumped from 80% to 85% per the v0.9.6
# cycle-close audit. v0.9.5 baseline was 84.26%; the v0.9.6
# work added ~156 net new tests against ~9 new source files
# (high test density per new module), pushing the actual
# coverage above 85%. The OpenSSF Silver
# `test_statement_coverage80` MUST floor is still met with
# 5% headroom; raising the bar prevents accidental
# regression below the new working baseline.
target: 85%
# Per-PR threshold: a PR may drop coverage by at most 1%
# before it fails the project gate. Buys headroom for
# legitimate refactors while still flagging large dips.
threshold: 1%
if_no_uploads: error
only_pulls: false
patch:
default:
# New code in a PR must hit ≥ 85% itself — keeps the
# project gate's tightened standard applied uniformly to
# newly-introduced surfaces.
target: 85%
if_no_uploads: error
only_pulls: true
# Don't post the precision-noise comment on every PR — Codecov
# opens GitHub-PR review comments which can clutter the diff.
# The status check above is the gate.
precision: 2
range: "70...90"
round: nearest
comment:
layout: "reach,diff,flags,files,footer"
behavior: default
require_changes: true
# v0.7.12 P0.7: removed the inverted `fixes:` mappings.
#
# The previous `fixes:` rewrote `packages/X/src/X/` → `X/`, which
# would have been correct IF coverage.xml emitted full repo-relative
# paths AND we wanted the Codecov dashboard to display the shorter
# import-style paths. But coverage.py with multi-source config and
# `relative_files = false` (the default) emits bare filenames
# without any `packages/` prefix — so the `fixes:` matched nothing
# AND Codecov couldn't resolve any paths to the GitHub repo →
# `state: error` + `totals: 0` on every commit.
#
# With `[tool.coverage.run] relative_files = true` (now set in
# pyproject.toml), the XML emits literal repo-relative paths like
# `packages/evidentia-core/src/evidentia_core/foo.py`. Codecov's
# default path-matcher resolves these directly against the GitHub
# tree — no rewriting needed.
# Ignore non-Python tracked paths so Codecov doesn't churn on
# docs / static / TS files that aren't in the Python coverage scope.
ignore:
- "docs/"
- "tests/"
- "scripts/"
- "examples/"
- "packages/evidentia-ui/"
- "**/*.md"
- "**/*.yaml"
- "**/*.yml"
- "**/*.json"
- "**/*.toml"
# v0.7.14 P2.1 deeper diagnosis of Codecov 0% bug:
#
# The v0.7.13 source_pkgs fix produced correct full-path Cobertura
# XML locally (verified: <class filename="packages/evidentia-core/
# src/evidentia_core/audit/logger.py">) but Codecov continued to
# show state=ERROR + totals=null + report.files=[] on every
# commit since v0.7.10.
#
# Codecov upload-state endpoint confirmed the file lands on
# their side but parses to 0 files. Most likely cause: the
# `flag_management.individual_flags[].paths` glob
# `["packages/*/src/"]` was filtering all files out (Codecov's
# glob semantics for flag-paths don't reliably recurse into
# sub-directories of the matched prefix).
#
# Fix attempt 1 (v0.7.14): remove the `flag_management` block
# entirely. Coverage flagging by `python` still works at the
# `flags: python` upload-time arg in tests.yml; the carry-
# forward behavior on default_rules also defaults to True per
# Codecov's docs without explicit config.
#
# If this fixes the 0% bug: keep removed in v0.7.14 ship.
# If still broken after re-push, try fix attempt 2: explicit
# `path_fixes:` mapping. If still broken after attempt 2:
# escalate to Codecov support + switch to GitHub-built-in
# coverage display per the v0.7.14 plan §23.A escalation path.