fix(ci): drop --depth=1 from main fetch in release tag gate
All checks were successful
ci / test-health gate (push) Successful in 16s
ci / mutation test (broker) (push) Has been skipped
ci / rust debug (push) Successful in 1m54s
ci / python (push) Successful in 1m28s
ci / rust release (push) Successful in 2m8s

The "Ensure tag commit is on main" step did `git fetch origin main
--depth=1` and then `git merge-base --is-ancestor $GITHUB_SHA
origin/main`. When the tagged commit is a parent of main's HEAD (release
fix-up commit followed by an unrelated commit on top — what just
happened with v0.6.2 + planning doc follow-up), the shallow fetch grafts
origin/main at its tip and the ancestor check returns false even though
the tag commit IS reachable via main's history. Up through v0.6.1 the
tag commit always equalled main HEAD, so the bug was masked.

Drop --depth=1; the checkout step already uses fetch-depth: 0, so a
full main fetch is cheap.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-25 14:11:43 +09:00
parent 3e80cdb8a7
commit 7fbff2e9e3

View File

@@ -58,7 +58,12 @@ jobs:
- name: Ensure tag commit is on main
run: |
set -eux
git fetch origin main --depth=1
# Full fetch (no --depth): when the tag commit is a parent of
# main's HEAD (release fix-up + follow-up commit on top), a
# shallow main fetch grafts at HEAD and `is-ancestor` returns
# false even though the tag commit is reachable. checkout step
# already used fetch-depth: 0, so a full fetch here is cheap.
git fetch origin main
git merge-base --is-ancestor "$GITHUB_SHA" "origin/main"
- name: Verify Cargo/Python versions match tag