Repository navigation
fix(worktrees): honor cleanup rules for closed threads - #905
Merged
Merged
Conversation
nixuuu
enabled auto-merge (squash)
November 17, 2026 01:51
Ignore Git-ignored files during cleanup scans. Enabled archived/deleted thread rules authorize discarding local files and removing the checkout despite unpushed or squash-diverged commits, while retaining its local branch. Recheck that authorization atomically before persisting removal and fence reopening against cleanup. Fixes: #82
nixuuu
force-pushed
the
fix/archived-worktree-cleanup
branch
from
November 17, 2026 02:11
cc56317 to
79144c7
Compare
This was referenced Nov 17, 2026
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.
Archived worktrees remained on disk because ignored dependencies/build output counted as local changes, and cleanup still required manual confirmation after squash merges or remote branch deletion.
Exclude Git-ignored files from cleanup status. Enabling Archived threads or Deleted threads authorizes removing the checkout and discarding local files once all sharing threads meet that rule, even when Git reports unpushed commits. Preserve the local branch whenever ordinary local changes or unpushed commits exist. Other cleanup rules and manual removal retain their confirmation requirements.
Validate closed-thread authorization under the reservation transaction's locks before persisting a removal command. Block unarchive/restore during removal, keep worker activity/HEAD/path checks, and stop treating paused goals of closed threads as active work. Update settings copy and the worktree documentation.
Fixes: #82
Validation
check:tmpruns left no test temporary files.Copy audit (§8)