ci: explicit refspecs in dev-or-main fetch #141

Merged
mik-tf merged 2 commits from development_mik_release_branch_gate_fix into development 2026-05-04 23:23:27 +00:00
Owner

Follow-up to PR #140. The dev-or-main guard was structurally correct but assumed actions/checkout@v4-style remote tracking. Whiteboard's checkout is a manual git clone --depth 100 --branch which creates zero refs/remotes/* refs; a bare git fetch origin development main then writes to FETCH_HEAD only, so git branch -r --contains has nothing to match and the guard rejects every tag.

Symptom: v0.1.0-rc1 (tag commit a8059f7, HEAD of development at PR #140 merge) failed with: ERROR: Tag v0.1.0-rc1 is not on development or main. Aborting.

Fix: explicit refspecs on the fetch so origin/development and origin/main are materialized.

Verified locally by reproducing the workflow's clone+fetch sequence in /tmp; with the explicit refspecs git branch -r --contains correctly returns origin/development for the tag commit.

A simpler long-term alternative is to replace the manual git clone with uses: actions/checkout@v4 (matches hero_proxy / hero_aibroker exactly). Deferred to a separate PR — this surgical one-line fix unblocks the release pipeline today.

Signed-off-by: mik-tf

Follow-up to PR #140. The dev-or-main guard was structurally correct but assumed actions/checkout@v4-style remote tracking. Whiteboard's checkout is a manual git clone --depth 100 --branch <ref> which creates zero refs/remotes/* refs; a bare git fetch origin development main then writes to FETCH_HEAD only, so git branch -r --contains has nothing to match and the guard rejects every tag. **Symptom:** v0.1.0-rc1 (tag commit a8059f7, HEAD of development at PR #140 merge) failed with: ERROR: Tag v0.1.0-rc1 is not on development or main. Aborting. **Fix:** explicit refspecs on the fetch so origin/development and origin/main are materialized. **Verified locally** by reproducing the workflow's clone+fetch sequence in /tmp; with the explicit refspecs git branch -r --contains correctly returns origin/development for the tag commit. A simpler long-term alternative is to replace the manual git clone with uses: actions/checkout@v4 (matches hero_proxy / hero_aibroker exactly). Deferred to a separate PR — this surgical one-line fix unblocks the release pipeline today. Signed-off-by: mik-tf
ci: use explicit refspecs in dev-or-main fetch
All checks were successful
CI / build (pull_request) Successful in 2m46s
4628408927
PR #140's dev-or-main guard was structurally correct but assumed
actions/checkout@v4-style remote tracking. Whiteboard's checkout is
a manual `git clone --depth 100 --branch <ref>` (a holdover from
PR #126), which creates zero refs/remotes/* refs. A bare
`git fetch origin development main` then writes only to FETCH_HEAD
and never populates origin/development or origin/main, so
`git branch -r --contains "$TAG_COMMIT"` has no refs to match and
the guard rejects every tag.

Symptom: v0.1.0-rc1 was tagged from a8059f7 (HEAD of development at
PR #140 merge), the workflow ran, and the guard step printed:

  ERROR: Tag v0.1.0-rc1 is not on development or main. Aborting.

Fix is one line: pass explicit refspecs to git fetch so the
remote-tracking refs are materialized:

  git fetch origin \
    '+refs/heads/development:refs/remotes/origin/development' \
    '+refs/heads/main:refs/remotes/origin/main' || true

Verified locally by reproducing the workflow's clone+fetch sequence
in /tmp; with the explicit refspecs git branch -r --contains
correctly returns origin/development for the tag commit.

A simpler alternative is replacing the manual clone block with
uses: actions/checkout@v4, which is what hero_aibroker / hero_proxy
do. Deferred to a follow-up since this is a one-line surgical fix
that unblocks the release pipeline today; the broader checkout
canonicalization is worth a separate PR with its own review.

Signed-off-by: mik-tf
ci: strip verbose comment block from guard step
Some checks failed
CI / build (pull_request) Has been cancelled
e04b43f936
Signed-off-by: mik-tf
mik-tf merged commit 47467235f2 into development 2026-05-04 23:23:27 +00:00
mik-tf deleted branch development_mik_release_branch_gate_fix 2026-05-04 23:23:27 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_whiteboard!141
No description provided.