Skip to content

Setup masks fresh-WSL DNS failures during CLI installation #1256

Closed

Description

@joelagnel

Summary

Setup can misreport a fresh-WSL DNS failure as CLI installed but not found in any known location during the install-cli step.

The installer currently streams curl into bash. When WSL DNS is not ready and curl exits with code 6 (Could not resolve host: openclaw.ai), the shell pipeline takes the final bash process's successful exit code. Setup then probes for the missing CLI and surfaces the misleading location error.

Expected behavior

  • Tolerate a short, transient DNS/network startup delay in a freshly created WSL distro with bounded retries.
  • Download the complete installer before executing it.
  • Preserve curl's nonzero exit code and stderr when download fails.
  • Clean up the temporary installer on both success and failure.

Observed behavior

The failure reproduced twice in one setup run immediately after creating and restarting the managed WSL distro. Both curl attempts reported DNS resolution failure, but each installer command was logged with exit code 0 before CLI path probing failed and setup rolled back.

Activity

  1. added
    clawsweeper:bulk-filed
    clawsweeper:fix-shape-clear
    clawsweeper:no-new-fix-pr
    clawsweeper:source-repro
    impact:ux-friction
    issue-rating: 🦞 diamond lobster
    P1
    clawsweeper:needs-maintainer-review
    and removed
    clawsweeper:fix-shape-clear
    on Aug 28, 2026
  2. clawsweeper commented on Aug 28, 2026

    @clawsweeper

    Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed September 7, 2026, 6:44 PM ET / 22:44 UTC.

    Summary
    Current main and the latest release still contain the failure mechanism. The formally linked repair remains open and includes reported fresh-WSL recovery proof, so this issue remains necessary until that repair lands.

    Reproducibility: yes. source establishes the path: curl fails DNS resolution, Bash receives empty input and succeeds, then CLI probing reports the wrong cause. This review did not execute a current-main WSL reproduction.

    Next step
    Review and land or disposition #1297; its formal linkage and the bulk-filing restriction rule out a competing automated repair.

    Review details

    Best possible solution:

    Setup should complete downloads before execution, retain bounded pipeline-owned retries and precise errors, clean temporary files, and offer visible retry recovery when networking remains unavailable.

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

    Yes, source establishes the path: curl fails DNS resolution, Bash receives empty input and succeeds, then CLI probing reports the wrong cause. This review did not execute a current-main WSL reproduction.

    Is this the best way to solve the issue?

    Yes, the linked repair targets the correct installer owner and reuses existing retry infrastructure while preserving download failures and cleanup; its reported WSL proof directly exercises the failure and recovery.

    AGENTS.md: found and applied where relevant.

    Codex review notes: model internal, reasoning medium; reviewed against 88822d342567.

    Label changes

    Label justifications:

    • P0: Fresh-install onboarding can roll back after DNS failures while presenting a misleading CLI-location error with no demonstrated in-product recovery.
    • impact:ux-release-blocker: The reported first-run failure requires technical diagnosis of WSL networking rather than an actionable setup recovery path.
    Evidence reviewed

    What I checked:

    • Current-main failure mechanism: The installer command still pipes curl directly into Bash. ExecuteAsync checks the pipeline result before probing CLI locations and ultimately returning the misleading missing-location error. (src/OpenClaw.SetupEngine/InstallCliStep.cs:174, 88822d342567)
    • Transport does not preserve failed pipeline stages: RunInWslAsync invokes bash -c without enabling pipefail. A failed curl followed by Bash successfully reading empty input therefore reaches CLI probing with a successful pipeline exit. (src/OpenClaw.SetupEngine/CommandRunner.cs:319, 88822d342567)
    • Existing retries and test coverage: InstallCliStep already allows two attempts with a five-second initial delay, and SetupPipeline delegates retries to RetryExecutor. The current command-builder test explicitly expects the curl-to-Bash pipeline; bounded retry infrastructure alone does not correct error propagation. (tests/OpenClaw.SetupEngine.Tests/SetupStepsTests.cs:1951, 88822d342567)
    • Latest-release inspection: The installer source at v2026.7.1-4 also contains the same curl-to-Bash pipeline and missing-CLI fallback, so the supplied latest release does not resolve this issue. (src/OpenClaw.SetupEngine/InstallCliStep.cs:174, 88822d342567)
    • Canonical open repair and discussion: The supplied closingPullRequests metadata formally links fix(setup): securely bound CLI installer retries #1297 and records it as open and unmerged. Its body and collaborator comments report DNS exit preservation, second-attempt recovery, timeout and partial-download rejection, private temporary storage, and cleanup. fix(setup): retry CLI installer downloads #1258 is closed unmerged and explicitly superseded. (bdcbeb0ae4cc)
    • Feature-history routing: Local history identifies Barbara Kudiess's setup-step extraction and Scott Hanselman's recent WSL command-runner maintenance. Following older moved-source history encountered unavailable objects and a network failure, so no original-introduction attribution is claimed. (src/OpenClaw.SetupEngine/InstallCliStep.cs, b37307cbd51f)

    Likely related people:

    • shanselman: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
    • Barbara Kudiess: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
    How this review workflow works
    • 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.
  3. added 2 commits that reference this issue on Aug 28, 2026
    587513c
    973b482
  4. added
    status: 🚢 actively landing
    on Sep 2, 2026
  5. 7 remaining items

  6. added
    status: 🚢 actively landing
    on Sep 2, 2026
  7. shanselman commented on Sep 2, 2026

    @shanselman
    Collaborator

    Follow-up P2 resolved in #1297 at bdcbeb0a: the exact-command pane is now generated from the production installer command shape, including selected Gateway and official Node versions. Official/custom/invalid cases have deterministic coverage; full local build, Shared (3,873 passed/32 skipped), Tray (2,825 passed), and SetupEngine (1,037 passed) all pass. Current-head hosted checks are pending. No merge performed.

  8. shanselman commented on Sep 2, 2026

    @shanselman
    Collaborator

    Final exact-head status for #1297 at bdcbeb0a: ClawSweeper re-review is clean and marks it ready for maintainer review. Hosted run https://github.com/openclaw/openclaw-windows-node/actions/runs/33676649045 passed setup-connect, network-recovery, revocation-recovery, CodeQL, and repo hygiene. The aggregate test job again failed only the same unrelated 30-second camera/screen capture-consent timeouts; those shared tests were not changed. No merge performed.

  9. removed
    status: 🚢 actively landing
    on Sep 2, 2026
  10. added
    P0
    and removed
    P1
    on Sep 4, 2026
  11. added
    impact:ux-release-blocker
    and removed
    impact:ux-friction
    on Sep 4, 2026
  12. added this to the 9/30 MXC Release milestone on Sep 4, 2026
  13. added
    status: 🚢 actively landing
    on Sep 7, 2026
  14. added a commit that references this issue on Sep 8, 2026
    6d10562
  15. removed
    status: 🚢 actively landing
    on Sep 8, 2026
  16. locked as resolved and limited conversation to collaborators on Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0clawsweeper:bulk-filedclawsweeper:linked-pr-openclawsweeper:no-new-fix-prclawsweeper:source-reproimpact:ux-release-blockerissue-rating: 🦞 diamond lobster

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions