Skip to content

fix(install): resume-download loop for truncated transfers - #277

Merged
dahai80 merged 1 commit into
mainfrom
fix/install-resume
Nov 17, 2026
Merged

dahai80 merged 1 commit into
mainfrom
fix/install-resume

Conversation

@dahai80

@dahai80 dahai80 commented Nov 17, 2026

Copy link
Copy Markdown
Owner

Problem

Live verification of the install script against the real v0.8.5 release exposed that flaky networks/proxies truncate large CDN transfers mid-stream: HTTP/2 PROTOCOL_ERROR and byte-stream truncation (3-24MB) across 10+ attempts to release-assets.githubusercontent.com. A single-shot curl --retry does not recover — it does not resume from the byte offset.

Fix

Download wrapped in an 8-attempt loop with curl -C - (byte-offset resume). Integrity is still guaranteed by the sha256 check against SHA256SUMS.txt — verified live that a truncated 24.1MB partial mismatches the official checksum (38cbfef7… vs computed 37c0ad54…) and is rejected.

Verification

  • Stub-release e2e: happy path through the new loop green (download, checksum, install, version print)
  • Live network: latest-tag resolution works; truncation/mismatch rejection confirmed; full 25MB transfer blocked by the local proxy environment (not a script defect — to be re-verified when the network is stable)

Flaky networks/proxies kill large CDN transfers mid-stream (observed:
HTTP/2 PROTOCOL_ERROR and byte-stream truncation at 3-24MB across 10+
attempts to release-assets.githubusercontent.com). curl -C - resumes
from the byte offset, up to 8 attempts; the sha256 check still
guarantees integrity of the assembled file (verified: truncated
24.1MB partial mismatches official SHA256SUMS and is rejected).
@dahai80
dahai80 merged commit fd2e877 into main Nov 17, 2026
1 check passed
@dahai80
dahai80 deleted the fix/install-resume branch November 17, 2026 03:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant