Repository navigation
Preserve normal setup command output drains - #1361
Conversation
Co-authored-by: Karen Lai <[email protected]> Co-authored-by: Copilot App <[email protected]> Copilot-Session: 4f97b3a3-def7-4f33-b7d5-ece171b4fd0b
|
🦞👀 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. |
|
@clawsweeper review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Codex review: blocked before merge. Reviewed September 7, 2026, 10:40 PM ET / September 8, 2026, 02:40 UTC. ClawSweeper reviewWhat this changesPreserves trailing setup-command output by waiting for stream closure, while retaining bounded waits for explicit WSL inspections and timeout cleanup. Merge readiness⛔ Blocked before merge - 2 items remain This remains a useful fix absent from current main, with no actionable patch findings. The previously identified setup/connect proof requirement remains unresolved in the available snapshot, and the collaborator-authored PR remains draft. Priority: P2 Review scores
Verification
How this fits togetherThe setup engine runs Windows processes and WSL commands during installation, configuration, and pairing. Their captured output feeds JSON parsing, success-marker checks, and setup decisions. flowchart TD
A[Setup steps] --> B[Windows or WSL command]
B --> C[Capture stdout and stderr]
C --> D{Drain policy}
D -->|Normal exit| E[Wait for stream closure or cancellation]
D -->|Inspection or timeout| F[Bounded drain]
E --> G[Command result and setup decisions]
F --> G
Before merge
Agent review detailsSecurityNone. Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep complete output draining as the normal policy, retain explicit bounded inspections, and establish the declared setup/connect result before landing. Do we have a high-confidence way to reproduce the issue? Yes, at source level: current main can return when its drain delay wins before stdout/stderr callbacks finish. This review did not execute a failing reproduction. Is this the best way to solve the issue? Yes. An explicit inspection escape preserves complete ordinary command output without changing existing call signatures or broadening command policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 6d1056270082. 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 (4 earlier review cycles)
|
|
Current head b4db08d is review-clean. ClawSweeper reports no actionable findings and accepts the current-head live WSL output proof. Local build and all required suites pass. Hosted setup/connect E2E is blocked only by the recurring external OpenClaw CLI installer failure, so this draft is paused pending #1297 (fix(setup): securely bound CLI installer retries). |
Use the shared process test host instead of cmd.exe start so the inherited-output-handle regression measures the bounded drain rather than shell startup behavior. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 4f97b3a3-def7-4f33-b7d5-ece171b4fd0b
Summary
Supersedes #1343 (fix(setup): preserve normal command output drains), fixes #1194 (Preserve trailing command output while bounding inherited-pipe waits), and preserves @karkarl's focused design on current
main.RunAsyncsignaturewsl.exe --list,--version, and--statusinspection calls into the bounded three-second escapeRunInWslAsync, installation, pairing, gateway commands, and destructive WSL operationscmd.exe start /btimingRequired proof pools
windows-wsl-gateway-e2e: selected because setup WSL inspection and command-output behavior changed. Current-head workflow run 34180664096 passed Setup and connect E2E, network recovery E2E, and revocation recovery E2E.Validation
Current head:
29686d14..\build.ps1: passeddotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore: 3,943 passed, 32 skippeddotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore: 2,861 passeddotnet test .\tests\OpenClaw.SetupEngine.Tests\OpenClaw.SetupEngine.Tests.csproj --no-restore: 1,099 passed34180664096: Core and CLI, Tray/setup/integration, UI/functional/accessibility, Setup and connect E2E, network recovery E2E, revocation recovery E2E, x64 publish, release metadata, proof contracts, and CI Gate passedReal behavior proof
STDOUT_MARKERandSTDERR_MARKERare captured completelyCommandRunner.RunInWslAsyncexecutions against Ubuntu viawsl.exe -d Ubuntu -- bash -seach captured 2,000 stdout lines plus trailing stdout/stderr markers and completed without a pipe hang; warmed runs completed in roughly 0.2 to 0.35 seconds34180664096Not verified / blocked: none for the changed behavior.
Ownership notes
CommandRunner.RunAsyncuniversally capped every successful output drainRunAsyncwaits for EOF;RunAsyncAllowingInheritedPipeHandleEscapeexplicitly identifies known WSL inspection callersICommandRunner.RunAsyncandCommandRunner.RunAsyncsignatures remain unchanged for source and binary compatibilitySecurity impact
No credential, permission, or command-policy changes. The change only controls post-exit output draining and cancellation.