From 5610a1e841ab9009f96a2b809e946d1f8ebcd5bf Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 7 Jun 2026 13:32:58 +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 061f3bf..6692b03 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -249,7 +249,9 @@ jobs: if: github.event_name == 'pull_request' working-directory: provisioner 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.xml \ --compare-branch="origin/${{ github.base_ref }}" \ --fail-under=100