Repository navigation
ci: rebase the badge and figure pushes onto a main that moved - #104
Merged
Merged
Conversation
The coverage and figures jobs commit generated files on top of the commit they measured and push to main. A merge that lands while they run moves main, and the push was refused with "fetch first" — five times on 2026-11-19 alone, during a run of merges. Both commit steps now go through .github/scripts/push-to-main.sh: it stages the paths (a new figure counts as a change), commits, fetches main, rebases onto it and pushes, retrying a few times, and declines to push if main no longer contains the measured commit. The files are written by nothing else, so the rebase cannot conflict with a person's commit. Each job also gets a concurrency group on main, so two runs of one job never push at once and an older render cannot land after a newer one; a pull request gets a group per run, because a shared group would cancel its pending runs and the figures check is required. Simulated against a local bare repository with a depth-1 clone, the way actions/checkout leaves it: the commit rebases onto the moved main and pushes. Fixes #102 Claude-Session: https://claude.ai/code/session_015BfhXWEPyCFY4fZhg5nzsh
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.
Fixes #102.
.github/scripts/push-to-main.sh MESSAGE PATH...: stage (new files count), commit,fetch origin main, guard that main still contains$GITHUB_SHA,rebase origin/main, push — retried 5× with backoff. Both commit steps use it.concurrencyper job only for pushes to main (main-push-coverage,main-push-figures,cancel-in-progress: false), so two runs of one job never push at once and an older render cannot overwrite a newer one. PR runs get a per-run group: a shared group would cancel pending PR runs, and Documentation figures is a required check.Simulated locally (bare origin,
--depth 1clone likeactions/checkout, main advanced mid-run): rebases and pushes; a run with no change exits cleanly. The real proof is the first quick pair of merges after this lands.https://claude.ai/code/session_015BfhXWEPyCFY4fZhg5nzsh