Repository navigation
Resume native installer downloads - #731
Merged
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
SaladDay
force-pushed
the
resume-native-installer-downloads
branch
from
October 15, 2026 13:07
c679fb2 to
d71a808
Compare
This comment has been minimized.
This comment has been minimized.
SaladDay
force-pushed
the
resume-native-installer-downloads
branch
from
October 15, 2026 13:12
d71a808 to
6f05cee
Compare
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
The native bootstrap (
bootstrap.sh,bootstrap.ps1) now keeps and resumes the installer archive, detects stalls instead of capping the download at 20 minutes, and checks the grant and options before it downloads.<Runtime home>/native-download/<sha256>.tar.gz(verified) and.part(partial), outside the staging directory the bootstrap wipes. Core's checksum names the file, so another build never reuses it; other archives in the directory are pruned. A cached archive is verified on every run and deleted if it fails. The verified archive is kept after a failed install so a rerun needs no download, and removed when the installation completes.--continue-at -(PowerShell:Rangeheader, 206 appends, 200 restarts),--speed-limit 1024 --speed-time 60, no--max-time, five attempts like the Core launchers (Make the installer launchers robust #722). Retried curl codes: 6, 7, 16, 18, 28, 33 (server cannot resume: the part is deleted and the download restarts), 35, 52, 55, 56, 92 and HTTP 408/429/5xx. No--retry-all-errors. The final message names the network to Core and GitHub andHTTPS_PROXY.POST /api/v1/agent-daemon/installation(side-effect free, "does not claim or rotate credentials") answers a 401 for an expired or wrong grant. bootstrap.sh sends it asprintf 'header = ...' | curl --config -, so the grant stays out of argv. Only a 401 stops the bootstrap; any other answer is left to the installer. The same response'sharnessis mapped (codex,claude_sdk,mcodetocodex,claude,minimax) to check that--harnessnames known Harnesses and includes the Session Harness;--install-dir/--bundle-dirmust be absolute. The installer stays authoritative (it still validates everything).source_hashrefreshed). Measured on the v0.0.12-rc.1 linux-amd64 release archive: 316 MiB archive, 907 MiB unpacked (codex 320, claude 258, node 227, minimax 134 MiB), installed about 560 MiB for one Harness and about 940 MiB for all three. Peak about 2 GiB (one Harness) to 2.2 GiB (all three). macOS and Windows archives are 285 and 274 MiB.Cache path for
oac-daemon uninstall(G5):<Runtime home>/native-download(OAC_RUNTIME_HOME, default~/.oac), holdingdownload.lockand, after a failed install,<sha256>.tar.gz[.part].Why
Audit F3 (no resume or reuse, 20-minute cap, mistakes found only after the download) and P2 F21 (disk requirement).
Verification
go testforservices/core/internal/nativeinstaller(Bootstrap tests, 3 runs): pass. New tests: resume after a stall (the stall window is shortened through a curl wrapper), archive kept after a failed install and removed after success, corrupt cached archive discarded, expired grant/wrong or unknown Harness/relative directory stop before any archive request. Existing fixtures now honour Range.go vet ./...,python3 scripts/check-names.py,node --test website/tests/translations.test.mjstests 1-2 pass.Skipped
scripts/native-onboarding-smoke.mjslocally (needs a built native bundle); CI native jobs on macOS and Windows run it. PowerShell changes cannot run on this host; the Windows job covers them.Note
A grant lasts 30 minutes. A download slower than that now finishes, the installer's own grant call then answers "expired", and a fresh command reuses the cached archive without downloading again.
Need help on this PR? Tag
@codesmith-botwith what you need.