fix(install): repair stale Winget Node registrations#112055
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 20, 2026, 11:57 PM ET / July 21, 2026, 03:57 UTC. Summary PR surface: Tests +35, Other +11. Total +46 across 2 files. Reproducibility: yes. at source level: the linked report and fixture define a deterministic path where Winget returns Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review findings
Review detailsBest possible solution: Keep hash verification intact and either validate a documented, safe Winget repair sequence on an affected Windows machine or retain the existing safe fallback path rather than adding an automatic Do we have a high-confidence way to reproduce the issue? Yes, at source level: the linked report and fixture define a deterministic path where Winget returns Is this the best way to solve the issue? No. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against e679566a1c4d. Label changesLabel justifications:
Evidence reviewedPR surface: Tests +35, Other +11. Total +46 across 2 files. View PR surface stats
Security concerns:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
Closes #112051
What Problem This Solves
Fixes an issue where Windows users could not complete OpenClaw setup when Winget retained a Node.js package registration but the actual Node runtime was missing or unusable.
Why This Change Was Made
The installer now captures Winget's result before path refresh commands can overwrite it. When Winget returns the specific no-applicable-upgrade code and Node validation still fails, setup makes one
--forcerepair attempt, refreshes runtime discovery, and reuses the existing Node validation before reporting success.Other Winget failures are not force-retried, and the repair path is bounded to one attempt.
User Impact
Windows setup can repair a stale Winget Node registration automatically instead of repeating the same "Node.js is still unavailable" failure on every run.
Evidence
Install-Nodefunction with:-1978335189(0x8A15002B),winget install OpenJS.NodeJS.LTS --source winget --force --accept-package-agreements --accept-source-agreements,node scripts/run-vitest.mjs test/scripts/install-ps1.test.ts1file passed,30tests passed.node_modules/.bin/oxfmt --check scripts/install.ps1 test/scripts/install-ps1.test.tspassed.git diff --check upstream/main...HEADpassed.0verified and0unverified secrets.python .agents/skills/autoreview/scripts/autoreview --mode branch --base upstream/mainautoreview clean: no accepted/actionable findings reported(patch is correct, confidence0.94).