Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

ci(windows): harden SDE smoke — -snb only, hard timeouts, proven extraction

Ezra Ellettefcc0b888c6a3
diff --git a/.github/workflows/release-cli.yml b/.github/workflows/release-cli.yml
index 61f7024e8..c8785af66 100644
--- a/.github/workflows/release-cli.yml
+++ b/.github/workflows/release-cli.yml
@@ -529,6 +529,9 @@ jobs:
- name: Launch smoke test (native CPU + emulated non-AVX2 via Intel SDE)
shell: pwsh
+ # Belt-and-braces against emulator wedges (run 28808593583 sat 80+ min):
+ # the whole step is bounded even if a phase outside the PS timeout hangs.
+ timeout-minutes: 20
run: |
# A --version probe exercises process init end-to-end: CRT startup,
# the import table (onnxruntime.dll → MSVCP/VCRUNTIME), and every
@@ -548,31 +551,51 @@ jobs:
if ($LASTEXITCODE -ne 0) { throw "screenpipe.exe failed natively (exit $LASTEXITCODE) — the package is broken for ALL CPUs" }
# Intel SDE emulates older CPUs and raises the same illegal-instruction
- # fault a real pre-AVX2 chip would. -snb = Sandy Bridge (AVX, no AVX2);
- # -mrm = Merom (no AVX at all — harshest baseline case).
+ # fault a real pre-AVX2 chip would. -snb = Sandy Bridge (AVX, no AVX2)
+ # — exactly the pre-Haswell class from the 2026-07 customer report.
# Guards against regressions of the 0xc000001d launch crash: global
# /arch:AVX2 CFLAGS, AVX2 static onnxruntime, eager ggml init, etc.
# CI runners have AVX2, so without SDE a poisoned build sails through
- # CI and dies on customer machines (see the 2026-07 pre-Haswell report).
- # SDE URL: pinned to 9.44.0 — the exact version + extraction recipe
- # proven on these runners in google/XNNPACK's CI. SDE 10.8's Pin
- # injector fails on windows-2022 runners with "Invalid file name and
- # base dir combination: pincrt4.dll / Injection failed (ffffffff)"
- # (run 28806190901) before the app under test even starts. Use plain
- # tar -xf (bsdtar handles .tar.xz natively on Win10+); the 7z
- # two-step extraction is another delta from the proven recipe.
+ # CI and dies on customer machines.
+ #
+ # Probe design notes (validated 2026-07-06 on a real Windows machine
+ # against this exact build config — the probe completes in ~2s):
+ # - SDE 9.44.0: 10.8's Pin injector fails on windows-2022 runners
+ # ("Invalid file name and base dir combination: pincrt4.dll",
+ # run 28806190901). 9.44.0 is the version google/XNNPACK runs on
+ # the same runner image.
+ # - 7z two-step extraction: the one method proven to work on the
+ # runner (run 28806190901); a tar -xf variant wedged for 60+ min
+ # without ever reaching the SDE invocation (run 28808593583).
+ # - -snb ONLY. Pre-AVX chips (-nhm/-mrm) are a false-negative trap:
+ # modern hosts' own system DLLs (e.g. Win11 msvcrt.dll strncpy)
+ # execute AVX, so emulating a pre-AVX chip faults in the OS, not
+ # in our code. Real pre-AVX machines run OS builds with matching
+ # DLLs; our no-AVX floor is covered by baseline codegen + the
+ # runtime AVX2 gates.
+ # - Hard timeout per invocation + step timeout-minutes: a wedged
+ # emulator must fail fast and loud, never eat runner-hours.
# If Intel rotates the mirror, grab a fresh URL from
# https://www.intel.com/content/www/us/en/developer/articles/tool/software-development-emulator.html
$sdeUrl = 'https://downloadmirror.intel.com/831748/sde-external-9.44.0-2024-08-22-win.tar.xz'
+ Write-Host "=== downloading SDE ==="
curl.exe -fSL -o sde.tar.xz $sdeUrl
- tar -xf sde.tar.xz
+ Write-Host "=== extracting SDE (7z two-step) ==="
+ 7z x sde.tar.xz -y | Out-Null
+ 7z x sde.tar -y | Out-Null
$sde = (Get-ChildItem "sde-external-*" -Recurse -Filter sde.exe | Select-Object -First 1).FullName
if (-not $sde) { throw "sde.exe not found after extraction" }
- foreach ($cpu in @('-snb', '-mrm')) {
- Write-Host "=== SDE $cpu — screenpipe.exe --version ==="
- & $sde $cpu -- $exe --version
- if ($LASTEXITCODE -ne 0) { throw "screenpipe.exe faulted under SDE $cpu (exit $LASTEXITCODE) — a non-AVX2 CPU cannot launch this build" }
+ Write-Host "=== SDE -snb — screenpipe.exe --version (8 min timeout; ~2s when healthy) ==="
+ $p = Start-Process -FilePath $sde -ArgumentList @('-snb','--',$exe,'--version') `
+ -NoNewWindow -PassThru -RedirectStandardOutput sde-out.txt -RedirectStandardError sde-err.txt
+ if (-not $p.WaitForExit(480000)) {
+ taskkill /PID $($p.Id) /T /F | Out-Null
+ Get-Content sde-out.txt, sde-err.txt -ErrorAction SilentlyContinue
+ throw "SDE -snb probe timed out after 8 minutes (locally it takes ~2s) — emulator wedged on the runner or a startup-path hang on non-AVX2 CPUs"
}
+ Get-Content sde-out.txt, sde-err.txt -ErrorAction SilentlyContinue
+ if ($p.ExitCode -ne 0) { throw "screenpipe.exe faulted under SDE -snb (exit $($p.ExitCode)) — a non-AVX2 CPU cannot launch this build" }
+ Write-Host "=== SDE -snb probe passed: the package launches without AVX2 ==="
- name: Calculate SHA256
shell: pwsh