Repository navigation
fix(worktrees): allow four minutes for checkout - #1071
Merged
Merged
Conversation
nixuuu
marked this pull request as ready for review
November 21, 2026 12:01
nixuuu
enabled auto-merge (squash)
November 21, 2026 12:01
nixuuu
added a commit
that referenced
this pull request
Nov 21, 2026
## What changed - Show the effective checkout limit and the measured time when the Git timeout triggers. The measurement ends when Canopy requests interruption, before it waits for process exit or starts cleanup. - Carry the detail through the existing thread preparation errors and `spawn_thread`. The gateway accepts only the fixed timeout wording and numeric durations for `spawn_thread`. Unmeasured timeouts, output limits, other Git errors and worker RPC deadlines keep their existing messages. - The checkout limit policy and cleanup logic stay as before. Thanks @janek-normalnie for reporting the interrupted Windows checkout and suggesting both values. Related: #982 ## Verification - Local on nix-pc after rebasing onto #1071, at `86fa1f0685dedbc1871251fb1d70ebdc923ba288`: 53 tests passed with `check:tmp` across process governor, worktree creation failures, worktree automation, thread creation progress and worktrees. This covers 1.5 s and 3.5 s limits, a deliberately delayed timeout callback, a real checkout timeout through the worker link to the UI stream, saved failure and `spawn_thread`, redaction and distinct failure messages, and a successful checkout past the old 90-second worker deadline. - Integration test typecheck, lint and formatting of edited TypeScript, and the Git diff check passed. - Chromium, before the rebase: started a new worktree in an isolated dev stack and confirmed both values under **Show details**. Checked short, typical and long durations at 390 and 800 px in both themes, plus the actual flow at desktop width. The existing composer intercepted a pointer click at 1280 × 577. Keyboard activation opened the disclosure. - Native mobile receives the same failure through `CreateThreadWithProgress` and renders its detail in **Show details**. Verified the stream and traced the native code path. Manual Android verification was unavailable because device automation could not establish ownership of the emulator. - GitHub CI owns the full gate. ## Copy audit “Git exceeded its time limit.” → “Git timed out after 60.012 s while creating the worktree. The limit was 60 s.” Two short sentences name the operation and the limit. The existing failure instructions and **Return to draft** action stay available. The detail uses the existing disclosure, worktree terminology and spaced time units. All durations wrap in the checked widths, and no meaning depends on color or icons.
This was referenced Nov 22, 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.
Changes
git worktree addafter Git starts. The report showed 22,067 of 56,756 files written when the 60-second limit expired on Windows. At that rate, checkout would take roughly 154 seconds. Four minutes leaves room for variations in file sizes and write speed.spawn_thread. Mixed-version gateway and worker pairs retain the 60-second checkout and 90-second gateway wait.Verification
fa8819faon nix-pc (Linux, Git 2.56.0, Bun 1.4.5). The 92-second checkout completed via gRPC and started a usable thread. The same test verified that an expired queued request returned promptly and created no branch. The worktree andspawn_threadintegration suites also covered normal checkout and cleanup after a real process timeout.check:tmpcovered 58 cases with no temp leaks. An existing continuation test reached its 5-second test harness limit under load and passed in the isolated continuation run with a 20-second harness limit. Gateway, worker, web and mobile typechecks, edited-file lint, and diff checks passed.Thanks to @janek-normalnie for reproducing the timeout and sharing the file counts and Git version.
Related: #915, #1026