This issue tracks a systemic friction point discovered across the estate regarding Stacked Pull Requests and Squash Merging.
The Problem:
When a base PR in a stack is squash-merged into main, its commit history is rewritten into a single commit. Downstream PRs in the stack still contain the original, un-squashed commits. This instantly deadlocks the entire downstream stack in a DIRTY (Merge Conflict) state, requiring manual cascading rebases (git rebase --onto combined with git rebase --skip) to untangle.
Imaginative Solutions to Implement:
We should implement one (or both) of the following systemic fixes:
- Repository Configuration Policy: Mandate Rebase-Merging instead of Squash-Merging for intermediate base branches in a stack. Rebase-merging preserves the individual commit signatures, allowing downstream stacks to reconcile natively.
- Autonomous Healing (CICD Squabbler / echidnabot): Deploy a GitHub Action or webhook listener that triggers on pull_request.closed (if merged). If the PR was squashed, the bot queries the GraphQL API for downstream dependent PRs and recursively runs a cascading git rebase --onto to autonomously "heal" the stack without human intervention.
Implementing this will eliminate the manual overhead of untangling stacked PRs across the estate.
Reactions are currently unavailable
This issue tracks a systemic friction point discovered across the estate regarding Stacked Pull Requests and Squash Merging.
The Problem:
When a base PR in a stack is squash-merged into main, its commit history is rewritten into a single commit. Downstream PRs in the stack still contain the original, un-squashed commits. This instantly deadlocks the entire downstream stack in a DIRTY (Merge Conflict) state, requiring manual cascading rebases (git rebase --onto combined with git rebase --skip) to untangle.
Imaginative Solutions to Implement:
We should implement one (or both) of the following systemic fixes:
Implementing this will eliminate the manual overhead of untangling stacked PRs across the estate.