Repository navigation
fix(install): recover Windows Node setup after package-manager failures - #154487
Conversation
Backport the validated package-manager fallthrough from #134386 and the bounded stale Winget registration repair from #112055. Co-authored-by: Ben.Li <[email protected]> Co-authored-by: luyifan <[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: blocked before merge. Reviewed September 21, 2026, 2:10 AM ET / 06:10 UTC. ClawSweeper reviewWhat this changesThe Windows installer continues past failed or unusable package-manager installations, attempts one narrowly targeted Winget repair, and retains portable Node recovery, with matching tests and documentation. Merge readiness⛔ Blocked before merge - 2 items remain Keep open: this remains a useful extended-stable backport despite both upstream fixes being merged on main. No blocking code defect was found; qualification of the backport’s Windows recovery and upgrade behavior remains incomplete. Priority: P0 Review scores
Verification
How this fits togetherThe Windows installer prepares Node.js before installing or upgrading OpenClaw. It checks the runtime and embedded SQLite, tries available package managers, and either proceeds with a usable runtime or reports recovery instructions. flowchart TD
A[Windows setup or upgrade] --> B[Check Node and SQLite]
B -->|Usable| F[Install OpenClaw]
B -->|Unusable| C[Try package managers]
C -->|Stale Winget registration| D[One exact package repair]
C -->|Failed or unsupported| E[Portable Node recovery]
D -->|Failed or unsupported| E
C -->|Validated runtime| F
D -->|Validated runtime| F
E --> G[Validate runtime or report failure]
G -->|Usable| F
Before merge
Agent review detailsSecurityNone. PR surfaceTests +53, Docs 0, Other +37. Total +90 across 3 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the consolidated recovery owner and bounded Winget repair, with Windows qualification showing the stable branch recovers while preserving existing installation state. Do we have a high-confidence way to reproduce the issue? Yes, from source on the pinned release-branch base: an available package manager followed by a failed Node check returns false before portable recovery. Current main already fixes this path; no runtime reproduction was executed in this review. Is this the best way to solve the issue? Yes, the owner-level consolidation is the appropriate backport shape: it reuses existing validation and portable recovery instead of importing main's broader private-Node architecture. Native qualification of the branch-specific result remains outstanding. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 0af08749bb4a. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
Related: #134386
Related: #112055
What Problem This Solves
Fixes an issue where Windows users updating from older OpenClaw releases could not complete setup when Winget, Chocolatey, or Scoop failed, left an unsupported Node.js runtime, or retained a stale Winget Node registration.
Why This Change Was Made
Backports the validated package-manager fallthrough from #134386 and the bounded stale-Winget repair from #112055 onto
extended-stable/2026.8.33. Each manager result is validated through the existing Node/SQLite probe; failures continue to the next provider and existing portable Node owner. Only Winget's documented0x8A15002Bresult triggers one exact-ID repair attempt, and failed or unsupported repair still reaches the validated fallback path.The implementation is branch-native and does not import later private-Node or installer architecture from
main.User Impact
Windows upgrades can recover without elevation when a detected package manager fails or leaves Node unusable. Machines with a stale MSI/WiX Winget registration get one bounded repair attempt; all other failure shapes retain the existing portable/manual recovery behavior.
Original implementation and intent are credited to @ly85206559 (#134386) and @ooiuuii (#112055).
Evidence
f2c4101babbe0bad8046d03185f9b47784c7f07f(extended-stable/2026.8.33).node scripts/run-vitest.mjs test/scripts/install-ps1.test.tsfailed because Chocolatey validation returnedFalsebefore portable recovery; the stale-Winget fixture likewise could not reach repair.PSParser.Tokenizereports no errors.node scripts/check-changed.mjs --stagedpassed all selected formatting, type, lint, dependency, and repository guards.0x8A15002BasAPPINSTALLER_CLI_ERROR_UPDATE_NOT_APPLICABLE; the documentedrepaircommand supports--id,--exact,--source, and agreement flags. WinGet's pinned repair source routes MSI/WiX installs through ProductCode-backedMsiExecrepair. Unsupported/non-repairable packages still fail into the existing portable fallback.scripts/install.ps1+69/-32 (net +37), required to consolidate three duplicated manager branches behind one validate-and-fall-through owner and add one bounded repair capability. Tests are +55/-2; docs +1/-1.windows-latest, exercising the installer with both Windows PowerShell 5.1 and pwsh.Upstream sources: