Repository navigation
feat(windows): add verified CLI installer with recoverable upgrades #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
fea4959
aa12ba4
2ab4218
d40ef39
ef91fbf
55624bb
6202c61
5c3cf20
af6e9e2
08129b5
e5d1e41
b1d0424
6025759
9495672
1544f30
5a56c54
bfac24a
c7db95e
107c4da
9a007f2
efa6fed
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,134 @@ | ||
| name: Windows installer tests | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths: | ||
| - 'install.ps1' | ||
| - 'scripts/test_install*windows.ps1' | ||
|
Comment on lines
+4
to
+7
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Warning · Release-only PRs skip the Windows installer matrix The installer workflow’s PR path filter omits PRs changing only release packaging skip installer tests on both PowerShell editions; regular CI checks its own archive instead. Add DetailsThe matrix uses fixtures and pinned official releases. Widening the trigger runs that suite, but does not validate the PR’s release archive or manifest end to end. |
||
| - 'scripts/generate_windows_installer_fixtures.py' | ||
| - 'scripts/check_windows_release_archive.ps1' | ||
| - 'scripts/archive.py' | ||
| - 'Cargo.toml' | ||
| - 'Cargo.lock' | ||
| - 'src/**' | ||
| - '.github/workflows/ci.yml' | ||
| - '.github/workflows/release.yml' | ||
| - '.github/workflows/windows-installer.yml' | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| syntax-preflight: | ||
| name: Installer syntax (${{ matrix.engine }}) | ||
| runs-on: windows-2025 | ||
| timeout-minutes: 10 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| engine: ['powershell.exe', 'pwsh.exe'] | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| persist-credentials: false | ||
| - name: Parse Windows installer and test scripts | ||
| shell: pwsh | ||
| env: | ||
| TEST_ENGINE: ${{ matrix.engine }} | ||
| run: | | ||
| & $env:TEST_ENGINE -NoProfile -NonInteractive -File scripts/test_install_syntax_windows.ps1 | ||
| if ($LASTEXITCODE -ne 0) { throw "Installer syntax preflight failed: $env:TEST_ENGINE" } | ||
|
|
||
| offline-validation: | ||
| needs: syntax-preflight | ||
| name: Installer offline tests (${{ matrix.engine }}) | ||
| runs-on: windows-2025 | ||
| timeout-minutes: 20 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| engine: ['powershell.exe', 'pwsh.exe'] | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Check fixture generator | ||
| shell: pwsh | ||
| run: | | ||
| python -m py_compile scripts/generate_windows_installer_fixtures.py | ||
| if ($LASTEXITCODE -ne 0) { throw 'Fixture generator did not compile.' } | ||
|
|
||
| - name: Run validator and recovery fixtures | ||
| shell: pwsh | ||
| env: | ||
| TEST_ENGINE: ${{ matrix.engine }} | ||
|
Comment on lines
+63
to
+66
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Warning · Windows CI skips real upgrades and forced-termination recovery Both Both jobs can pass even if the installer rejects an official executable or fails recovery after a forced stop that the offline fixtures do not reproduce. Run both real integration suites in a separate Windows CI job for both There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Still present in this version: Proofline found the issue again. Proofline's finding in this version: Windows installer CI misses incompatible release archives. View review
Comment on lines
+63
to
+66
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Warning · Installer integration jobs run despite syntax validation failures Only A syntax error in the interruption test can still let the upgrade job install two releases before encountering the error. The workflow still fails. Make both integration jobs depend on a dedicated syntax job that checks both |
||
| run: | | ||
| foreach ($script in @( | ||
| 'scripts/test_install_syntax_windows.ps1', | ||
| 'scripts/test_install_windows.ps1', | ||
| 'scripts/test_install_upgrade_windows.ps1', | ||
| 'scripts/test_install_concurrency_windows.ps1' | ||
| )) { | ||
| Write-Host "Running $script with $env:TEST_ENGINE" | ||
| & $env:TEST_ENGINE -NoProfile -NonInteractive -File $script | ||
| if ($LASTEXITCODE -ne 0) { throw "$script failed with exit code $LASTEXITCODE" } | ||
| } | ||
|
|
||
|
|
||
| real-release-integration: | ||
| needs: syntax-preflight | ||
| name: Real Windows install and interruption recovery (${{ matrix.engine }}) | ||
| runs-on: windows-2025 | ||
| # Up to 24 forced-termination workers x 90 seconds plus real upgrades, | ||
| # download/setup time, and test-runner overhead can exceed 30 minutes. | ||
| timeout-minutes: 60 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| engine: ['powershell.exe', 'pwsh.exe'] | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Install and upgrade pinned official releases | ||
| shell: pwsh | ||
| env: | ||
| TEST_ENGINE: ${{ matrix.engine }} | ||
|
Comment on lines
+96
to
+99
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Warning · Interruption CI misses repair before downloads The interruption harness calls CI can pass even though rerunning the installer during a download failure leaves the interrupted upgrade unrepaired. Rerun |
||
| run: | | ||
| & $env:TEST_ENGINE -NoProfile -NonInteractive -File scripts/test_install_upgrade_real_windows.ps1 | ||
| if ($LASTEXITCODE -ne 0) { throw "Real Windows upgrade test failed: $LASTEXITCODE" } | ||
|
|
||
| - name: Recover from twelve real process-termination checkpoints | ||
| shell: pwsh | ||
| env: | ||
| TEST_ENGINE: ${{ matrix.engine }} | ||
| run: | | ||
| & $env:TEST_ENGINE -NoProfile -NonInteractive -File scripts/test_install_interruption_real_windows.ps1 | ||
| if ($LASTEXITCODE -ne 0) { throw "Real interruption recovery failed: $LASTEXITCODE" } | ||
|
|
||
| isolated-user-path: | ||
| needs: syntax-preflight | ||
| name: Default installer PATH persistence (${{ matrix.engine }}) | ||
| # A separate GitHub-hosted VM provides a disposable Windows user profile. | ||
| # No other job or test in this workflow shares its HKCU registry hive. | ||
| runs-on: windows-2025 | ||
| timeout-minutes: 15 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| engine: ['powershell.exe', 'pwsh.exe'] | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Check full installer default user PATH integration in isolated profile | ||
| shell: pwsh | ||
| env: | ||
| TEST_ENGINE: ${{ matrix.engine }} | ||
| run: | | ||
| & $env:TEST_ENGINE -NoProfile -NonInteractive -File scripts/test_install_user_path_ci_windows.ps1 | ||
| if ($LASTEXITCODE -ne 0) { throw "Isolated installer PATH test failed: $LASTEXITCODE" } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Warning · Archive gate can pass packages Windows PowerShell 5.1 rejects
The package gates validate with
pwshonly, whose gzip decoder can read a tar stream split across gzip members that Windows PowerShell 5.1 sees as truncated.A packaging regression can pass validation but prevent installation on Windows PowerShell 5.1.
Validate the exact packaged archive under both PowerShell engines before upload.
Details
The current packager writes a single gzip member, so this is a regression-detection gap, not a failure of today's artifact. The two-engine fixture workflow does not consume the newly built archive.
View finding in Proofline
Also at:
.github/workflows/ci.ymllines 40 to 52