Fix e2e-install test failing on tag pushes#304
Merged
Conversation
The e2e-install job runs on every push, including tags. On a tag push the checkout is a detached HEAD, so `git rev-parse --abbrev-ref HEAD` returns the literal "HEAD" rather than a ref name. That value was passed to install.sh as BRANCH, producing `git clone --branch HEAD`, which fails with "Remote branch HEAD not found in upstream origin". Prefer GITHUB_REF_NAME (the tag or branch GitHub provides) and fall back to rev-parse for local runs. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
f64ed56 to
b0f0799
Compare
sjmiller609
approved these changes
Jul 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
e2e-installjob in the Test workflow runs on every push, tags included. On a tag push the checkout is a detached HEAD, sogit rev-parse --abbrev-ref HEADinscripts/e2e-install-test.shreturns the literal stringHEADinstead of a ref name.install.shasBRANCH, producinggit clone --branch HEAD, which fails withfatal: Remote branch HEAD not found in upstream originand aborts the job.GITHUB_REF_NAME(the tag or branch GitHub provides), falling back togit rev-parsefor local runs. A tag is a valid--branchargument togit clone, so the source build resolves correctly on release tags.Not a new regression: the
e2e-installjob has failed with this same error on every tag whose Test run completed (v0.1.0 and v0.2.0). It went unnoticed because it runs in the Test workflow, separate from the release workflow that publishes the tag.Validation
bash -n scripts/e2e-install-test.sh🤖 Generated with Claude Code
Note
Low Risk
Single-line CI script change with no production runtime impact.
Overview
Fixes
e2e-installfailing on tag pushes when the workflow checks out a detached HEAD.scripts/e2e-install-test.shnow setsBRANCHfromGITHUB_REF_NAMEwhen GitHub Actions provides it (tag or branch name), and only falls back togit rev-parse --abbrev-ref HEADfor local runs. Previously, detached tag checkouts producedBRANCH=HEAD, which madeinstall.shrungit clone --branch HEADand fail.Reviewed by Cursor Bugbot for commit b0f0799. Bugbot is set up for automated code reviews on this repo. Configure here.