Skip to content

Harden WSL project setup, export handling, and CI - #3

Merged
Frank-Reichenbach merged 1 commit into
masterfrom
fix/project-name-validation-rootfs-checksum
Apr 20, 2026
Merged

Frank-Reichenbach merged 1 commit into
masterfrom
fix/project-name-validation-rootfs-checksum

Conversation

@Frank-Reichenbach

@Frank-Reichenbach Frank-Reichenbach commented Apr 20, 2026 •

Copy link
Copy Markdown
Owner

Summary

Compared with master, this branch makes the WSL setup flow safer and more predictable.

  • new-project.ps1 now validates project names earlier and cleans up the imported distro, project directory, and Windows WSL artifacts if wsl --import fails.
  • build-base.ps1 now checks whether the local WSL supports wsl --export --format, only creates real .tar.gz exports when that is supported, and keeps the previous base image until the new export succeeds.
  • WSL output normalization and distro listing now live in scripts/WslHelpers.ps1, and the integration suite now uses the shared helper too.
  • Rootfs checksum parsing is stricter, so we match the exact published rootfs entry.
  • Docs, bootstrap behavior, tests, and the Windows CI workflow were updated to match the new behavior.

Why It Matters

  • failed project creation no longer leaves behind partial WSL state
  • unsupported .tar.gz exports fail fast with a clear fallback path
  • base image export is safer because a failed export does not clobber the previous archive
  • tests and docs now describe the same behavior users will actually get

Testing

Local

  • bats tests/static/shellcheck.bats
  • bats tests/validation/
  • bats tests/unit/install-sh.bats
  • Invoke-Pester tests/static/ -CI
  • Invoke-Pester tests/unit/ -CI
  • Invoke-Pester tests/integration/ -CI -Output Detailed

CI

  • Lint & Test (Linux)
  • Lint & Test (Windows)
  • Integration (Windows + WSL)

@Frank-Reichenbach Frank-Reichenbach changed the title Tighten project validation and rootfs handling Harden project setup cleanup and docs Apr 20, 2026
@Frank-Reichenbach
Frank-Reichenbach force-pushed the fix/project-name-validation-rootfs-checksum branch from b5efaad to bff0846 Compare April 20, 2026 10:55
@Frank-Reichenbach Frank-Reichenbach changed the title Harden project setup cleanup and docs Harden WSL project setup and base image export handling Apr 20, 2026
@Frank-Reichenbach
Frank-Reichenbach force-pushed the fix/project-name-validation-rootfs-checksum branch from bff0846 to b0e2b8a Compare April 20, 2026 11:07
@Frank-Reichenbach Frank-Reichenbach changed the title Harden WSL project setup and base image export handling Harden WSL project setup, export handling, and CI Apr 20, 2026
@Frank-Reichenbach
Frank-Reichenbach force-pushed the fix/project-name-validation-rootfs-checksum branch 4 times, most recently from a55e7aa to 09b0846 Compare April 20, 2026 14:01
- validate project names earlier and clean up WSL and Windows artifacts when imports fail
- probe WSL export-format support, create real gzip exports, and replace base images safely
- tighten rootfs checksum parsing, extract shared WSL helpers, and align the integration test with Get-WslDistroName
- update docs, bootstrap behavior, tests, and CI to match the current workflow
@Frank-Reichenbach
Frank-Reichenbach force-pushed the fix/project-name-validation-rootfs-checksum branch from 09b0846 to 2e5c568 Compare April 20, 2026 14:58
@Frank-Reichenbach
Frank-Reichenbach merged commit ece7578 into master Apr 20, 2026
3 checks passed
@Frank-Reichenbach
Frank-Reichenbach deleted the fix/project-name-validation-rootfs-checksum branch April 20, 2026 15:25
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