[eric] ci: the Windows .swarm round trip runs inside the health step while the app is up; a relaunch after the kill never came back within its budget

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01C9zwUaHucUgrdxvK8FvjYT
This commit is contained in:
ciregenz
2026-09-04 10:46:19 -07:00
co-authored by Claude Fable 5.1
parent 255a26519f
commit 2721ded6aa
+7 -19
View File
@@ -307,25 +307,12 @@ jobs:
if ($code -eq 200) { break }
}
echo "health=$code"
Stop-Process -Name "OpenSwarm" -Force -ErrorAction SilentlyContinue
if ($code -ne 200) { throw "backend never became healthy" }
- name: .swarm app round trip on real Windows (export, import, the workspace lands)
shell: pwsh
run: |
# ENG-463: the staging reader keyed files with backslashes, the importer looked for workspace/, and every
# Windows import saved a hollow app. This exports a workspace app and imports it back on the installed build.
$env:OPENSWARM_E2E = "1"
Start-Process -FilePath $env:APP_EXE
$tok = $null; $code = 0
foreach ($i in 1..60) {
Start-Sleep -Seconds 3
$p = Join-Path $env:APPDATA "OpenSwarm\data\auth.token"
if (Test-Path $p) { $tok = (Get-Content $p -Raw).Trim() }
try { $code = (Invoke-WebRequest -Uri "http://127.0.0.1:8324/api/health/check" -UseBasicParsing -TimeoutSec 2).StatusCode } catch { $code = 0 }
if ($code -eq 200 -and $tok) { break }
}
if (-not $tok -or $code -ne 200) { Stop-Process -Name "OpenSwarm" -Force -ErrorAction SilentlyContinue; throw "backend or token never came up" }
if ($code -ne 200) { Stop-Process -Name "OpenSwarm" -Force -ErrorAction SilentlyContinue; throw "backend never became healthy" }
# ENG-463: a .swarm app round trip on the running app. The staging reader keyed files with backslashes, the
# importer looked for workspace/, and every Windows import saved a hollow app that then said its files were missing.
$tok = $null
foreach ($i in 1..20) { $p = Join-Path $env:APPDATA "OpenSwarm\data\auth.token"; if (Test-Path $p) { $tok = (Get-Content $p -Raw).Trim() }; if ($tok) { break }; Start-Sleep -Seconds 3 }
if (-not $tok) { Stop-Process -Name "OpenSwarm" -Force -ErrorAction SilentlyContinue; throw "no auth token under APPDATA\OpenSwarm\data" }
$H = @{ Authorization = "Bearer $tok" }
$B = "http://127.0.0.1:8324/api"
$ws = [guid]::NewGuid().ToString("N")
@@ -351,3 +338,4 @@ jobs:
Stop-Process -Name "OpenSwarm" -Force -ErrorAction SilentlyContinue
if (-not $rec.workspace_id) { throw "the imported app has no workspace: the Windows backslash import" }
if ($probe -ne 200 -or -not (Test-Path $nested)) { throw "round trip failed" }