aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-07-18 00:47:18 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-07-18 00:47:18 +0300
commit13ce20c4f536892c5b939bd62e5286fac9c2eaee (patch)
tree43aa46324327c4845a61cea689166137c6fbd868
parente0758c32118f2aa006db3d8fa4b41833fe6e7ead (diff)
fix: update windows conpty smoke for pane-first agents
-rw-r--r--scripts/windows_smoke_conpty_path.ps120
1 files changed, 15 insertions, 5 deletions
diff --git a/scripts/windows_smoke_conpty_path.ps1 b/scripts/windows_smoke_conpty_path.ps1
index 76229275..ce54dd45 100644
--- a/scripts/windows_smoke_conpty_path.ps1
+++ b/scripts/windows_smoke_conpty_path.ps1
@@ -84,26 +84,36 @@ try {
throw "server did not become ready"
}
- Invoke-Checked $exe @("agent", "start", "smoke", "--", $env:ComSpec, "/K", "dir")
+ $created = & $exe workspace create --cwd $PWD.Path 2>&1
+ if ($LASTEXITCODE -ne 0) {
+ throw "workspace create failed with exit code $LASTEXITCODE`: $($created -join "`n")"
+ }
+ $paneId = (($created -join "`n") | ConvertFrom-Json).result.root_pane.pane_id
+ if ([string]::IsNullOrWhiteSpace($paneId)) {
+ throw "workspace create did not return a root pane id: $($created -join "`n")"
+ }
+ $marker = "HERDR_CONPTY_SMOKE_OK"
+ Invoke-Checked $exe @("pane", "run", $paneId, "echo $marker")
+
$text = ""
$deadline = (Get-Date).AddSeconds(15)
do {
Start-Sleep -Milliseconds 500
try {
- $read = & $exe agent read smoke --source recent --lines 40 --format text 2>&1
+ $read = & $exe pane read $paneId --source recent-unwrapped --lines 40 --format text 2>&1
$readExitCode = $LASTEXITCODE
} catch {
$read = @($_.Exception.Message)
$readExitCode = 1
}
$text = $read -join "`n"
- if ($readExitCode -eq 0 -and $text -match "File\(s\)" -and $text -match "Dir\(s\)") {
+ if ($readExitCode -eq 0 -and (($text -replace "\s", "") -match $marker)) {
break
}
} while ((Get-Date) -lt $deadline)
- if ($text -notmatch "File\(s\)" -or $text -notmatch "Dir\(s\)") {
- throw "pane read did not include cmd.exe directory output: $text"
+ if (($text -replace "\s", "") -notmatch $marker) {
+ throw "pane read did not include the smoke marker: $text"
}
} finally {
if ($null -ne $server) {