fix(installer): time out stalled runtime downloads#108619
Merged
steipete merged 4 commits intoJul 16, 2026
Merged
Conversation
Contributor
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 16, 2026
* fix(installer): bound curl download stalls * chore: format installer timeout tests * fix(installer): limit timeout to true download stalls * fix(installer): scope timeout to transfer stalls
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.
What Problem This Solves
Fixes an issue where users running either shell installer could wait indefinitely when a curl download connected successfully but then stopped transferring data.
Why This Change Was Made
Both shell installers now abort curl transfers that remain below 1 byte/s for 30 seconds. The change is intentionally limited to post-connect transfer stalls: it does not impose a fixed wall-clock cap or change DNS, TCP, or TLS connection tolerance.
User Impact
Installer downloads now fail and surface curl's timeout status instead of hanging forever after a server stops sending data; slow downloads that continue making progress remain supported.
Evidence
install.shandinstall-cli.shthat captures the curl invocation, verifies--speed-limit 1 --speed-time 30, simulates curl exit 28, and verifies that status is propagated.Operation too slow. Less than 1 bytes/sec transferred the last 2 seconds.3203ef19f37cdf71047a3547eace3f1e09ca869awith 77 passing and no failed or pending checks.test/scripts/install-sh.test.ts: 81 tests passed in 2367 ms.test/scripts/install-cli.test.ts: 31 tests passed in 782 ms.bash -n scripts/install.sh scripts/install-cli.shpasses.git diff --check upstream/main...HEADpasses.upstream/main@9f5609382b5464c9df2a6c81b1ee12d650367730reports the patch correct with no accepted or actionable findings (confidence 0.88).--speed-limitand--speed-timeabort a transfer that remains below the configured rate for the configured period.