You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Policy/Automation: Autonomous healing of Stacked PRs after Squash-Merges #13
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.
Activity
hyperpolymath commentedon Sep 30, 2026
RULING D199 (2026-09-30T14:25Z) · scope: estate · basis: applied-unless-struck (D113; owner approved the full table, none struck)
Adopt the automated rebase-onto-base after squash-merge (the lower-maintenance of Solutions A/B).
surface: hyperpolymath/standards#787 (comment)
The open question in this issue is answered by the ruling above; future agents should act on it rather than re-ask.