Fix worktree removal timing out on large install trees #3902
main fromrefs/pull/3902/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHubgithub-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
- apps/server/src/vcs/GitVcsDriverCore.ts line 3103OutdatedResolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -2381,0 +2404,21 @@2404+ ...commandContext,2405+ detail: "Failed to delete worktree directory.",2406+ cause,2407+ }),2408+ ),2409+ Effect.timeoutOption(REMOVE_WORKTREE_DIRECTORY_TIMEOUT_MS),2410+ Effect.flatMap((result) =>2411+ Option.match(result, {2412+ onNone: () =>2413+ Effect.fail(2414+ new GitCommandError({2415+ ...commandContext,2416+ detail: "Timed out deleting worktree directory.",2417+ }),2418+ ),2419+ onSome: () => Effect.void,2420+ }),2421+ ),2422+ );2423+ }2424+ }
- apps/server/src/vcs/GitVcsDriverCore.ts line 2464OutdatedResolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -2381,0 +2444,21 @@2444+ ...commandContext,2445+ detail: "Failed to delete worktree directory.",2446+ cause,2447+ }),2448+ ),2449+ Effect.timeoutOption(REMOVE_WORKTREE_DIRECTORY_TIMEOUT_MS),2450+ Effect.flatMap((result) =>2451+ Option.match(result, {2452+ onNone: () =>2453+ Effect.fail(2454+ new GitCommandError({2455+ ...commandContext,2456+ detail: "Timed out deleting worktree directory.",2457+ }),2458+ ),2459+ onSome: () => Effect.void,2460+ }),2461+ ),2462+ );2463+ }2464+ }
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:M
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:L
- apps/server/src/vcs/GitVcsDriverCore.ts line 2476OutdatedResolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -2381,0 +2456,21 @@2456+ (cause) =>2457+ new GitCommandError({2458+ ...commandContext,2459+ detail: "Failed to delete worktree directory.",2460+ cause,2461+ }),2462+ ),2463+ Effect.timeoutOption(REMOVE_WORKTREE_DIRECTORY_TIMEOUT_MS),2464+ Effect.flatMap((result) =>2465+ Option.match(result, {2466+ onNone: () =>2467+ Effect.fail(2468+ new GitCommandError({2469+ ...commandContext,2470+ detail: "Timed out deleting worktree directory.",2471+ }),2472+ ),2473+ onSome: () => Effect.void,2474+ }),2475+ ),2476+ );
- apps/server/src/vcs/GitVcsDriverCore.ts line 239OutdatedResolvedby macroscopeapp[bot](GitHub profile, opens in a new tab)@@ -227,3 +236,4 @@227236 return splitNullSeparatedPaths(result.stdout, result.stdoutTruncated);228237 }229238239+export function parsePorcelainWorktreePaths(stdout: string): string[] {
- apps/server/src/vcs/GitVcsDriverCore.ts line 2491OutdatedResolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -2396,0 +2471,21 @@2471+ (cause) =>2472+ new GitCommandError({2473+ ...commandContext,2474+ detail: "Failed to delete worktree directory.",2475+ cause,2476+ }),2477+ ),2478+ Effect.timeoutOption(REMOVE_WORKTREE_DIRECTORY_TIMEOUT_MS),2479+ Effect.flatMap((result) =>2480+ Option.match(result, {2481+ onNone: () =>2482+ Effect.fail(2483+ new GitCommandError({2484+ ...commandContext,2485+ detail: "Timed out deleting worktree directory.",2486+ }),2487+ ),2488+ onSome: () => Effect.void,2489+ }),2490+ ),2491+ );
- apps/server/src/vcs/GitVcsDriverCore.ts line 250OutdatedResolvedby cursor[bot](GitHub profile, opens in a new tab)@@ -227,3 +236,15 @@227236 return splitNullSeparatedPaths(result.stdout, result.stdoutTruncated);228237 }229238239+export function parsePorcelainWorktreePaths(stdout: string): string[] {240+ const paths: string[] = [];241+ for (const line of stdout.split("\n")) {242+ if (line.startsWith("worktree ")) {243+ const worktreePath = line.slice("worktree ".length).trim();244+ if (worktreePath.length > 0) {245+ paths.push(worktreePath);246+ }247+ }248+ }249+ return paths;250+}
t3dotgg(GitHub profile, opens in a new tab) added labelsvouch:trusted
t3dotgg(GitHub profile, opens in a new tab) removed labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:L
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:XS
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes
t3dotgg(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.


You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.