Skip to content

The agent that grows with you

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

ethernetdd86f2763651
diff --git a/.github/workflows/install-e2e-windows-run.yml b/.github/workflows/install-e2e-windows-run.yml
index b0121e3a7ba..c8cec4084ac 100644
--- a/.github/workflows/install-e2e-windows-run.yml
+++ b/.github/workflows/install-e2e-windows-run.yml
@@ -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
diff --git a/tests/install/windows-e2e.ps1 b/tests/install/windows-e2e.ps1
index a02fef033ff..6b8e3b477e5 100644
--- a/tests/install/windows-e2e.ps1
+++ b/tests/install/windows-e2e.ps1
@@ -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
}
}