Skip to content

feat(install): WSL2-aware probe + audit + docs (#1179) - #498

Merged
aptracebloc merged 1 commit into
developfrom
feat/lpi-wsl
Jul 30, 2026
Merged

feat(install): WSL2-aware probe + audit + docs (#1179)#498
aptracebloc merged 1 commit into
developfrom
feat/lpi-wsl

Conversation

@aptracebloc

@aptraceblocaptracebloc commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

#1179 — Windows / WSL2

The last child of epic #1168 (RFC 0001). Key insight from the issue: inside WSL2 the environment is Linux, so the existing Linux tiers apply unchanged — there's no separate Windows code path here (the native-Windows Docker-Desktop path already lives in install.ps1/install-k8s.ps1). This makes the Linux installer WSL-aware + documents the WSL2 route.

What's in

  • _probe_wsl (probe.sh) — detects WSL2 via WSL_DISTRO_NAME/WSL_INTEROP or microsoft/WSL in the kernel release (paths overridable for tests). Read-only, never-fatal. Sets PROBE_WSL in run_host_probes (Linux-only).
  • Audit (render_host_audit) — a WSL2 "Environment" row surfacing the rootless-preferred stance. Classification is unchanged: a usable Docker (incl. Docker Desktop's WSL integration if present) → Tier 0; otherwise Tier 1 rootless — which is "prefer rootless, use Docker Desktop only if already there" (issue bullet 2). The unsupported-os Tier-2 message now points Windows/Git-Bash users at running the installer inside WSL2 (rootless, no Docker Desktop licence) as the preferred path.
  • Docs (docs/INSTALL.md) — WSL2 quick-start note: enabling WSL2 = the one-time Windows admin step (the Windows Tier-2 equivalent), + the rootless-over-Docker-Desktop preference with the licensing rationale (AC Develop #2).
  • 8 probe.bats tests (detection env/osrelease/clean, run_host_probes wiring, audit row present/absent, the Windows→WSL2 message); shellcheck --severity=error clean; scripts/manifest.sha256 regenerated (R8).

Host-gated (noted, not in this PR)

AC #1's literal end-to-end run of install.sh inside a real WSL2 Ubuntu needs a Windows+WSL2 host — same class as the spike's §5 gate. The probe/audit/messaging is unit-tested here; the live WSL2 install is hardware-gated.

If a separate docs-site repo (deploys from main) also carries the install guide, the WSL2 note should be mirrored there — out of scope for this client PR.

This closes the epic's last buildable child; remaining epic work is the host-gated Tier-1 tails (#1354, #1363).

🤖 Generated with Claude Code


Note

Low Risk
Read-only probing and audit/doc copy only; no install routing or tier logic changes beyond user-facing messages.

Overview
WSL2 is detected for clearer installer messaging only — install tier classification is unchanged; Linux tiers still apply inside WSL.

probe.sh adds _probe_wsl (env vars WSL_DISTRO_NAME / WSL_INTEROP or microsoft/WSL in kernel release, with overridable paths for tests) and sets PROBE_WSL during Linux run_host_probes. The host audit shows an Environment row when WSL2 is detected (rootless preferred over Docker Desktop) and expands the Tier 2 unsupported-os text for Git Bash/Windows to recommend WSL2 + the Linux curl installer ahead of install.ps1.

docs/INSTALL.md documents the WSL2 quick-install path (licensing rationale, wsl --install, run the macOS/Linux command inside the distro). probe.bats gains eight tests for detection, probe wiring, and audit output; scripts/manifest.sha256 is updated for probe.sh.

Reviewed by Cursor Bugbot for commit 2d560a1. Bugbot is set up for automated code reviews on this repo. Configure here.

@aptraceblocaptracebloc self-assigned this Jul 30, 2026
Inside WSL2 the environment IS Linux, so the existing Linux tiers apply unchanged — no
separate Windows code path. Make the installer WSL-aware:
- probe.sh: _probe_wsl (WSL_DISTRO_NAME/WSL_INTEROP env, or microsoft/WSL in the kernel
release; paths overridable for tests) + PROBE_WSL in run_host_probes (Linux-only,
read-only, never-fatal). Classification is UNCHANGED — a usable Docker (incl. Docker
Desktop's WSL integration, if present) is Tier 0, else Tier 1 rootless.
- render_host_audit: a WSL2 "Environment" row surfacing the rootless-preferred stance;
the Tier-2 unsupported-os message now points Windows users at WSL2 (rootless) as the
preferred path over Docker Desktop.
- docs/INSTALL.md: WSL2 quick-start note — enabling WSL2 as the one-time Windows admin
step + the rootless-over-Docker-Desktop preference with the licensing rationale.
- 8 probe.bats tests; shellcheck clean; manifest regenerated (R8).
End-to-end verification inside a real WSL2 Ubuntu is host-gated (needs a Windows host);
the probe/audit/messaging is unit-tested here.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@aptracebloc
aptracebloc merged commit 80bee57 into developJul 30, 2026
59 of 60 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@aptracebloc@saadqbal@LukasWodka@divyasinghds