docs(dev): note the squash-merged-parent gotcha in merge-policy#3657
Conversation
Adds a "Don't squash-merge a parent PR while children are still open" section to Stack hygiene. We hit this in the same session shipping the #3597 stack: squash-merging the parent PR collapsed the head branch (delete_branch_on_merge: true on this repo) and the child PR refused to render with "Base ref must be a branch". Two recovery paths documented: 1. Preferred — keep "Create a merge commit" for stacked parents (the policy default already; this PR makes the failure mode explicit). 2. If you've already squash-merged — rebase the child onto main and re-target. Calls out the HEAD-vs-branch-name detached-HEAD trap on `git rebase --onto X Y Z`. Follow-up to PR #3653.
|
Warning Review limit reached
Your plan currently allows 6 reviews/hour. Refill in 4 minutes and 27 seconds. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more review capacity refills, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than trial, open-source, and free plans. In all cases, review capacity refills continuously over time. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Code Review — ? finding(s)
protoLabs Code Review Report
No findings recorded. |
Follow-up to PR #3653 (the original merge-policy doc).
Why
Three of us hit this in the same session shipping the #3597 stack: squash-merging the parent PR while a child PR was still open made the child's `base` ref evaporate (`delete_branch_on_merge: true` is on for this repo), and `gh` refused to create or render the child with:
```
Base ref must be a branch (createPullRequest)
```
The merge-policy doc already explained why stacked PRs should use Create a merge commit instead of squash, but didn't explicitly call out the consequence on the parent side. This PR fills that gap.
What's added
A new bullet under Stack hygiene → "Don't squash-merge a parent PR while children are still open" with two recovery paths:
🤖 Generated with Claude Code