From fe890e3a350491755a1e785575d38d99738ca7f9 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 7 Jun 2026 13:32:46 +0530 Subject: [PATCH] =?UTF-8?q?ci(coverage):=20drop=20--depth=3D1=20on=20the?= =?UTF-8?q?=20base=20fetch=20=E2=80=94=20fix=20diff-cover=20'no=20merge=20?= =?UTF-8?q?base'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The patch-coverage gate did 'git fetch origin --depth=1', truncating the base to one commit with no common ancestor with the PR branch whenever the branch was behind base — so diff-cover crashed with 'fatal: origin/...HEAD: no merge base' and reded coverage on PRs that were merely stale (hit repeatedly). The checkout is already fetch-depth:0, so a plain 'git fetch origin ' resolves the merge-base reliably. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/coverage.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 04211f5..4b83bd5 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -49,7 +49,9 @@ jobs: - name: Patch coverage gate (100% of changed lines) if: github.event_name == 'pull_request' run: | - git fetch origin "${{ github.base_ref }}" --depth=1 || true + # Full base history (NOT --depth=1): a shallow base fetch shares no merge-base + # with a PR branch that is behind base → diff-cover "no merge base" crash. + git fetch origin "${{ github.base_ref }}" || true diff-cover coverage/lcov.info \ --compare-branch="origin/${{ github.base_ref }}" \ --fail-under=100