From 90928bd000c8af8645638b5b8f9aede75e96b296 Mon Sep 17 00:00:00 2001 From: WEN Hao Date: Tue, 3 Nov 2026 11:01:27 +0800 Subject: [PATCH] ci(codecov): make the full-flag project status informational Per-flag project statuses came from the flag_management default rules (#84). On a PR, the full flag is carried forward from the nightly base and projected onto the PR head, so the first PR that adds coverable lines (#93, +60) degraded the projected full coverage past the 0.5% threshold and failed codecov/project/projectfull -- a structural false positive: db-marked coverage only refreshes in the nightly run, so no PR can ever defend it. #90-#92 passed only because they were docs-only. Split the default rules into explicit per-flag rules: core keeps the enforcing project status (PRs upload it), full goes informational (nightly monitoring signal, visible on codecov.io and in the nightly report, but never gates a PR). --- codecov.yml | 34 +++++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/codecov.yml b/codecov.yml index af8b9c1a..5eb2034f 100644 --- a/codecov.yml +++ b/codecov.yml @@ -13,15 +13,35 @@ # combined default project status disabled. Patch status stays # informational because coverage of `db`-marked tests only refreshes # nightly. +# +# The `full` project status is informational for the same reason: on a PR, +# the full flag is carried forward from the nightly base and projected +# onto the PR head, so any PR that adds coverable lines (the first was +# #93: +60 lines) degrades the projected full coverage beyond the +# threshold -- a structural false positive, since db-marked coverage +# cannot refresh outside the nightly run. The full flag remains an +# enforceable signal on the nightly upload itself (visible on codecov.io +# and in the nightly report); PRs are gated on `core`, which they upload. flag_management: - default_rules: - carryforward: true - statuses: - - name_prefix: project - type: project - target: auto - threshold: 0.5% + flag_rules: + - name: core + carryforward: true + statuses: + - name_prefix: project + type: project + target: auto + threshold: 0.5% + - name: full + carryforward: true + statuses: + - name_prefix: project + type: project + target: auto + threshold: 0.5% + # informational: PRs cannot refresh db-marked coverage (nightly + # only), so the carried-forward projection must not gate them + informational: true coverage: status: