Repository navigation
Conversation
Fix 7 bugs found during setup testing on slow ARM64 machines with WSL2 mirrored networking, plus a full audit of hardcoded config values. Critical fixes: - WebSocket default URL used localhost which resolves to IPv6; WSL2 mirrored networking only forwards IPv4. Changed to 127.0.0.1. - PairNodeStep health check also used localhost (same IPv6 issue). High-priority fixes: - WaitForConnectionOrPairing resolved immediately on first Error or Disconnected, killing connections before WebSocket auto-reconnect could retry. Now only resolves on Connected or PairingRequired; timeout catches unreachable gateways. - StartGatewayStep only checked health from inside WSL, not from Windows. Added WaitForWindowsPortReachable() to poll from Windows side after WSL health check passes. Medium fixes: - Hardcoded 15s/20s pairing timeouts too short for slow machines. Replaced with configurable Pairing.TimeoutSeconds (default 60s). Low-priority fixes: - Port conflict detection missed node gateway processes (matched only openclaw, but gateway runs as node). - Added rollback confirmation dialog in UI mode (keep state for debugging vs rollback). Bonus fix: - TryRevokeOperatorTokenAsync used hardcoded ws://localhost:18789 fallback instead of configured EffectiveGatewayUrl. Config audit: - Replaced CommandTimeoutMultiplier (1 multiplier x 48 individual values) with 2-tier model: CommandTimeoutSeconds (60s) for standard WSL commands, InstallTimeoutSeconds (600s) for downloads/installs. - Extracted WindowsPortTimeoutSeconds, StabilizationDelaySeconds, WizardConfig (RequestTimeoutSeconds, AuthStepTimeoutSeconds), RollbackTimeoutSeconds into default-config.json. Review fixes (Hanselman dual-model review): - DispatcherQueue.TryEnqueue return value now checked to prevent deadlock if dispatcher shuts down during rollback confirmation. - Dialog dismiss (ESC/close) now defaults to rollback (safer). - Added RunContinuationsAsynchronously to TCS. Co-authored-by: Copilot <[email protected]>
|
Codex review: needs real behavior proof before merge. Reviewed May 26, 2026, 7:40 PM ET / 23:40 UTC. Summary Reproducibility: no. high-confidence runtime reproduction was performed for the target slow ARM64 WSL2 machine. Source inspection does confirm the current-main localhost default and immediate Error handling paths the PR is trying to change. Review metrics: 1 noteworthy metric.
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: Risk before merge
Maintainer options:
Next step before merge Security Review findings
Review detailsBest possible solution: Land the slow-machine setup fixes after narrowing the port-owner check, preserving prompt terminal auth failure handling, and adding redacted target-environment proof for both fresh setup and the changed default URL path. Do we have a high-confidence way to reproduce the issue? No high-confidence runtime reproduction was performed for the target slow ARM64 WSL2 machine. Source inspection does confirm the current-main localhost default and immediate Error handling paths the PR is trying to change. Is this the best way to solve the issue? No, not yet: the direction is plausible, but the current implementation should narrow the node port exemption, preserve prompt terminal auth failures, and include real target-machine proof before merge. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 4133ae1c7065. Label changesLabel 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
|
|
ClawSweeper PR egg 🎁 Pass real behavior proof to wake the egg and unlock a hatchable treat. Where did the egg go?
|
Update SetupEngine and E2E assertions to match intentional setup default host change from localhost to 127.0.0.1. Fixes CI failures in: - OpenClaw.SetupEngine.Tests (EffectiveGatewayUrl_UsesPort, GatewayUrl_DefaultsFromConfig) - OpenClaw.E2ETests (gateway URL and dashboard URL host assertions) Co-authored-by: Copilot <[email protected]>
Wait for Windows-side gateway reachability before replaying wizard steps after restart-like disconnects, and use a reconnect timeout bounded by pairing and gateway health settings. Co-authored-by: Copilot <[email protected]>
Setup Engine: Slow-Machine Fixes & Config Audit
Summary
Fixes 7 bugs found during setup testing on slow ARM64 machines with WSL2 mirrored networking. Also includes a full audit of hardcoded config values, extracting them into
default-config.jsonfor configurability, and fixes from a dual-model adversarial code review.🔴 Critical Fixes (2)
1. WebSocket default URL uses
localhost→ IPv6 resolution failureSetupContext.EffectiveGatewayUrldefaulted tows://localhost:{port}. .NET resolveslocalhostto IPv6[::1]first, but WSL2 mirrored networking only forwards IPv4 (127.0.0.1). Health checks using127.0.0.1passed, but WebSocket connections tolocalhostgot "connection refused" for 3m40s across all retries.localhostto127.0.0.1.2.
PairNodeStephealth check also usedlocalhost(IPv6)PairNodeStep's pre-connect gateway health check.http://127.0.0.1:{port}.🟠 High-Priority Fixes (2)
3.
WaitForConnectionOrPairingresolves immediately on first Error/DisconnectedTaskCompletionSourceon the firstErroror non-pairingDisconnectedevent, killing the connection before the WebSocket client's built-in auto-reconnect could retry. On slow machines with WSL2 port-forwarding lag, pairing always failed after ~40s.Error/Disconnected. Only resolve onConnectedorPairingRequired. Timeout catches genuinely unreachable gateways.4.
StartGatewaySteponly checked health from inside WSL, not from WindowsWaitForWindowsPortReachable()— pollshttp://127.0.0.1:{port}from the Windows side after the WSL health check passes.🟡 Medium Fix (1)
5. Hardcoded 15s/20s pairing timeouts too short for slow machines
Pairing.TimeoutSeconds(default 60s) for configurability.🟢 Low-Priority Fixes (2)
6. Port conflict detection missed "node" gateway processes
node … openclaw … gateway. If the process name appeared as "node", it would falsely report a port conflict.7. No way to disable rollback for debugging setup failures
🔧 Bonus Fix
TryRevokeOperatorTokenAsyncused hardcodedws://localhost:18789EffectiveGatewayUrl.📋 Config Audit
Replaced
CommandTimeoutMultiplier(1 multiplier × 48 individual timeout values) with a simpler 2-tier model:CommandTimeoutSecondsInstallTimeoutSecondsWindowsPortTimeoutSecondsStabilizationDelaySecondsRollbackTimeoutSecondsWizard.RequestTimeoutSecondsWizard.AuthStepTimeoutSecondsAll timeouts are "kill if hung" safety nets — fast machines finish instantly; raising timeouts has zero cost on fast machines.
🔍 Adversarial Code Review Fixes
Dual-model review (Claude Opus + GPT Codex) found and fixed:
TryEnqueuedeadlock — ifDispatcherQueueis shut down (window closed),TaskCompletionSourcewas never completed, deadlocking the pipeline. Now checks return value and defaults to rollback.Files Changed (6)
src/OpenClaw.SetupEngine.UI/Pages/ProgressPage.xaml.cs— Rollback confirmation dialogsrc/OpenClaw.SetupEngine/SetupContext.cs— Config classes, timeout helperssrc/OpenClaw.SetupEngine/SetupPipeline.cs— Rollback confirmation callbacksrc/OpenClaw.SetupEngine/SetupSteps.cs— All 7 bug fixes + timeout extractionsrc/OpenClaw.SetupEngine/SetupWizardRunner.cs— Wizard timeout extractionsrc/OpenClaw.SetupEngine/default-config.json— All new config entries with comments