Skip to content

feat(desktop): dual-path WSL install from the storage bundle - #202

Merged
quickbeard merged 2 commits into
mainfrom
wsl-installer-urls
Aug 12, 2026
Merged

quickbeard merged 2 commits into
mainfrom
wsl-installer-urls

Conversation

@quickbeard

@quickbeard quickbeard commented Aug 12, 2026 •

Copy link
Copy Markdown
Owner

Implements the dual-path WSL installer (the last Phase 3 item besides desktop wiring), consuming the storage bundle at installers/wsl.zip (verified live: HTTP 200, 643,155,865 bytes).

Constants (@codev/sandbox const.ts, fork-only)

  • WSL_INSTALLER_ZIP_URL — ${INSTALLERS_BASE_URL}/wsl.zip, the single artifact a corporate whitelist rule has to cover
  • WSL_INSTALLER_MSI_NAME — wsl.2.7.11.0.x64.msi (pinned runtime; version rides in the filename)
  • WSL_DISTRO_IMAGE_NAME — ubuntu-24.04.4-wsl-amd64.wsl (distro image for the WSL servers feature; the sandbox rootfs still ships via the image manifest)

Install flow (packages/desktop/src/main/wsl/install-bundle.ts, fork-only)

  • Install WSL: download the zip (6h timeout — observed corporate links run at ~35 KB/s), extract members by exact name (zip.js, streamed to disk, testable off Windows), delete the zip, then run one elevated PowerShell script: offline dism /enable-feature VirtualMachinePlatform + msiexec /qn — a single UAC prompt for both steps, with 3010 (reboot required) treated as success and picked up by the existing pending-restart handling.
  • Install distro: Ubuntu-24.04 imports the bundled image via wsl --install --from-file --no-launch; other names keep the --web-download path.
  • Fallback policy: the Microsoft-facing wsl --install paths run only when the bundle cannot be obtained (download/extract failure, non-x64 machine). A completed-but-failed elevated install returns as-is — no second UAC prompt for the same failure.

Upstream edits (DIVERGENCES row added)

  • wsl/runtime.ts: three internals gain export (runPowerShell, runInteractiveCommand, resolveSystem32Command); no behavior change
  • wsl/servers.ts: the install-wsl / install-distro jobs call the dual-path functions; same WslCommandResult shape, so job/error handling is untouched

CHANGELOG entry added under Unreleased.

Testing

  • 4 new tests in install-bundle.test.ts: download+extract+cache behavior against an in-memory zip, missing-member failure, elevated-script quoting + 3010 tolerance, bundled-distro name matching
  • Desktop suite: 71 pass / 0 fail; full-repo typecheck green
  • Not yet verified on real hardware — needs a Windows machine without WSL to exercise the elevated dism+msiexec path end to end

🤖 Generated with Claude Code

quickbeard and others added 2 commits August 12, 2026 18:26
The storage bucket now hosts the hand-uploaded wsl.zip (verified live,
643MB): the pinned WSL runtime MSI plus the Ubuntu 24.04 distro image
for the WSL servers feature. One zip means a corporate whitelist rule
covers a single URL; the member names are constants because the install
flow extracts them by exact name.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Install WSL and Install Ubuntu-24.04 now prefer the pinned wsl.zip from
the codev storage host: download, extract members by exact name (zip.js,
streamed, testable off Windows), enable VirtualMachinePlatform via
offline dism and run the MSI quietly behind a single UAC prompt, or
import the bundled distro image with --from-file. The original
Microsoft-facing wsl --install paths remain as fallback, taken only
when the bundle cannot be obtained — a completed-but-failed elevated
install is never retried behind a second UAC prompt.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@quickbeard quickbeard changed the title feat(sandbox): pin the WSL installer bundle URL feat(desktop): dual-path WSL install from the storage bundle Aug 12, 2026
@quickbeard
quickbeard merged commit 53d51fc into main Aug 12, 2026
0 of 5 checks passed
@quickbeard
quickbeard deleted the wsl-installer-urls branch August 12, 2026 11:51
Sign up for free to 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.

1 participant