Skip to content

fix(setup): avoid false failure while WSL is still starting - #1106

Merged
bkudiess merged 1 commit into
openclaw:mainfrom
bkudiess:bkudiess-fix-e2e-pipeline-failures
Aug 5, 2026
Merged

fix(setup): avoid false failure while WSL is still starting#1106
bkudiess merged 1 commit into
openclaw:mainfrom
bkudiess:bkudiess-fix-e2e-pipeline-failures

Conversation

@bkudiess

@bkudiess bkudiess commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes an issue where fresh gateway setup could fail and roll back after WSL installation when the WSL service took more than 15 seconds to report the new distro version. This intermittently failed unrelated pull requests in the revocation-recovery E2E shard.

Why This Change Was Made

The failing run showed wsl.exe --install completing successfully and wsl.exe --list --quiet finding the new distro, followed by wsl.exe --list --verbose timing out at 15.013 seconds. The post-install version verification now allows up to one minute for WSL to settle. Other WSL command timeouts and setup behavior are unchanged.

User Impact

Gateway setup is less likely to report a false failure and remove a valid newly installed distro on slower Windows hosts or hosted runners.

Evidence

  • Failing hosted artifact: fresh WSL installation completed, then version discovery timed out at exactly 15 seconds and setup rolled back the distro.
  • Regression coverage asserts that post-install version verification receives the one-minute settling allowance.
  • The exact real-gateway revocation-recovery E2E test passed from commit cb329a76.
  • Focused code review found no significant issues.

Change Type

  • Bug fix
  • Feature
  • Refactor
  • Docs or instructions
  • Tests or validation
  • Security hardening
  • Chore or infrastructure

Scope

  • Tray or WinUI UX
  • Windows node capability
  • Local MCP or winnode
  • Gateway, connection, or pairing
  • Setup or onboarding
  • Permissions, privacy, or security
  • Tests, CI, or docs

Validation

  • ./build.ps1: passed
  • dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj: 3,399 passed, 32 skipped
  • dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj: 2,053 passed
  • dotnet test ./tests/OpenClaw.SetupEngine.Tests/OpenClaw.SetupEngine.Tests.csproj: 704 passed
  • dotnet build ./tests/OpenClaw.E2ETests/OpenClaw.E2ETests.csproj -c Debug -r win-x64: passed
  • dotnet test ./tests/OpenClaw.E2ETests/OpenClaw.E2ETests.csproj --no-build -c Debug -r win-x64 --filter "FullyQualifiedName~OpenClaw.E2ETests.Setup.RevocationAndRecoveryTests": 1 passed

The fresh worktree initially lacked NuGet assets for --no-restore test invocations. The test projects were rerun with restore and executed the non-zero counts above.

Real Behavior Proof

  • Environment tested: Windows 11, WSL2, isolated E2E distro, real published gateway
  • PR head or commit tested: cb329a76
  • Exact steps or command run: built OpenClaw.E2ETests, set OPENCLAW_RUN_E2E=1, then ran FullyQualifiedName~OpenClaw.E2ETests.Setup.RevocationAndRecoveryTests
  • Evidence after fix: RealGateway_DeviceRemoval_RecoversThroughSharedTokenReconnect passed
  • Observed result: 1 test executed, 1 passed, 0 failed in approximately 4.76 minutes
  • Screenshot or artifact links verified? (Yes/No/N/A): N/A
  • Not verified or blocked: none

Security Impact

  • New permissions or capabilities? (Yes/No): No
  • Secrets or tokens handling changed? (Yes/No): No
  • New or changed network calls? (Yes/No): No
  • Command or tool execution surface changed? (Yes/No): No
  • Data access scope changed? (Yes/No): No
  • If any answer is Yes, explain the risk and mitigation: N/A

Compatibility and Migration

  • Backward compatible? (Yes/No): Yes
  • Config or environment changes? (Yes/No): No
  • Migration needed? (Yes/No): No
  • If yes, list the exact upgrade steps: N/A

Review Conversations

  • I replied to or resolved every bot review conversation addressed by this PR.
  • I left unresolved only conversations that still need maintainer judgment.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal priority bug or improvement with limited blast radius. labels Aug 5, 2026
@clawsweeper

clawsweeper Bot commented Aug 5, 2026

Copy link
Copy Markdown

Codex review: needs maintainer review before merge. Reviewed August 5, 2026, 6:47 PM ET / 22:47 UTC.

ClawSweeper review

What this changes

The PR gives post-install WSL2 version verification up to one minute to settle and adds regression coverage that asserts this timeout.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep open. The focused patch correctly raises only fresh-install WSL version verification from 15 seconds to one minute, but the submitted E2E summary does not directly demonstrate a delayed 15-to-60-second version query recovering on the PR head; direct current-head proof is still needed before merge.

Priority: P2
Reviewed head: cb329a7689e6bff202154846eda51b494500b078

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) PR readiness rating was derived from proof quality, review findings, security review, and reviewer confidence.
Proof confidence 🌊 off-meta tidepool Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.
Evidence reviewed 5 items Current-main behavior: Current main gives the post-install wsl.exe --list --verbose verification a 15-second timeout, so a slow but registered distribution follows the failure and rollback path.
Focused patch: The PR changes only this post-install verification call to a one-minute constant; initial discovery, installation, and readiness-probe timeouts remain unchanged.
Regression coverage: The added focused test executes the fresh-install path and asserts that the verbose version query receives the one-minute timeout.
Findings None None.
Security None None.

How this fits together

The setup engine creates an app-owned WSL distribution for a local gateway, then validates it before provisioning continues. A failed validation triggers cleanup, so this timeout determines whether a slow but valid WSL installation proceeds or rolls back.

flowchart LR
  Setup[Gateway setup] --> Install[Install WSL distribution]
  Install --> Discover[Discover distribution]
  Discover --> Verify[Verify WSL2 version]
  Verify -->|verified| Provision[Provision gateway]
  Verify -->|timeout or invalid| Rollback[Rollback setup]
Loading

Before merge

  • Resolve merge risk (P1) - The PR body reports a successful real setup run but supplies no current-head trace or artifact showing wsl.exe --list --verbose taking longer than 15 seconds and completing before one minute, so the claimed recovery remains unproven.
  • Complete next step (P2) - The remaining merge blocker is contributor-provided real behavior proof, not a mechanical repair ClawSweeper can safely perform.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Production and test delta production +7, tests +33 across 2 files The production change is narrowly limited to one timeout boundary and is accompanied by focused regression coverage.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Attach redacted current-head Windows setup evidence showing the post-install version query completes after the former 15-second limit and the setup proceeds without rollback.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Attach redacted current-head Windows setup evidence showing the post-install version query completes after the former 15-second limit and the setup proceeds without rollback.

Do we have a high-confidence way to reproduce the issue?

Yes, source-reproducible. Current main passes a 15-second timeout to the fresh distro's verbose version query, and the command runner kills a process when that timeout expires; a host taking longer follows the verification failure path.

Is this the best way to solve the issue?

Yes. The one-minute allowance is narrowly scoped to post-install version verification, preserves the remaining command timeouts, and has focused coverage for the intended boundary.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against d2de6150753b.

Labels

Label changes:

  • add P2: This is a bounded fresh-setup reliability fix that can otherwise roll back a valid local gateway installation.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🌊 off-meta tidepool and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.

Label justifications:

  • P2: This is a bounded fresh-setup reliability fix that can otherwise roll back a valid local gateway installation.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🌊 off-meta tidepool and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Real behavior proof is not required for maintainer- or bot-authored pull requests.

Evidence

What I checked:

Likely related people:

  • Caleb Eden: Commit d0fca93 records the app-owned WSL setup work that owns the version-verification path. (role: introduced fresh WSL install flow; confidence: high; commits: d0fca93d5f61; files: src/OpenClaw.SetupEngine/SetupSteps.cs)
  • bkudiess: Recent current-main history for the setup files includes bkudiess commits, in addition to this proposed focused repair. (role: recent area contributor; confidence: medium; commits: bc210e048aa9, c04c5fb06238; files: src/OpenClaw.SetupEngine/SetupSteps.cs, tests/OpenClaw.SetupEngine.Tests/SetupStepsTests.cs)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@bkudiess
bkudiess merged commit e9d571a into openclaw:main Aug 5, 2026
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal priority bug or improvement with limited blast radius. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant