test(e2e): verify install stamps describe the updated checkout (windows leg)

New `-Phase verify-stamp` in the windows install/update driver, wired into
install-e2e-windows-run.yml AFTER the update phase — including the new
runtime's launch and smoke checks — because the bootstrap marker can
complete on a later run than the install itself. Known-failure legs skip
it: they legitimately never reach the new HEAD.

The phase runs scripts/verify-bootstrap-version-stamp.py against the
installed checkout with --expect-commit from the staged serve state, so
a real windows-latest run now asserts both the bootstrap-complete
receipt and the checkout's install-stamp.json tell the truth about the
final HEAD (native coverage the Linux-only suite can't provide).

Validation: windows-e2e.ps1 parses clean under real pwsh; workflow YAML
parses; tests/scripts/test_powershell_script_syntax.py green.
This commit is contained in:
ethernet committed 2026-09-23 11:49:49 -04:00
1 parent c13ea774e6
commit dd86f27636
2 files changed
+28 -1

No files matched your search

@@ -241,6 +241,15 @@ jobs:
shell: powershell
run: powershell -NoProfile -ExecutionPolicy Bypass -File tests\install\windows-e2e.ps1 -Phase update -InstallMethod "${{ inputs.install-method }}" -Route "${{ inputs.update-method }}" -InstallRef "${{ inputs.install-ref }}" -SetupExeUrl ${{ inputs.setup-exe-url }}
# After everything, including the new runtime's launch and its smoke
# checks: the bootstrap marker can complete on a later run than the
# install, so stamp truthfulness is asserted here — not in the install
# phase. Known-failure legs legitimately never reach the new HEAD.
- name: Verify install stamps describe the updated checkout
if: steps.update.outputs.known_failure == ''
shell: powershell
run: powershell -NoProfile -ExecutionPolicy Bypass -File tests\install\windows-e2e.ps1 -Phase verify-stamp -InstallMethod "${{ inputs.install-method }}" -Route "${{ inputs.update-method }}" -InstallRef "${{ inputs.install-ref }}" -SetupExeUrl ${{ inputs.setup-exe-url }}
- name: Stage known-failure receipt
if: steps.update.outputs.known_failure != ''
shell: pwsh
+19 -1
View File
@@ -62,7 +62,7 @@
#
# USAGE (local Windows box or CI):
# powershell -File tests\install\windows-e2e.ps1 -Phase all
# ... -Phase stage / install / update
# ... -Phase stage / install / update / verify-stamp
# Phases share state via <workroot>\shas.json, so CI can run them as
# separate steps for readable logs. -InstallMethod and -Route are
# orthogonal axes: the install phase dispatches on -InstallMethod, the
@@ -1393,6 +1393,22 @@ function Invoke-CheckedPhaseUpdate {
}
}
function Invoke-PhaseVerifyStamp {
# Runs AFTER everything (install, update, the new runtime's launch and its
# smoke checks): the bootstrap-complete receipt and the checkout's source
# stamp must both tell the truth about the final HEAD. A separate phase —
# not an install-phase check — because the bootstrap marker can complete
# on a LATER run than the install itself.
$state = Read-State
$head = Get-InstalledHead
Assert-True ($head -match '^[0-9a-f]{40}$') "installed HEAD readable: '$head'"
Write-Host " install HEAD: $($head.Substring(0, 12))"
& python -B (Join-Path $RepoRoot 'scripts\verify-bootstrap-version-stamp.py') `
--stamp (Join-Path $InstallDir '.hermes-bootstrap-complete') `
--repo $InstallDir --expect-commit $state.current
if ($LASTEXITCODE -ne 0) { throw "stamp verification failed (exit $LASTEXITCODE)" }
}
# ----------------------------------------------------------------------------
# Dispatch
# ----------------------------------------------------------------------------
@@ -1412,10 +1428,12 @@ switch ($Phase) {
"stage" { Invoke-PhaseStage }
"install" { Invoke-SourceBuild { Invoke-PhaseInstall } }
"update" { Invoke-SourceBuild { Invoke-CheckedPhaseUpdate } }
"verify-stamp" { Invoke-PhaseVerifyStamp }
"all" {
Invoke-PhaseStage
Invoke-SourceBuild { Invoke-PhaseInstall }
Invoke-SourceBuild { Invoke-CheckedPhaseUpdate }
Invoke-PhaseVerifyStamp
}
}