Repository navigation
fix(server): storage cleanup no longer fails on a worktree folder without .git - #14
Merged
Merged
Conversation
…hout .git A leftover folder in the worktrees directory whose .git file is gone made every cleanup sweep report a NotFound failure from FileSystem.stat. Treat a missing .git like any other non-linked checkout and keep the folder. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Other stat failures, such as a permission error, are reported as a cleanup failure again instead of as a non-linked worktree. Co-Authored-By: Claude Opus 5.5 <[email protected]>
GwydionBr
added a commit
that referenced
this pull request
Oct 16, 2026
Storage cleanup now follows upstream, which handles worktrees shared by subagents on its own (pingdotgg#19748, pingdotgg#19749). Only the missing-.git guard from #14 stays on top. Branch adoption in ThreadPullRequestService is kept and uses the new crypto.randomUUIDv4() call. Branch-group sidebar code is kept with upstream's pruned comments, and its header focus ring is now inset for the new lint rule. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
A folder in the managed worktrees directory whose
.gitfile is gone (here: a leftover of deleted threads that only contained.DS_Storeand an emptysupabase/snippets/) made every storage cleanup sweep fail withNotFound: FileSystem.stat (…/.git), and the user saw a cleanup error each time.The linked-worktree check now treats a missing
.gitlike any other non-linked checkout and keeps the folder with the reason "Not a linked worktree". It is still never removed automatically, since without.gitthe cleanup cannot prove it is a worktree.Test:
keeps a leftover folder whose .git is gone instead of failinginstorageCleanup.test.ts. The existingaggregates expired artifacts and rotated logs…test already fails on main and is unrelated.Claude Opus 5.5 via Claude Code in T3 Code.
🤖 Generated with Claude Code