Repository navigation
[Repo Assist] fix(setup): add Windows-side gateway health check to pair-operator step - #743
Conversation
|
🤖 Repo Assist maintenance note. This PR has a merge conflict in Automated rebase attempts in the last three runs have been blocked by the protected-files check: the diff between the original branch history and a rebased history includes To resolve manually (requires push access): git fetch origin
git checkout repo-assist/fix-issue-662-pair-operator-gateway-health-check-69d5305cd33dda68
git rebase origin/main
# Conflict is in tests/OpenClaw.SetupEngine.Tests/SetupStepsTests.cs
# Resolution: keep both ValidateWslLockdown_RetriesWslConfReadAfterStartupTimeout
# AND PairOperatorStep_FailsWhenGatewayNotReachableFromWindows
git add tests/OpenClaw.SetupEngine.Tests/SetupStepsTests.cs
GIT_EDITOR=true git rebase --continue
git push --force-with-lease origin repo-assist/fix-issue-662-pair-operator-gateway-health-check-69d5305cd33dda68I've verified this rebase locally — after resolution, the diff vs
Add this agentic workflows to your repoTo install this agentic workflow, run |
|
Commit pushed:
|
|
Codex review: needs maintainer review before merge. Reviewed June 18, 2026, 5:56 AM ET / 09:56 UTC. Summary Reproducibility: no. high-confidence runtime reproduction was performed in this read-only Linux review environment. Source inspection plus the linked issue logs make the missing operator-side Windows reachability wait source-reproducible. Review metrics: 1 noteworthy metric.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the narrow probe and regression test if maintainers accept the CI signal plus any desired Windows WSL setup smoke, then let #662 close after merge. Do we have a high-confidence way to reproduce the issue? No high-confidence runtime reproduction was performed in this read-only Linux review environment. Source inspection plus the linked issue logs make the missing operator-side Windows reachability wait source-reproducible. Is this the best way to solve the issue? Yes, this is a narrow maintainable fix direction: it mirrors the existing node-side reachability probe and relies on the existing setup retry policy. A live Windows WSL smoke would be the safer final proof for the timing-sensitive case. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 234fa8ff097f. Label changesLabel changes:
Label justifications:
Evidence reviewedWhat 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
|
Add the same Windows-side localhost gateway reachability probe to PairOperatorStep that PairNodeStep already uses before connecting over WebSocket. This lets the setup retry policy absorb WSL port-forwarding propagation lag instead of immediately failing operator pairing. Add a regression test for an unreachable Windows gateway port. Fixes #662 Co-authored-by: Copilot <[email protected]>
f721763 to
960994d
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
960994d to
c320136
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
🤖 This PR was created by Repo Assist, an automated AI assistant.
Closes #662
Root Cause
PairOperatorStep.ExecuteAsync()was missing the Windows-side HTTP gateway health check thatPairNodeStepalready has (line 2086). Both steps attempt WebSocket connections to(localhost/redacted) but onlypair-node` first verified the gateway was reachable from the Windows host.After
StartGatewayStepconfirms the gateway is up (by runningcurlinside WSL to127.0.0.1:{port}), WSL port forwarding may take a few seconds to propagate to the Windows loopback interface.PairOperatorStepimmediately tried the WebSocket connect with no probe, resulting in:SocketException 10061 (Connection refused)— port not yet forwardedFix
Added the same Windows-side probe that
PairNodeStepuses, immediately before the WebSocket connect:The step already has
RetryPolicy Retry => new(MaxAttempts: 3, InitialDelay: TimeSpan.FromSeconds(3)), so if the health check fails on the first attempt the step will retry up to 3 times with increasing delays, giving WSL port forwarding time to propagate before the WebSocket connect.Trade-offs
(localhost/redacted) so it doesn't require a token. Any HTTP response (200, 401, 403) is treated as "reachable" — matchingPairNodeStep`'s pattern.Test Status
Added a new regression test
PairOperatorStep_FailsWhenGatewayNotReachableFromWindowsthat allocates a free TCP port, releases it, and verifies the step returnsStepOutcome.Failedwith a "not reachable" message.Pre-existing failures on Linux CI:
OpenClaw.SetupEngine.Tests: 1 pre-existing failure (Constructor_SetsLocalDataDirFromLocalAppDataRootEnvironment— Windows path separator in Linux test environment)OpenClaw.Shared.Tests: 8 pre-existing failures (Windows sandbox/networking tests)OpenClaw.Tray.Tests: ✅ 1038 passed, 0 failedAdd this agentic workflows to your repo
To install this agentic workflow, run