Repository navigation
fix(native): let slow uv downloads finish; report every source failure - #66
Merged
Merged
Conversation
Windows installs on v0.6.0 failed at download_uv: the mirror answered 200 in ~1-3s but the ~20 MB archive did not finish inside the 3-minute whole-request client timeout, then the GitHub fallback timed out too and its error replaced the mirror's. The deadline also surfaced as context.DeadlineExceeded, so telemetry counted these as user "interrupted". Download uv with a 60s stall timeout (any received bytes reset it) under a 15-minute per-source cap, and join the errors from all sources. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Problem
In the 24h to 2026-11-20 (stability patrol LANG-612), 5 of 17 real Windows installs on v0.6.0 failed at
download_uv:interruptedwithcontext deadline exceeded (Client.Timeout … while reading body).serverwith a GitHubwsarecvtimeout. In both of these the mirror had been tried first (region=cn).The network diagnostics show
download.langbot.app/tools/uv/...answering 200 in 0.8–2.8s for most of them. The ~20 MB archive simply did not finish withinhttp.Client{Timeout: 3 * time.Minute}, which is a whole-request deadline. Then:context.DeadlineExceeded, sonativeMutationErrorlabelled a network timeout as a user "interrupted".Fix
deploy.FetchWithStallTimeout: it aborts only when no bytes arrive forstall. That covers connect, headers and body; every received chunk resets the timer.EnsureUVuses it with a 60s stall and a 15-minute cap per source.servererror rather thaninterrupted.Tests
TestFetchWithStallTimeoutFinishesSlowSteadyDownload: a trickling server. A whole-request deadline (the old behaviour) cuts it off; the stall timeout of the same size completes.TestFetchWithStallTimeoutAbortsStalledDownload: a server that stops sending after the headers fails fast, with an error naming the source.TestEnsureUVCompletesSlowMirrorDownload:region=cnwith a slow mirror and GitHub returning 502 installs uv.TestEnsureUVReportsEverySourceFailure: when the mirror stalls and GitHub returns 502, the error names both URLs.go test ./... -count=1all green;go vetis clean; cross-builds for windows and darwin pass.🤖 Generated with Claude Code