[codex] fix(gateway): open config on Windows#90176
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 4, 2026, 1:23 AM ET / 05:23 UTC. Summary PR surface: Source 0, Tests 0. Total 0 across 2 files. Reproducibility: yes. for source reproduction: current main emits the exact invalid Windows PowerShell command, and 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:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the narrow Gateway command fix after normal draft and merge gates, keeping the existing path escaping and the linked issue-closing relationship intact. Do we have a high-confidence way to reproduce the issue? Yes for source reproduction: current main emits the exact invalid Windows PowerShell command, and Is this the best way to solve the issue? Yes: changing the existing Windows branch in AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against ba445e0e3f32. 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
|
|
Closing this draft to reduce my active PR queue so newer ready fixes can be submitted under the repository's active-PR limit. The Windows config-open branch remains available on the fork if maintainers want to pick it back up. |
Summary
Start-Process -LiteralPathtoStart-Process -FilePath.Fixes #90157
Verification
node scripts/run-vitest.mjs src/gateway/server-methods/config.test.ts -t "uses Start-Process FilePath" --reporter=dotnode scripts/run-vitest.mjs src/gateway/server-methods/config.test.ts --reporter=dotnode scripts/run-vitest.mjs src/gateway/server-methods/config.test.ts ui/src/ui/controllers/config.test.ts --reporter=dotnpx oxfmt --check src/gateway/server-methods/config.ts src/gateway/server-methods/config.test.tsnode scripts/run-oxlint.mjs src/gateway/server-methods/config.ts src/gateway/server-methods/config.test.tsgit diff --checknode scripts/run-tsgo.mjs -p test/tsconfig/tsconfig.core.test.jsonReal behavior proof
Behavior addressed: Dashboard
Open configon Windows used the Gatewayconfig.openFilemethod, which built a PowerShell command containingStart-Process -LiteralPath '<openclaw.json path>'.Start-Processsupports-FilePathfor files/documents, not-LiteralPath, so Windows users saw the dashboard request fail instead of openingopenclaw.json.Real environment tested: Local OpenClaw worktree at commit
3fcc6e50abon macOS with dependencies installed viapnpm install --frozen-lockfile. The proof exercised the actual GatewayresolveConfigOpenCommand()implementation, theconfig.openFileGateway test file, and the UI controller test that callsconfig.openFile. Microsoft LearnStart-Processdocs for PowerShell 7.6 and 5.1 list[-FilePath] <string>as the file/program parameter.Exact steps or command run after this patch:
Evidence after fix:
Observed result after fix: The Windows opener now emits
powershell.exe -NoProfile -NonInteractive -Command "Start-Process -FilePath '<escaped config path>'", preserving the existing quote escaping while using the supportedStart-Processparameter.What was not tested: I did not run a live Windows dashboard click-through or execute PowerShell locally because this macOS environment does not have
pwsh,powershell, orpowershell.exeinstalled. The changed command contract was validated against the actual Gateway command builder, existing UIconfig.openFilerequest tests, and Microsoft Learn parameter documentation.