Repository navigation
fix(install): Windows installer no longer reports failed doctor migration as complete - #120033
Conversation
Invoke-OpenClawCommand ignored the child exit code, so a failed 'openclaw doctor --non-interactive' still printed '[OK] Migration complete'. The wrapper now throws on nonzero exit and Run-Doctor reports the failure with the exact command to rerun instead of claiming success.
|
Codex review: found issues before merge. Reviewed August 7, 2026, 3:38 AM ET / 07:38 UTC. ClawSweeper reviewWhat this changesThe PR makes the Windows installer throw on nonzero OpenClaw CLI exits and show a doctor-migration recovery warning instead of falsely reporting success. Merge readinessKeep open: the prior P2 finding remains on the exact head, so the new regression fixtures can fail without failing Vitest. The production repair is otherwise the correct shared-wrapper boundary fix. Priority: P1 Review scores
Verification
How this fits togetherThe Windows installer calls the OpenClaw CLI through a shared PowerShell wrapper, then reports setup and migration outcomes to the operator. The wrapper’s exit handling affects doctor migration and other installer command steps. flowchart LR
A[Windows installer] --> B[Shared command wrapper]
B --> C[OpenClaw CLI]
C --> D{Exit status}
D -->|success| E[Migration complete]
D -->|failure| F[Recovery warning]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceTests +30, Other +4. Total +34 across 2 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Add direct assertions for both PowerShell fixtures, then obtain a focused Windows/PowerShell result for the exact head. Do we have a high-confidence way to reproduce the issue? Yes, from current source: a nonzero native exit does not throw in the wrapper, and Run-Doctor then prints success unconditionally; this read-only review did not execute Windows PowerShell. Is this the best way to solve the issue? Yes for the production repair: the shared command wrapper owns child-process exit semantics, but the PR still needs assertions that exercise both new regression fixtures. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against ea4466e5dce5. LabelsLabel 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
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
…tion as complete (openclaw#120033) * fix(install): Windows installer surfaces doctor migration failures Invoke-OpenClawCommand ignored the child exit code, so a failed 'openclaw doctor --non-interactive' still printed '[OK] Migration complete'. The wrapper now throws on nonzero exit and Run-Doctor reports the failure with the exact command to rerun instead of claiming success. * chore: re-fire CI * chore: re-fire CI against fixed main baseline
What Problem This Solves
Fixes an issue where the Windows installer printed
[OK] Migration completeeven whenopenclaw doctor --non-interactivefailed.Invoke-OpenClawCommandinvoked the CLI with&and never checked$LASTEXITCODE— PowerShell does not throw on nonzero child exit — so thetry/catcharound the doctor run could never catch a failure, and every other installer step using the wrapper had the same blind spot.Why This Change Was Made
The wrapper is the owner of the child-process contract, so it now throws on any nonzero exit code (
openclaw <args> failed with exit code N).Run-Doctorkeeps migration failures non-fatal for the install as intended, but reports honestly: success prints[OK] Migration completeonly inside the success path, and failure prints a warning naming the exact command to rerun.User Impact
Windows operators whose config migration fails during install now see it immediately with a recovery command, instead of discovering a stale config later.
Evidence
node scripts/run-vitest.mjs test/scripts/install-ps1.test.ts— passes, with new regression tests asserting the wrapper throws on nonzero exit and that Run-Doctor emits the failure branch text (and no false[OK]).