Skip to content

ci: allow a small coverage drift in the codecov project status - #2497

Merged
ni4 merged 1 commit into
mainfrom
ci-codecov-threshold
Sep 24, 2026
Merged

ni4 merged 1 commit into
mainfrom
ci-codecov-threshold

Conversation

@ronaldtse

Copy link
Copy Markdown
Contributor

This pull request adds a small threshold to the codecov project status so that rounding differences between coverage uploads no longer fail the check.

The aggregated coverage report is assembled from uploads of many CI legs across backends and platforms. Rounding differences between those uploads shift the project percentage by a few hundredths of a point, and the default zero-drift gate turns this into a failure even when a pull request does not reduce coverage. Pull requests #2489 and #2492 both failed the project status with drifts of 0.03 and 0.01 percent respectively while their patch coverage passed, which shows the gate is reacting to aggregate noise rather than to the changes under review.

The change sets the project target to auto with a threshold of 0.1 percent. Aggregate noise of this magnitude is absorbed, while a genuine coverage regression larger than 0.1 percent still fails the check as before. The patch status is left at its default, so every added line remains held to the existing standard.

This is a CI and process change, so @ni4 a review from you is kindly requested whenever your time allows. Thank you.

The aggregated coverage report is assembled from uploads of many CI
legs across backends and platforms, and rounding differences between
those uploads shift the project percentage by a few hundredths of a
point. This makes the strict zero-drift project gate fail on pull
requests that do not reduce coverage, for example #2489 and #2492.
A 0.1 percent threshold absorbs the aggregate noise while genuine
regressions still fail the check.
@ronaldtse

Copy link
Copy Markdown
Contributor Author

@ni4 This small CI change lets the codecov project status tolerate the few-hundredths-of-a-point rounding drift that comes from aggregating uploads across many CI legs, which currently fails pull requests such as #2489 and #2492 even though their patch coverage passes. A review from you is kindly requested whenever your time allows, and thank you for all of the reviews today.

@codecov

codecov Bot commented Sep 21, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.45%. Comparing base (26482f6) to head (e44ffd8).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2497   +/-   ##
=======================================
  Coverage   85.45%   85.45%           
=======================================
  Files         125      125           
  Lines       23042    23043    +1     
=======================================
+ Hits        19691    19692    +1     
  Misses       3351     3351           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ni4 ni4 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@ni4

ni4 commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

Merging with single approval as pure CI change.

@ni4
ni4 merged commit e5a5a55 into main Sep 24, 2026
140 of 141 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants