Skip to content

Commit ee98526

Browse files
Harden Windows smoke SSH retry handling
1 parent 7b4aec2 commit ee98526

2 files changed

Lines changed: 13 additions & 4 deletions

File tree

docs/exec-plans/active/EP-001-portable-coder-foundation-and-multi-provider-mvp.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ Initial user target providers/tools:
4343
- [x] (2026-02-20) Fix Windows bootstrap `ssh-keygen` argument handling for empty-passphrase key generation
4444
- [x] (2026-02-20) Fix Windows VM start cloud-init port selection to fallback when default range is exhausted
4545
- [x] (2026-02-20) Add Windows helper script to patch legacy `start-vm.ps1` cloud-init port fallback on existing local clones
46+
- [x] (2026-02-20) Make Windows smoke SSH probe tolerate transient native-command connection errors during VM boot
4647
- [ ] (2026-02-18) Document setup/runbook and close out EP-001
4748

4849
## Context and Orientation
@@ -121,6 +122,7 @@ Acceptance criteria for EP-001:
121122
- 2026-02-20: Windows VM smoke validation remains target-specific and is still tracked separately from Linux-host checks.
122123
- 2026-02-20: PowerShell `Start-Process -ArgumentList` rejected empty elements, so `ssh-keygen -N` required explicit empty-string handling.
123124
- 2026-02-20: Some Windows hosts had no free ports in `38080-38120`; cloud-init server startup now needs fallback port allocation.
125+
- 2026-02-20: On some PowerShell environments, transient `ssh` connection failures surfaced as exceptions; smoke probing must retry instead of aborting early.
124126

125127
## Decision Log
126128
- 2026-02-18: Adopt harness-first planning model before implementation.

scripts/runtime/windows/smoke-check.ps1

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,17 @@ function Invoke-Ssh {
6767
'bash', '-lc', $Script
6868
)
6969

70-
$output = & $SshExe @args 2>&1
71-
return @{
72-
status = $LASTEXITCODE
73-
output = [string]::Join("`n", $output)
70+
try {
71+
$output = & $SshExe @args 2>&1
72+
return @{
73+
status = $LASTEXITCODE
74+
output = [string]::Join("`n", $output)
75+
}
76+
} catch {
77+
return @{
78+
status = 1
79+
output = $_.Exception.Message
80+
}
7481
}
7582
}
7683

0 commit comments

Comments
 (0)