Repository navigation
fix(install): retry herdr's download on Windows and name a failed one - #403
Conversation
herdr's installer gives up on a download under 1 KB/s for 30 seconds. install.ps1 ended there with a message about security software; it now runs herdr's installer once more and, when the download fails again, says that the download failed.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 🧰 Additional context used📚 Code guidelines (1)No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (3)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 SummarySummary by CodeRabbit
WalkthroughThe Windows installer now captures herdr installer output and retries once after matching download errors. It reports a download-related error if the retry fails with matching output. Tests cover retry and non-retry cases. ChangesWindows installer retry
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~12 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The claimed exit-code scope issue does not prevent the download retry. No actionable merge-blocking risk remains after normal checks. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 3 systems. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Bumps package.json and herdr-plugin.toml to 0.3.48, moves the Unreleased notes under [0.3.48] - 2026-10-04 (with the PR links #403, #405 and #406 lacked), and adds the compare link. Raises the remote PC bundle to 15 (the bridge starts herdr on a stale socket, #405; `/api/worktree/create` takes `agent`, #401): push the `remote-v15` tag and let the bundle workflow publish before running release.yml. Carries #393, #376, #403, #405, #402, #400, #397, #406, #401, #407, #408. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Fable 5.1 <[email protected]>
Change
On Windows,
install.ps1installs herdr with herdr's own installer when the PC has none. That installer downloads withcurl.exe --speed-limit 1024 --speed-time 30, so a connection that stays under 1 KB/s for 30 seconds ends it:The install ended on the first such failure, and the message pointed at security software although curl had named the cause.
Now a run of herdr's installer that fails with a download error (
curl: (N)or herdr'sFailed to download) is tried once more, and a second failure says the download failed: run again, try another network, or install herdr from herdr.dev first. A stop without a download error keeps the security-software message and is not retried.To tell the two apart the installer's stderr is read with its output (
2>&1, each line still printed as it comes), under a function-localContinueso Windows PowerShell does not end the script at curl's first stderr line.Validation
scripts/windows-install.test.ps1(CI job "Native Windows install") gets the herdr-installer path, which no test went through: on a session without herdr and with a stand-ininstall.cmd, a download that fails twice runs twice and is named as a download, a silent stop runs once and keeps its message, and a download that succeeds on the second try carries on.install.ps1with herdr's and Bun's real installers.