Skip to content

Prove stacked PRs merged through their base branch - #457

Merged
BunsDev merged 1 commit into
mainfrom
stacked-merge-proof
Oct 30, 2026
Merged

BunsDev merged 1 commit into
mainfrom
stacked-merge-proof

Conversation

@BunsDev

@BunsDev BunsDev commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • scripts/worktree.sh merge proof only accepted a PR whose base is main, so released worktrees for PRs stacked on another branch stayed forever as not-proven-merged, even when that branch later landed.
  • proof now 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 against main. 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.md documents the rule.

Test plan

🤖 Generated with Claude Code

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>
@vercel

vercel Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
modex Ready Ready Preview Oct 30, 2026 12:19pm UTC

Request Review

@github-code-quality

Copy link
Copy Markdown

Code coverage overview

Languages: TypeScript

TypeScript / code-coverage-agent

main 9f85d61 stacked-merge-proof 1af6bee +/-
66% 66% 0%

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.

@BunsDev
BunsDev added this pull request to the merge queue Oct 30, 2026
Merged via the queue into main with commit 8eec507 Oct 30, 2026
13 of 14 checks passed
@BunsDev
BunsDev deleted the stacked-merge-proof branch October 30, 2026 14:31

This branch was successfully deployed

1 active deployment
Preview — 1af6bee2 Deployed Oct 30, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant