Repository navigation
Clean up temporary worktrees after completed PR tours - #34
Merged
Merged
Conversation
rcosteira79
marked this pull request as ready for review
November 2, 2026 20:25
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.
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.