Skip to content

fix(setup): retry fresh WSL root readiness checks - #1107

Merged
bkudiess merged 3 commits into
openclaw:mainfrom
karkarl:karkarl-fix-wsl-verification-flake
Aug 6, 2026
Merged

bkudiess merged 3 commits into
openclaw:mainfrom
karkarl:karkarl-fix-wsl-verification-flake

Conversation

@karkarl

@karkarl karkarl commented Aug 5, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fresh WSL installs can be registered successfully while WSL is still initializing. SetupEngine previously ran the post-install root readiness probe once, so a transient timeout caused setup to unregister a valid distro and fail before E2E scenarios executed.

Observed example:

  • main run 30689734002: WSL2 version discovery succeeded, then the first root probe timed out after 30 seconds and setup rolled back the valid distro.

main now separately includes the 60-second WSL version-discovery fix from #1106. This PR preserves that landed design and addresses the remaining root-probe failure mode.

Change

  • Retry fresh-distro root readiness probes with bounded 30, 60, and 90 second command timeouts.
  • Preserve cancellation propagation and existing cleanup behavior after bounded exhaustion.
  • Add regression coverage for transient root-probe recovery, persistent exhaustion, and the exact timeout schedule.

Validation

  • .\build.ps1: passed after merging current main
  • dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore: 3,382 passed, 32 skipped, 0 failed
  • dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore: 2,053 passed, 0 skipped, 0 failed
  • dotnet test .\tests\OpenClaw.SetupEngine.Tests\OpenClaw.SetupEngine.Tests.csproj --no-restore: 706 passed, 0 skipped, 0 failed
  • Focused merged readiness regression filter: 3 passed, 0 failed

Real behavior proof

  • Current-head regression tests reproduce the first-attempt root-probe timeout and verify the second attempt succeeds without unregistering the distro.
  • Current-head tests prove persistent failures stop after three attempts using the configured 30, 60, and 90 second timeout schedule.
  • The source CI artifact above shows the real WSL root-probe failure mode this change covers.
  • Not verified / blocked: a current-head real fresh-WSL E2E provisioning run was not performed locally. CI provides the merge proof for the live WSL path.

Review

  • Hanselman dual-model adversarial review completed with Claude Opus 4.6 and GPT-5.3-Codex before publication.
  • Both models found no actionable correctness, cancellation, cleanup, or security issue.
  • A post-conflict rubber-duck review confirmed main's version-discovery design remains intact and the root retry remains bounded. Its timeout-sequence test recommendation was applied.

Security Impact

  • New permissions or capabilities: No
  • Credential or token handling changes: No
  • Network surface changes: No
  • Destructive behavior changes: No. Existing cleanup remains gated on bounded verification failure.

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 availability 🚨 Merging this PR could cause crashes, hangs, restart loops, stalls, or process outages. labels Aug 6, 2026
@clawsweeper

clawsweeper Bot commented Aug 6, 2026 •

Copy link
Copy Markdown

Codex review: needs real behavior proof before merge. Reviewed August 5, 2026, 8:56 PM ET / August 6, 2026, 00:56 UTC.

ClawSweeper review

What this changes

The PR retries a newly created WSL distro’s root-readiness command with 30-, 60-, and 90-second bounds and adds regression tests for recovery and exhaustion.

Regression provenance

Possible regression — probable (failure trace; reviewed change). No predecessor PR is attributed.

Merge readiness

⛔ Blocked until real behavior proof is added - 3 items remain

Keep open. Current main still performs one 30-second fresh-distro root probe, while this PR adds a bounded retry repair with focused coverage; however, it lacks the repository-required current-head real fresh-WSL proof.

Priority: P2
Reviewed head: 55d9694193a9a5af3bccf5a668e278ad7c329737

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) The focused patch and test coverage are promising, but missing current-head real behavior proof prevents merge-ready confidence.
Proof confidence 🦪 silver shellfish (2/6) Needs real behavior proof before merge: The PR explicitly lacks current-head real fresh-WSL provisioning proof; unit tests and a pre-fix CI artifact are supplemental only. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Needs proof Needs real behavior proof before merge: The PR explicitly lacks current-head real fresh-WSL provisioning proof; unit tests and a pre-fix CI artifact are supplemental only. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 5 items Current-main behavior: Current main performs one 30-second root verification command and fails immediately when it does not return the readiness marker.
PR implementation and coverage: The PR loops over three bounded probe timeouts and tests both a second-attempt recovery without unregistering and three-attempt exhaustion with the exact schedule.
Cancellation path: The production command runner distinguishes timeout from caller cancellation, kills the child process in both cases, and rethrows caller cancellation.
Findings None None.
Security None None.

How this fits together

The setup engine provisions an app-owned WSL gateway distro and verifies it before later configuration and gateway setup steps run. This root probe determines whether setup continues or removes the newly created distro.

flowchart LR
A[Fresh WSL installation] --> B[WSL version check]
B --> C[Root readiness probe]
C --> D{Probe ready?}
D -->|Yes| E[Continue gateway setup]
D -->|Retry remains| C
D -->|Retries exhausted| F[Clean up distro]
Loading

Before merge

  • Add real behavior proof - Needs real behavior proof before merge: The PR explicitly lacks current-head real fresh-WSL provisioning proof; unit tests and a pre-fix CI artifact are supplemental only. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Resolve merge risk (P1) - A permanently failing root command now delays rollback for up to 180 seconds; the tests cover the bound, but current-head live WSL evidence has not shown the intended transient-recovery outcome or actual cleanup behavior.
  • Complete next step (P2) - The remaining action is contributor-supplied current-head real WSL proof, which cannot be established by an automated repair.
Agent review details

Security

None.

Review metrics

Metric Value Why it matters
Patch size production +34/-7, tests +86 The implementation is limited to one setup verification path and has substantially more focused regression coverage than production growth.

Merge-risk options

Maintainer options:

  1. Require live recovery proof (recommended)
    Run current-head setup on a real fresh WSL host and attach redacted output showing retry recovery without distro rollback before merge.
  2. Accept test-only evidence
    Merge with the stated unit coverage despite the absence of a current-head real WSL recovery run.

Technical review

Best possible solution:

Attach redacted current-head fresh-WSL runtime evidence that a root-readiness retry recovers without unregistering the valid distro, then merge the focused repair.

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

Yes in source: current main immediately rolls back after one failed root probe, and the PR’s regression tests model a first-attempt timeout followed by recovery. A current-head live fresh-WSL reproduction has not been supplied.

Is this the best way to solve the issue?

Yes, conditionally: bounded retries in the existing verification owner are a narrow maintainable repair, but a real WSL run must confirm the intended recovery before merge.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: The issue can falsely roll back fresh WSL setup on slower hosts, but the evidence does not establish an emergency outage.
  • merge-risk: 🚨 availability: The changed retry loop controls whether setup recovers, waits longer, or rolls back a new WSL distro.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The PR explicitly lacks current-head real fresh-WSL provisioning proof; unit tests and a pre-fix CI artifact are supplemental only. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

What I checked:

  • Current-main behavior: Current main performs one 30-second root verification command and fails immediately when it does not return the readiness marker. (src/OpenClaw.SetupEngine/SetupSteps.cs:848, ad472243bcb8)
  • PR implementation and coverage: The PR loops over three bounded probe timeouts and tests both a second-attempt recovery without unregistering and three-attempt exhaustion with the exact schedule. (tests/OpenClaw.SetupEngine.Tests/SetupStepsTests.cs:1033, 55d9694193a9)
  • Cancellation path: The production command runner distinguishes timeout from caller cancellation, kills the child process in both cases, and rethrows caller cancellation. (src/OpenClaw.SetupEngine/CommandRunner.cs:112, ad472243bcb8)
  • Related setup provenance: Recent history attributes the adjacent one-minute version-discovery allowance to Barbara Kudiess in the same setup step; the merged change is on current main but does not add root-probe retries. (src/OpenClaw.SetupEngine/SetupSteps.cs:743, e9d571a9b395)
  • Real behavior proof gap: The PR body explicitly states that no current-head fresh-WSL provisioning run was performed; tests and the linked pre-fix CI artifact are supplemental evidence only.

Likely related people:

  • bkudiess: Authored the immediately adjacent WSL version-readiness change in this same setup step, merged as PR 1106. (role: recent area contributor; confidence: high; commits: e9d571a9b395; files: src/OpenClaw.SetupEngine/SetupSteps.cs, tests/OpenClaw.SetupEngine.Tests/SetupStepsTests.cs)
  • Caleb Eden: Introduced the app-owned WSL installation and cleanup hardening that this retry path preserves. (role: app-owned WSL setup contributor; confidence: medium; commits: d0fca93d5f61; files: src/OpenClaw.SetupEngine/SetupSteps.cs)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Attach redacted terminal or runtime-artifact evidence from a current-head fresh WSL provisioning run that demonstrates retry recovery without rollback.

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.

History

Review history (2 earlier review cycles)
  • reviewed 2026-08-06T00:01:12.784Z sha 4f6f90b :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-06T00:44:19.357Z sha 8acbfcc :: needs real behavior proof before merge. :: none

@karkarl karkarl changed the title fix(setup): retry fresh WSL readiness checks fix(setup): retry fresh WSL root readiness checks Aug 6, 2026
@bkudiess
bkudiess merged commit 2eab151 into openclaw:main Aug 6, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 availability 🚨 Merging this PR could cause crashes, hangs, restart loops, stalls, or process outages. P2 Normal priority bug or improvement with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants