Skip to content

fix(ci): wait for all 6 test shards before Codecov posts a patch status#6386

Merged
JSONbored merged 1 commit into
mainfrom
fix/codecov-wait-for-all-shards
Jul 16, 2026
Merged

fix(ci): wait for all 6 test shards before Codecov posts a patch status#6386
JSONbored merged 1 commit into
mainfrom
fix/codecov-wait-for-all-shards

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Summary

  • Each of the 6 backend test shards (validate-tests matrix, ci.yml) uploads its own lcov.info directly to Codecov (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, not just the last one.
  • Observed live on feat(review): give LOOPOVER_REVIEW_PLANNER a per-repo config override #6321: codecov/patch posted FAILURE (~22% patch coverage) after only 2 of 6 shards had landed, before the remaining shards arrived. require_ci_to_pass doesn't prevent this — it only checks the upstream GH Actions run's own conclusion, not upload completeness.
  • Fix: codecov.notify.after_n_builds: 6 so Codecov withholds any status until all six coverage uploads for a commit are in.

Validation

  • Validated the resulting codecov.yml against Codecov's own public config validator (curl --data-binary @codecov.yml https://codecov.io/validate) — Valid!, after_n_builds: 6 parses under codecov.notify as expected (first attempt placed it directly under coverage:, which the validator correctly rejected as an unknown field).
  • No test suite change — this is Codecov-side config only, no src/ diff.

Safety

  • No secrets/wallets/hotkeys/trust scores/reward values
  • No changes to site/, CNAME, lovable/
  • No CHANGELOG.md edit

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).
@JSONbored JSONbored self-assigned this Jul 16, 2026
@JSONbored JSONbored merged commit 6c539bd into main Jul 16, 2026
5 checks passed
@JSONbored JSONbored deleted the fix/codecov-wait-for-all-shards branch July 16, 2026 05:46
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant