Skip to content

fix: pending-merge cleanup holds refused checkouts instead of force-removing them - #16042

Merged
atomantic merged 1 commit into
mainfrom
claim/issue-16039
Nov 14, 2026
Merged

atomantic merged 1 commit into
mainfrom
claim/issue-16039

Conversation

@atomantic

Copy link
Copy Markdown
Owner

Summary

  • finishMergedReceipt no longer force-removes (git worktree unlock + branch -D) a receipt checkout the retirement service refused. Head, lock and branch changes now take the existing held path with the recovery task, leaving commits, files and locks untouched.
  • retirePendingMergeCheckout accepts a PR merged at a descendant of the handed-off head (ancestor-of-delivered-head), so a clean checkout retires through the guarded service and a dirty one is held.

Tests

  • cosMergeHandoff.test.js: each former direct-removal reason is held and the checkout stays on disk.
  • heldCheckoutRecovery.test.js: contained-head clean retire / dirty hold.
  • npm run pregate passed.

Local review

codex (gpt-6.1-terra): 1 round, clean, on head bff9128. Nothing remained.

Closes #16039

@atomantic
atomantic merged commit 1fed8e4 into main Nov 14, 2026
17 checks passed
@atomantic
atomantic deleted the claim/issue-16039 branch November 14, 2026 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pending-merge cleanup force-removes receipt checkouts with new commits or locks

2 participants