Repository navigation
fix(setup): restore gateway reload mode through stdin - #1489
Conversation
Signed-off-by: Sebastien Tardif <SebTardif@ncf.ca>
|
🦞👀 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 23, 2026, 5:05 PM ET / 21:05 UTC (Revision 2). ClawSweeper reviewWhat this changesThe setup wizard sends the script that restores the gateway reload setting through WSL standard input and adds a regression test for keeping script values out of process arguments. Regression provenancePossible regression — probable (reviewed change; reproduction). No predecessor PR is attributed. Merge readiness⛔ Blocked before merge - 3 items remain This focused repair remains necessary: current main and the latest release still use the WSL argument path. No introduced correctness defect was found. Later exact-head WSL evidence strengthens the proof, but the required Tray validation still reports five failures whose disposition needs maintainer confirmation. Priority: P2 Review scores
Verification
How this fits togetherWindows setup temporarily disables gateway reload while onboarding runs. Afterward, the setup engine restores the configured mode through WSL, restarts the gateway, and verifies its health and ownership. flowchart TD
A[Onboarding finishes] --> B[Configured reload mode]
B --> C[Quoted restoration script]
C --> D[WSL standard input]
D --> E[Gateway config command]
E --> F[Restart and verify gateway]
Decision needed
Why: Repository policy requires successful closeout validation, while the PR reports the same failures on unrelated heads and its exact-head CI checks pass; the review cannot authorize an exception. Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the existing reload-restoration lifecycle and quoted value, use the established WSL standard-input transport, and land it with a recorded disposition of the Tray failures. Do we have a high-confidence way to reproduce the issue? Yes at the source level: current main sends a script containing Is this the best way to solve the issue? Yes. Selecting the existing standard-input transport is a narrow repair that preserves quoting, retry timing, restart, and ownership checks. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against fb8b9e736f74. LabelsLabel changes: No label 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
HistoryReview history (1 earlier review cycle)
|
|
Global triage: TAKE. Take confidence 92%; recommendation confidence 90%; effort extra-small; risk low. Reviewed exact head |
|
Head fcb859d has the Shared and Tray closeout in the body. Shared: 4093 passed, 0 failed, 32 skipped. Tray: 3059 passed, 5 failed. Those five source-contract failures are the same on 1488, 1489, 1490, and 1491. The Validation section does not contain a literal backtick-n. The recorded reload invocation has inputViaStdin true, and the reload mode is absent from the wsl argv. A live wsl.exe restore was not run on this host. |
What Problem
Restoring gateway.reload.mode wrapped the value in POSIX single quotes and still sent the script through bash -c. wsl.exe expands
$NAME before bash starts, so a reload mode of$PATH writes the Windows PATH into the gateway config.Why
The quotes do not apply to the wsl.exe expansion.
User Impact
The restore script now uses inputViaStdin true. The single quotes stay. wsl.exe argv is -d distro -- bash -s, so the username and reload mode are not in the argument vector.
Evidence
Red: RestoreReloadMode_PipesScriptAndKeepsUserAndModeOutOfWslArgv failed because InputViaStdin was false. Green: setup-engine tests 1192 passed. The host wsl --version UTF-16 test failed and does not touch this script. .\build.ps1 passed.
Required proof pools
Validation
Closeout
Run on 2026-09-23 on this Windows host, head fcb859d.
Real Behavior Proof
The recorded invocation has inputViaStdin true and the reload mode is absent from the wsl argv.
Not verified: no live wsl.exe restore. WSL2 cannot start on this machine because VirtualizationFirmwareEnabled is false.
Maintainer integration closeout (2026-09-24)
The original head
fcb859d0ff7813657260587a4f4336403f53a90bis unchanged. Its two-file patch was applied to currentmain(0e45bb6730259bddd7a59527bd8d0dca8b4358d7) in an isolated detached checkout. The resulting tree33600265db29c381441b883ddcbf59718f453b13exactly matchesgit merge-tree --write-tree; no patch repair or author-history rewrite was needed../build.ps1: passed on Windows ARM64 with .NET SDK 10.0.401.dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore: 4,104 passed, 35 skipped, 0 failed.dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore: 3,072 passed, 0 failed. This supersedes the author's older five local source-contract failures for the current-main integration tree.dotnet test ./tests/OpenClaw.SetupEngine.Tests/OpenClaw.SetupEngine.Tests.csproj --no-restore: 1,193 passed, 1 skipped, 0 failed, includingRestoreReloadMode_PipesScriptAndKeepsUserAndModeOutOfWslArgv.CI Gatepassed.The local machine still cannot provide live WSL proof; no MXC proof or Gateway 2026.9.6 result is claimed. The hosted changed-path WSL proof and the independent current-main ARM64 integration floor are both green.