Skip to content

Clean up temporary worktrees after completed PR tours - #34

Merged
rcosteira79 merged 2 commits into
mainfrom
fix/accepted-tour-worktree-cleanup
Nov 2, 2026
Merged

rcosteira79 merged 2 commits into
mainfrom
fix/accepted-tour-worktree-cleanup

Conversation

@rcosteira79

@rcosteira79 rcosteira79 commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Completing a PR tour stopped the review server and removed its active marker but left the temporary checkout registered in Git. Shutdown now drains requests, disposes the session, and removes the completed review's clean worktree and container. Unfinished reviews and worktrees with local edits remain available, and cleanup failures still release the session lock.

Attached reviews retain their checkout until the agent acknowledges the result or the delivery timeout expires. Explicit shutdown clears that timer too. Reopening a completed review recreates its owned checkout at the recorded PR revision; review refs preserve the base and head after branch deletion and garbage collection. Retention tolerates already-removed worktrees, and the existing local-approval flow can reload its saved state without a GitHub publication receipt.

Validation: full CI passes, including all Monaco browser groups and Windows build/install checks. Real CLI/Git regressions cover acceptance, worktree removal, source-checkout preservation, acknowledgement, interruption before acknowledgement, resume after branch deletion and garbage collection, pruning, unfinished reviews, and dirty-worktree retention.

@rcosteira79
rcosteira79 marked this pull request as ready for review November 2, 2026 20:25
@rcosteira79
rcosteira79 merged commit 006d30b into main Nov 2, 2026
14 checks passed
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