Skip to content

fix(server): let the start-from-origin fetch outlive the 30s git timeout - #10943

Open
Mnigos wants to merge 1 commit into
pingdotgg:mainfrom
Mnigos:fetch-remote-timeout
Open

fix(server): let the start-from-origin fetch outlive the 30s git timeout#10943
Mnigos wants to merge 1 commit into
pingdotgg:mainfrom
Mnigos:fetch-remote-timeout

Conversation

@Mnigos

@Mnigos Mnigos commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Starting a new thread with New worktree and Start from origin runs git fetch --quiet origin under the driver's default 30 s deadline. On a large or stale remote the fetch is killed mid-pack, the ref never advances, and every retry downloads the same pack again and dies at 30 s, leaving tmp_pack_* leftovers behind.

fetchRemote now runs without that deadline (timeoutMs: null), the same way every push variant already does. This is the first step from the triage on #10916; narrowing the bootstrap fetch to the selected branch is left for a follow-up.

Verification

  • New test in GitVcsDriverCore.test.ts delays the spawned fetch by 31 s on the test clock and asserts the remote tracking ref advances. It fails on main with Git command timed out. and passes here.
  • vp test run apps/server/src/vcs/GitVcsDriverCore.test.ts: 62 tests pass. Server typecheck and lint on the touched files are clean.

Fixes #10916. Implemented with Claude Code (Claude Fable 5.1).

Summary by CodeRabbit

  • Bug Fixes
    • Large remote fetches can now run beyond the previous 30-second limit, preventing them from being interrupted before completion.
    • Remote tracking references are updated correctly after longer-running fetch operations.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Sep 9, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 02dab4e

Macroscope's review found this PR approvable — This PR makes a localized timeout correction for the start-from-origin Git fetch and adds an integration test covering fetches longer than 30 seconds. Other Git operations and product defaults remain unchanged.

You can add or adjust custom eligibility rules. Learn more.

@coderabbitai

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 6c7cac12-df1a-438c-9db7-fadd8b2194f2

📥 Commits

Reviewing files that changed from the base of the PR and between 6c58362 and 02dab4e.

📒 Files selected for processing (2)
  • apps/server/src/vcs/GitVcsDriverCore.test.ts
  • apps/server/src/vcs/GitVcsDriverCore.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

fetchRemote now allows Git fetches to run beyond 30 seconds. A test verifies that a delayed fetch updates the remote tracking ref correctly.

Changes

Remote fetch timeout

Layer / File(s) Summary
Disable fetch timeout and validate delayed completion
apps/server/src/vcs/GitVcsDriverCore.ts, apps/server/src/vcs/GitVcsDriverCore.test.ts
fetchRemote passes timeoutMs: null to executeGit. The test delays fetch by 31 seconds and verifies the remote tracking ref reaches the pushed head.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to 02dab

Remote fetches can now complete beyond 30 seconds, preventing large or stale remotes from failing solely because of the prior fixed deadline. The delayed completion behavior is covered with no current merge-blocking risk.

Suggested reviewers: juliusmarminge, t3dotgg

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: allowing the start-from-origin fetch to exceed the 30-second Git timeout.
Description check ✅ Passed The description explains what changed, why it changed, and how it was verified. UI changes do not apply. The checklist is not reproduced explicitly, but the required substantive information is present…
Linked Issues check ✅ Passed The changes satisfy issue #10916 by setting fetchRemote timeoutMs to null and adding a regression test that verifies a fetch lasting longer than 30 seconds completes and advances the remote-tracking r…
Out of Scope Changes check ✅ Passed The changes are limited to fetchRemote timeout handling and its regression test. The deferred branch-narrowing work is documented as follow-up work and is not included in this pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: New worktree creation fails when git fetch exceeds the hardcoded 30s timeout

1 participant