GeezerVison is showing github.com — fix(release): stable releases no longer fail when main moves during finalize by only21mil · Pull Request #28771 · pingdotgg/t3code
Conversation
Problem
The stable release's Finalize job checks out main, installs dependencies, updates the version strings and refreshes the lockfile. Only then does it push the chore(release): prepare vX.Y.Z commit, with a single git push origin HEAD:main. If anything lands on main in that window, GitHub rejects the push as non-fast-forward. Finalize then fails after the release is already published, and the version bump has to be pushed by hand.
Change
When the push fails, the step fetches main:
- If
main has not moved, the failure is not this race. The step fails right away, as it does today.
- If
main moved, the step replays the version commit it created onto the new main and pushes again. Every replay starts from that recorded commit (git rebase --onto FETCH_HEAD "$bump~1" "$bump"), so only the version bump is ever replayed. It does this at most three times, then makes one last push.
- A rebase conflict, such as a commit on
main that touched the same version line, fails the step. A failed fetch fails it too.
Nothing is force-pushed, so main is never overwritten. If someone already pushed the identical bump, the replayed commit is dropped as already applied and the push is a no-op. Release selection, tokens and checkout are unchanged.
Scope and approval
This is a small, focused fix for an obvious reliability bug in the existing stable Finalize step, so it falls under the obvious-bug exception in CONTRIBUTING. No issue or discussion exists for it. I found no open or closed PR that makes this fix. It touches only the Commit and push version bump step of .github/workflows/release.yml.
Verification
I did not run a release. Instead, a local harness loads .github/workflows/release.yml with a YAML parser, takes this step's run block exactly as written (swapping only the two bot-identity expressions for fixed values), and runs it with bash --noprofile --norc -eo pipefail, as GitHub's shell: bash does. It runs against throwaway local bare repos with a failing pre-commit hook installed, standing in for the repo's hook. The same scenarios ran against main and against this branch:
| scenario |
main |
this PR |
| no race |
pushes |
pushes |
unrelated commit lands on main after checkout |
! [rejected] (fetch first), exit 1 |
replays the bump on top of it and pushes; the unrelated commit is kept |
main advances during each of the first two pushes (cannot lock ref) |
exit 1 |
replays twice, then pushes |
commit on main changes the same version line |
exit 1 |
rebase conflict, exit 1; main keeps the other commit |
server rejects the push while main has not moved (pre-receive hook) |
exit 1 after 1 push |
exit 1 after 1 push: Push failed but main has not moved. |
main moves on every push |
exit 1 |
exit 1 after 4 pushes and 3 replays; main holds only the other commits |
the same bump is already on main |
exit 1 |
commit skipped as already applied, Everything up-to-date, exit 0 |
main rewritten after checkout (a commit dropped) |
exit 1 |
pushes on top of the new main; the dropped commit does not come back (a plain git rebase FETCH_HEAD brought it back) |
the same bump plus a later commit B are on main, then main is rewritten to C before the retry |
exit 1 |
bump lands on C and B stays dropped (replaying from HEAD~1 instead pushed B and lost the bump) |
The failing pre-commit hook never ran during a replay.
vp run check:changed 1d626d02d95f9a2343553f6498037ee82290d304 passed.
Not checked:
- A real GitHub Actions run, including GitHub's own rejection messages and branch-protection responses. The harness uses local bare repos.
mobile-eas-production.yml has the same single push for its version bump. It is a separate workflow and is left alone here.
Prior PRs
Generated with Claude Opus 5.5 and GPT-6.1 Sol in T3 Code Nightly
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
The finalize job checks out main, installs dependencies and refreshes the
lockfile before it pushes the version commit. A commit landing on main in
that window made the single push fail with a non-fast-forward rejection.
On a failed push, fetch main. If it moved, rebase the version commit onto it
and push again, up to three times. A conflict fails the step, and a push that
failed while main stayed put fails immediately. Nothing is force-pushed.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Approvability
Verdict: Approved at 52b0c43
Macroscope's review found this PR approvable — Stable-release finalization now retries when main advances, replaying only its version-bump commit without force-pushing. Bounded retries, conflict failures and reported race-scenario testing keep the operational impact limited.
You can add or adjust custom eligibility rules. Learn more.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|

No actionable comments were generated in the recent review.
Recent review info
-
Run configuration
-
Commits
-
Reviewing files that changed from the base of the PR and between 3fd2b85 and 52b0c43.
Files selected for processing: 1
-
.github/workflows/release.yml
Limit details: You’ve used all 10 included reviews currently available.
Walkthrough
-
The stable-release workflow records the version-bump commit and retries its push up to three times. After a failed push, it fetches main, checks ancestry, and rebases the bump commit when needed.
Changes: Stable-release version bump
| Layer / File(s) |
Summary |
Version-bump push and retry .github/workflows/release.yml |
The workflow records the bump commit and retries the push up to three times. After a failed push, it fetches main; if that commit is an ancestor of HEAD, the workflow exits with an error. Otherwise, it rebases the bump commit onto the fetched commit before retrying. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Possibly related PRs
- pingdotgg/t3code#26978: Changes the stable-release version-bump finalization in the same workflow, but addresses pre-commit hooks rather than push retries.
Suggested reviewers: macroscopeapp, t3dotgg
Merge Risk: Minimal · up to 52b0c
-
No actionable merge-blocking risk remains from the reviewed change.
Pre-merge checks: 4
-
| Check name |
Status |
Explanation |
| Title check |
 |
The title clearly and concisely describes the main change: preventing stable release finalization from failing when main advances during the push. |
| Description check |
 |
The description includes complete Problem, Change, Scope and approval, and Verification sections. It explains the failure, retry behavior, safety limits, approval basis, detailed test scenarios, and u… |
| Linked Issues check |
 |
Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check |
 |
Check skipped because no linked issues were found for this pull request. |
Full details: Description check
-
Explanation
The description includes complete Problem, Change, Scope and approval, and Verification sections. It explains the failure, retry behavior, safety limits, approval basis, detailed test scenarios, and unverified real GitHub Actions behavior.
Finishing Touches
-
Generate unit tests (beta)
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Usage-based review receipt
Note This review was completed with usage-based billing: files reviewed beyond your plan's included limits are billed at $0.25/file. View usage-based billing.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Note 🤖 Opus 5.5 replying on behalf of Victor.
Closing this: #34326 on main fixes it. The version bump push now retries when main moves during finalize.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
size:S
10-29 changed lines (additions + deletions).
vouch:unvouched
Author is not yet trusted in the VOUCHED list.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|