Skip to content

Commit 22d06cd

Browse files
committed
CI: update the Named Pipe first-invoke assertion for the new-session treatment
The 1.11.0 new-session treatment changed the first console attach response: on a fresh proxy the first invoke_expression now carries the 'New server session' notice and normalizes the working directory to the home directory (prefixing the pipeline with Set-Location), instead of the old 'Switched to console' notice. The Linux Named Pipe integration test still asserted 'Switched to console' and failed (run 28006458461) -- a stale expectation, not a product bug: the run log shows 'New server session ... now at /home/runner', confirming the feature works on Linux. Update the first-call assertion to expect 'New server session' plus the date (Get-Date still runs in the same call). Other workflows do not assert the old strings; macos-terminal-test is manual-only and talks to the DLL pipe directly (bypassing the proxy), so it is unaffected.
1 parent c7d2ff6 commit 22d06cd

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

.github/workflows/cross-platform-test.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -572,20 +572,22 @@ jobs:
572572
} else {
573573
574574
# Test: invoke_expression with Get-Date (first call).
575-
# Since v1.9 (commit 32f0f56), the "switched to a sibling pipe" path no longer
576-
# bails with "Pipeline NOT executed" — it folds the switch notice into the
577-
# response and runs the pipeline in the same call. So the first call should
578-
# show BOTH the "Switched to console" notice AND the actual Get-Date result.
575+
# On a fresh proxy this is the first console attach for the agent — the
576+
# resume / cold-start boundary — so the response carries the "New server
577+
# session" notice and the working directory is normalized to $HOME (the
578+
# pipeline is prefixed with a Set-Location), after which the Get-Date still
579+
# runs in the same call. So the first call should show BOTH the "New server
580+
# session" notice AND the actual Get-Date result.
579581
Write-Host "`n=== Test: invoke_expression (Get-Date) - First call ===" -ForegroundColor Yellow
580582
$invokeRequest = '{"jsonrpc":"2.0","id":10,"method":"tools/call","params":{"name":"invoke_expression","arguments":{"pipeline":"Get-Date -Format yyyy-MM-dd"}}}'
581583
$response = Send-JsonRpc $invokeRequest 60000
582584
Write-Host "Response (truncated): $($response.Substring(0, [Math]::Min(200, $response.Length)))..."
583585
584586
$today = Get-Date -Format "yyyy-MM-dd"
585-
if ($response -match "Switched to console" -and $response -match $today) {
586-
Write-Host "First invoke_expression: PASSED (switched + executed in one call)" -ForegroundColor Green
587+
if ($response -match "New server session" -and $response -match $today) {
588+
Write-Host "First invoke_expression: PASSED (new-session treatment + executed in one call)" -ForegroundColor Green
587589
} else {
588-
throw "First invoke_expression did not return both ''Switched to console'' and today''s date ($today)"
590+
throw "First invoke_expression did not return both ''New server session'' and today''s date ($today)"
589591
}
590592
591593
# Test: invoke_expression with Get-Date (second call - reuses existing pipe, no switch notice)

0 commit comments

Comments
 (0)