Repository navigation
Prove stacked PRs merged through their base branch - #457
Merged
Merged
Conversation
The pruning guard only accepted a PR merged straight into main, so a branch whose PR merged into another branch could never be removed, even after that branch landed. Follow the base branch's own merged PR (at most three hops), holding each hop to the existing ancestor, tree, merge-tree or diff proof. An unmerged base, or one that landed before the stacked work, still preserves the tip. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Summary
scripts/worktree.shmerge proof only accepted a PR whose base ismain, so released worktrees for PRs stacked on another branch stayed forever asnot-proven-merged, even when that branch later landed.proofnow falls back to a bounded walk: the tip must pass the existing proof (ancestor, identical tree, clean merge-tree, or identical diff) against the merged head of the branch its PR targeted, and that head must pass it againstmain. At most three hops; missing commits, unmerged bases, or a base that merged a head without the stacked work all keep the tip.docs/worktree-hygiene.mddocuments the rule.Test plan
pnpm build && pnpm test(all 120 worktree tests plus the package suites).cf3-evidence-repairvia Record a live Codex question: Modex reads it, Codex takes the answer (CF-3) #357,cf7-path-repairvia List the project files a turn touched, as the CLI reported them (CF-7 context map) #355,lm5-reroute-repairvia LM-3 and LM-5: signed delivery of isolated local execution and admission policy #423); the five whose base PR (Preserve historical CF8 candidate results and keyboard review kit #338, Add main's Code Review read service through gh (CR-2) #349, Build the Code Review inbox and workspace host (CR-3) #346) never merged staynot-proven-merged.🤖 Generated with Claude Code