From e46339e2e0f905f752ee058bd07daa79dfc6049c Mon Sep 17 00:00:00 2001 From: JSONbored <49853598+JSONbored@users.noreply.github.com> Date: Wed, 15 Jul 2026 22:45:38 -0700 Subject: [PATCH] fix(ci): wait for all 6 test shards before Codecov posts a patch status Each of the 6 backend test shards (validate-tests matrix in ci.yml) uploads its own lcov.info to Codecov directly (flags: shard-N) -- additive by design, but with no after_n_builds setting Codecov re-evaluates and re-posts codecov/patch after EVERY individual upload instead of waiting for all six. That produced a wildly wrong intermediate verdict (patch coverage as low as ~20%) after only 1-2 shards had landed on PR #6321, before self-correcting once the rest arrived -- require_ci_to_pass only checks the upstream GH Actions run's own conclusion, not upload completeness. Sets codecov.notify.after_n_builds: 6 so Codecov withholds any status until all six coverage uploads for a commit are in. Validated the resulting config against Codecov's public validator (codecov.io/validate). --- codecov.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/codecov.yml b/codecov.yml index 2ac729acb..06f7c0867 100644 --- a/codecov.yml +++ b/codecov.yml @@ -10,6 +10,16 @@ codecov: # Don't post a verdict until the CI run that produced the report has finished. require_ci_to_pass: true + notify: + # The 6 backend test shards (validate-tests matrix, ci.yml) each upload their own lcov.info + # directly (flags: shard-N) -- additive by design, but Codecov re-evaluates and re-posts the + # status check after EVERY individual upload, not just the last one. Without this, codecov/patch + # can report a wildly wrong verdict (as low as ~20% "patch coverage") after only 1-2 of 6 shards + # have landed, before self-correcting once the rest arrive -- require_ci_to_pass above only checks + # the GH Actions run's own conclusion, it says nothing about upload completeness. Waiting for all + # 6 coverage uploads (JUnit test_results uploads are a separate stream and don't count here) before + # posting a status removes that premature-fail/premature-pass window entirely. + after_n_builds: 6 coverage: status: