You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
GC: collect worktree safety facts without blocking #3804
GC still blocks while collecting the Git facts that decide whether a linked worktree must be kept. Status, dirty paths, HEAD, unpushed commits, submodule inventory and activity lookup run synchronous children, preventing a responsive in-process report.
Evidence
On origin/main e43aa3d, commands/gc/worktrees.ts collectWorktreeSweep invokes synchronous worktreeActivityOf, hasUncommittedWork, resolveFullRef, porcelainOf/dirtyPaths, unpushedCommits and hasPopulatedSubmodules. workspace/worktree.ts removalCheck has a 60-second budget and preserves unknown/timeout distinctions; HEAD and activity use the existing 10-second Git read budget. PR #3802 separately moves inventory discovery to async reads.
Cause
These fact readers also support destructive worktree revalidation and were built as synchronous CLI helpers. The report currently uses the same blocking entry points even though its aggregator is asynchronous.
Fix idea
Add asynchronous report reads using the same arguments, parsers, protection rules and budgets, and await them during collection. Preserve unknown/timeout refusal, full HEAD identity, detached-head and unpushed-commit protection, and populated-submodule checks. Keep synchronous revalidation at the locked destructive boundary. Verify delayed real-child liveness at each phase and timed-out status refusal, plus existing worktree loss guards. Merge-state/network policy, device reads and whole-report context/cancellation remain under #3546/#3783.
Activity
janicduplessis commentedon Oct 14, 2026
Claimed: perf/3804-async-gc-worktree-facts