fix(config): use Start-Process -FilePath for Windows config opener#91536
fix(config): use Start-Process -FilePath for Windows config opener#91536harjothkhara wants to merge 1 commit into
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed June 8, 2026, 9:27 PM ET / 01:27 UTC. Summary PR surface: Source 0, Tests 0. Total 0 across 2 files. Reproducibility: yes. source inspection gives a high-confidence reproduction path: current main routes Dashboard Open config to 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:
Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land this narrow gateway fix after a contributor or maintainer adds redacted Windows proof, then let the linked issue at #90157 close through the merged fix. Do we have a high-confidence way to reproduce the issue? Yes, source inspection gives a high-confidence reproduction path: current main routes Dashboard Open config to Is this the best way to solve the issue? Yes, the proposed code shape is the best narrow fix: it changes only the unsupported PowerShell parameter, preserves the existing escaping and AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against c4a0ca0b7a41. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source 0, Tests 0. Total 0 across 2 files. View PR surface stats
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
|
|
Landed this fix on Thanks @harjothkhara. I used the same narrow fix shape from this PR and verified it with:
Closing this PR as landed via |
Summary
Fixes the Dashboard Open config action on Windows.
The gateway builds the Windows opener command with
Start-Process -LiteralPath '<path>'.Start-Processhas no-LiteralPathparameter (it exposes-FilePath), so on both Windows PowerShell 5.1 and pwsh 7+ the command fails with a parameter-binding error and the config file never opens.This changes only the Windows branch of
resolveConfigOpenCommandtoStart-Process -FilePath '<path>', preserving the existing single-quoted PowerShell escaping (escapePowerShellSingleQuotedString) so the path stays data, not executable shell text. macOS (open) and Linux (xdg-open) branches are untouched.Fixes #90157
Why this shape
src/cli/update-cli/restart-helper.ts:319(Start-Process -FilePath $launcherPath ...). This patch conforms a broken call site to an idiom the project already relies on in production, rather than introducing a new one.&,$(...), and spaces stay inert. The existingString.rawregression case (C:\tmp\o'hai & calc.json) still exercises quote-doubling + metacharacters.Relationship to existing PRs
extensions/anthropic/openclaw.plugin.json. That mixes a one-line Windows fix with a compat-sensitive plugin catalog surface; the catalog edits should be split into their own PR. This PR intentionally contains only the Dashboard "Open config" fails on Windows: Start-Process -LiteralPath is invalid in all PowerShell versions #90157 fix.Verification
Both test files pass (gateway: 18 tests; UI controller suite green). Local Codex autoreview: clean, no accepted/actionable findings.
Real behavior proof
Behavior addressed: Dashboard "Open config" on Windows calls gateway
config.openFile, which builtStart-Process -LiteralPath '<openclaw.json>'.Start-Processsupports-FilePathfor files/documents, not-LiteralPath, so Windows users saw the request fail instead of openingopenclaw.json. After this patch the command isStart-Process -FilePath '<escaped path>'.Real environment tested: Local OpenClaw checkout on macOS (
darwin), commit5b76436c45. Proof exercised the actualresolveConfigOpenCommand()gateway builder, theconfig.openFilegateway test, and the UI controller test that issuesconfig.openFile. Windows command behavior cross-checked against Microsoft LearnStart-Processdocs (PowerShell 7.x and 5.1), which list[-FilePath] <string>and no-LiteralPathparameter, and against shipped in-repo Windows usage atsrc/cli/update-cli/restart-helper.ts:319.Exact steps or command run after this patch:
Evidence after fix:
Observed result after fix: The Windows opener emits
powershell.exe -NoProfile -NonInteractive -Command "Start-Process -FilePath '<escaped config path>'", preserving quote escaping while using the supportedStart-Processparameter.What was not tested: I did not run a live Windows Dashboard "Open config" click-through. This is a macOS-only environment with no Windows machine, no Parallels, and no access to a Crabbox/Testbox Windows broker, so live PowerShell execution on Windows is not available to me. The unproven residual is solely the runtime launch on Windows; the emitted command contract is verified by unit tests, Microsoft
Start-Processdocumentation, and shipped in-repo Windows usage ofStart-Process -FilePath. Requesting a maintainer with a Windows host (or Testbox) to confirm with the throwaway-file check below before landing: