fix(ci): keep release back-merges out of the squash auto-merge - #580
Conversation
Blanket squash auto-merge into develop makes back-merging main impossible. A squash replays main's changes as a fresh commit, so main never becomes an ancestor of develop and the develop -> main promotion PR stays BEHIND under main's up-to-date requirement. #578 and #579 both hit this: the workflow re-armed auto-merge with --squash and overrode the merge method. Skip PRs whose head starts with chore/backmerge-, and write the back-merge recipe into docs/RELEASE.md. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 39 minutes Limit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?Wait for the limit to reset, then comment An organization admin can change what happens after included review limits in Billing. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
🎉 This PR is included in version 0.17.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
…585) ## Context I enabled **Allow GitHub Actions to create and approve pull requests** at the org and repo level, which unblocked `sync-develop` — it had been failing with `GitHub Actions is not permitted to create or approve pull requests` since forever. Re-running it against the v0.17.0 build now succeeds. But it immediately produced #584, which **cannot merge**. ## The problem `sync-develop` opened a `develop ← main` PR. That shape deadlocks: `develop` requires the head branch to be up to date, and `main` falls behind `develop` the moment anything lands after the release — #582 and #583 did exactly that. #584 has been sitting at `BEHIND` since it was created. I hit the same wall by hand earlier tonight with #577. Even if it could merge, the squash auto-merge would replay the content as a fresh commit and **not** establish ancestry, which is the entire point of a back-merge. That is what went wrong in #578 and #579. ## The fix Push a branch descended from `develop` with `main` merged into it, then open that against `develop`. Same thing that finally worked manually in #581. - Named `chore/backmerge-main-<tag>`, which matches the exclusion added in #580 so `automerge.yml` leaves it alone. - The job arms auto-merge itself with `--merge`, so it lands as a merge commit. - Exits early when `main` is already an ancestor, or when the branch already exists, so re-runs are safe. ## Follow-up #584 should be closed — this replaces it. The next release will exercise this path for real. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Problem
#566 made every non-draft PR into
developsquash auto-merge. That breaks the release flow, and I found it by hitting it twice.A back-merge exists for its topology, not its content. Squashing one replays
main's changes as a fresh commit, somainnever becomes an ancestor ofdevelop.main's ruleset hasstrict_required_status_checks_policy: true, so the promotion PR #571 staysBEHINDforever.Both #578 and #579 hit it. On #579 I explicitly ran
gh pr merge --auto --merge, and the workflow re-armed auto-merge with--squashand overrode it. The resulting commit00ac6d5has a single parent, andgit merge-base --is-ancestor origin/main origin/developstill fails.Fix
Skip PRs whose head branch starts with
chore/backmerge-. Those get merged by hand with a merge commit.Also documents the back-merge recipe in
docs/RELEASE.mdnext to the promotion steps, since the failure mode is silent — the PR just sits at BEHIND with every check green and no explanation.Not changed
The auto-merge policy itself, permissions, and the concurrency/live-recheck hardening from earlier in #566 all stay as they are. This is one
if:clause plus docs.🤖 Generated with Claude Code