Skip to content

fix: keep a build alive when the job branch moves under it - #17

Merged
assassin808 merged 1 commit into
mainfrom
fix/publish-running-state-retry
Aug 9, 2026
Merged

assassin808 merged 1 commit into
mainfrom
fix/publish-running-state-retry

Conversation

@assassin808

Copy link
Copy Markdown
Contributor

Publish running state pushed once and failed the entire build if the branch had moved. That is how run 31312424490 died:

! [rejected]  HEAD -> jobs/mslrae6q-587ae96c (fetch first)
hint: Updates were rejected because the remote contains work that you do not
hint: have locally. This is usually caused by another repository pushing to the same ref.

The run was healthy — it got a runner in 2 seconds, fetched the paper, and marked the job running. It only lost a race: the web app wrote a (wrong) dispatch verdict to the same branch eleven seconds earlier.

HumanStudy-Hub/humanstudy-hub-web#4 stops the web app writing there at all, which removes today's cause. This guards the step on its own merits — losing a whole build to a lost race is worth surviving regardless of who moved the ref. The push now rebases and retries up to three times, matching what Commit job state and outputs already does.

🤖 Generated with Claude Code

https://claude.ai/code/session_0185X6NPgr1v2jXVVDnK5DmZ

Publishing the running state pushed once and failed the whole build if the
branch had moved, which is how a healthy run died: the web app wrote a verdict
to the same branch while the runner was starting, and the runner's push was
rejected seconds later.

The web app no longer writes there, but losing a build to a lost race is worth
guarding against on its own, so the push rebases and retries.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0185X6NPgr1v2jXVVDnK5DmZ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant