Repository navigation
fix(setup): securely bound CLI installer retries - #1297
Conversation
Download the installer to a temporary file with bounded curl retries before executing it. Pass the script through WSL stdin so Bash variables survive, and preserve curl failures for actionable setup errors. Fixes #1256.
Download the installer to a temporary file with bounded curl retries before executing it. Pass the script through WSL stdin so Bash variables survive, and preserve curl failures for actionable setup errors. Fixes #1256.
…-download-retries
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
…-download-retries
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 7, 2026, 9:03 PM ET / September 8, 2026, 01:03 UTC. ClawSweeper reviewWhat this changesWindows setup downloads installers privately before execution, bounds official-source transfers, preserves download errors and custom-source timing, updates the command preview, and pins Node 24.19.0. Merge readiness✅ Ready for maintainer review Keep this PR as the active fix. Current main still masks download failures, the earlier code findings are resolved, and the updated runtime evidence addresses the previous compatibility concern. No blocking introduced defect was found. Priority: P0 Review scores
Verification
How this fits togetherThe setup engine installs the Gateway CLI inside a managed WSL distribution before configuring and pairing the Windows application. Installer failures feed the setup retry and rollback flow; successful installations undergo exact version checks. flowchart TD
A[Setup configuration] --> B[Installer command builder]
B --> C[Private HTTPS download]
C --> D{Complete nonempty download}
D -->|Yes| E[Run installer and verify versions]
D -->|No| F[Preserve download failure]
E --> G[Cleanup and setup result]
F --> G
G --> H[Continue or bounded retry]
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Setup should retain actionable download errors and bounded in-product retries, execute only complete installers, and preserve custom-source compatibility. Do we have a high-confidence way to reproduce the issue? Yes, from source: on current main a failed curl transfer can be masked by successful bash termination, followed by misleading CLI-location probing; this review did not execute that failure. Is this the best way to solve the issue? Yes. The patch repairs the existing installer owner, reuses pipeline retries, and derives the preview from production code; supplied current-head setup and recovery evidence addresses the runtime-pin concern. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 88822d342567. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (9 earlier review cycles; latest 8 shown)
|
Co-authored-by: Copilot App <[email protected]> Copilot-Session: e6c2cca1-653c-4578-8e26-f2434d221143
|
@clawsweeper re-review P2 fixed at |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
🦞👀 Re-review progress:
|
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
Summary
SetupPipelineown the only retry loop, capped at two attempts, with no nested curl retries.24.19.0, the current official installer default, because the official installer now rejects the previous22.22.3runtime.--versionand official-only--node-versionarguments.mainwhile retaining the proven installer behavior.Fixes #1256 (Setup masks fresh-WSL DNS failures during CLI installation).
Supersedes #1258 because its fork branch was being force-updated during repair and could not be advanced without violating the no-force requirement.
Validation
Current head:
d002ba79..\build.ps1: passeddotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore: 3,943 passed, 32 skippeddotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore: 2,861 passeddotnet test .\tests\OpenClaw.SetupEngine.Tests\OpenClaw.SetupEngine.Tests.csproj --no-restore: 1,096 passedReal behavior proof
Capabilities review UI
The isolated preview displayed the production-derived command with the selected Gateway and Node versions. Custom installer previews omit the official-source 15/60-second curl deadlines while retaining HTTPS restrictions, complete download, cleanup, and exact version pinning.
Fresh WSL installer behavior
The production command has exercised DNS failure, a successful second pipeline attempt, transfer timeout, partial transfer, empty response, private permissions, and exact-path cleanup. Current-head tests additionally prove cleanup IOException and unrelated cleanup cancellation cannot mask the original download failure or caller cancellation.
Slow custom HTTPS compatibility
Current-head production
BuildInstallCommandwas executed against a locally trusted HTTPS server in Ubuntu that intentionally delayed its response for 65 seconds:The command contained neither
--connect-timeoutnor--max-time, completed within the existing five-minute outer budget, executed the exact version argument, and removed its private/tmp/openclaw-installer-*directory.Official installer portability and runtime tuple
Hosted E2E exposed two upstream compatibility changes that current head corrects:
--remove-on-error; current head relies onset -euo pipefailplus the exact private-directory EXIT trap instead.22.22.3and requires Node24.16.0+or26.1.0+; current head pins the installer's exact current default, Node24.19.0, and verifies that exact runtime after installation.Full current-head workflow dispatch: https://github.com/openclaw/openclaw-windows-node/actions/runs/34174326026 at
d002ba79:PiperVoiceExtractionTeststemporary-file lock flake; the same test passes locally and the failed lane was rerunThe setup/connect proof recorded Gateway
2026.6.34, protocol v4, operator and node credentials, gateway restart, and a successful realnode.invokecall.Required proof pools
windows-wsl-gateway-e2e: satisfied by current-head full workflow run34174326026, including setup/connect, network recovery, and revocation recovery.windows-winui-interactive: isolated Capabilities review UI proof passed and visibly includes the selected Gateway and Node versions; current-head preview is derived from the same production builder and has focused official/custom coverage.Security impact
Compatibility and migration
No configuration migration is required. Custom HTTPS installer timing is preserved. The official runtime pin advances from unsupported Node
22.22.3to exact Node24.19.0, validated with Gateway2026.6.34by current-head hosted setup, pairing, restart, network recovery, revocation recovery, and node invocation proof.