From ab803d860b2301249854d356f36c3c91567497f1 Mon Sep 17 00:00:00 2001 From: Raffi Khatchadourian Date: Tue, 12 May 2026 12:55:52 -0400 Subject: [PATCH] Add `.codecov.yml` with threshold-based coverage status checks. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Without an explicit `.codecov.yml`, Codecov uses default `target: auto` with zero tolerance: any project-coverage decrease at all triggers `codecov/project: FAILURE`. Base-vs-head test-environment drift or flakiness can shave 1-2 lines off the project total and fail the gate even on PRs that don't touch Java code (e.g., POM-only fixes—see PR #516 where a -0.03% project delta fails the gate despite the patch having no Java changes to cover). Add a minimal `.codecov.yml` mirroring the configuration in `ponder-lab/ML`'s current state (commits `f7f610ff` / `fd19bb91` / `ee247f0b` / `3eac854a`): * `coverage.status.project.default.threshold: 1%`—tolerate up to 1% project-coverage decrease before failing. Real regressions still fail; noise doesn't. * `coverage.status.patch.default.threshold: 2%`—tolerate up to 2% patch-coverage decrease. * `github_checks.annotations: true`—surface uncovered changed lines as inline diff annotations in the PR's "Files changed" view (alongside the per-PR Codecov comment, which remains enabled by default). `informational: false` keeps the checks as real build signal rather than unconditionally-green—the thresholds are the absorptive layer. --- .codecov.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .codecov.yml diff --git a/.codecov.yml b/.codecov.yml new file mode 100644 index 000000000..eaa7997d0 --- /dev/null +++ b/.codecov.yml @@ -0,0 +1,18 @@ +coverage: + status: + project: + default: + target: auto + threshold: 1% + informational: false + patch: + default: + target: auto + threshold: 2% + informational: false + +# Inline annotations on changed lines in the PR's "Files changed" view, posted via the +# GitHub Checks API. Surfaces uncovered patch lines co-located with the code under review, +# alongside the per-PR Codecov comment (which is enabled by default). +github_checks: + annotations: true