Skip to content

Commit 97f4002

Browse files
yotsudaclaude
andcommitted
fix(ci): update Linux Named-Pipe test for v1.9 auto-execute-on-switch
The "first invoke_expression" assertion still expected the pre-1.9 contract: the response should contain "Switched to console" AND "Pipeline NOT executed", forcing the AI to re-issue the call. Since commit 32f0f56 ("track PSDrive cwd via home-thread cache, bail on user-cd drift") that path was changed to fold the switch notice into the response and run the pipeline in the same call — only the user-cd drift case still bails. The Linux integration test never saw the new shape and was failing on every push. Update the assertion to match: first call must show BOTH the switch notice AND today''s date (proving the pipeline actually ran). The second call''s assertion is unchanged (existing pipe is reused, no switch notice expected). macOS skips this branch entirely (Terminal.app dependency), so this only affects Linux. Windows runs through `cmd /c start` and doesn''t hit the "switched to a sibling" path here either, so its existing green status stays. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 46c6709 commit 97f4002

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

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

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -471,25 +471,29 @@ jobs:
471471
Write-Host "`n=== Named Pipe tests passed (macOS: connectivity + timer mechanism) ===" -ForegroundColor Green
472472
} else {
473473
474-
# Test: invoke_expression with Get-Date (first call - should return get_current_location)
474+
# Test: invoke_expression with Get-Date (first call).
475+
# Since v1.9 (commit 32f0f56), the "switched to a sibling pipe" path no longer
476+
# bails with "Pipeline NOT executed" — it folds the switch notice into the
477+
# response and runs the pipeline in the same call. So the first call should
478+
# show BOTH the "Switched to console" notice AND the actual Get-Date result.
475479
Write-Host "`n=== Test: invoke_expression (Get-Date) - First call ===" -ForegroundColor Yellow
476480
$invokeRequest = '{"jsonrpc":"2.0","id":10,"method":"tools/call","params":{"name":"invoke_expression","arguments":{"pipeline":"Get-Date -Format yyyy-MM-dd"}}}'
477481
$response = Send-JsonRpc $invokeRequest 60000
478482
Write-Host "Response (truncated): $($response.Substring(0, [Math]::Min(200, $response.Length)))..."
479483
480-
if ($response -match "Switched to console" -and $response -match "Pipeline NOT executed") {
481-
Write-Host "First invoke_expression: PASSED (expected behavior - command not executed)" -ForegroundColor Green
484+
$today = Get-Date -Format "yyyy-MM-dd"
485+
if ($response -match "Switched to console" -and $response -match $today) {
486+
Write-Host "First invoke_expression: PASSED (switched + executed in one call)" -ForegroundColor Green
482487
} else {
483-
throw "First invoke_expression did not return expected ''Switched to console'' message"
488+
throw "First invoke_expression did not return both ''Switched to console'' and today''s date ($today)"
484489
}
485490
486-
# Test: invoke_expression with Get-Date (second call - should execute)
491+
# Test: invoke_expression with Get-Date (second call - reuses existing pipe, no switch notice)
487492
Write-Host "`n=== Test: invoke_expression (Get-Date) - Second call ===" -ForegroundColor Yellow
488493
$invokeRequest = '{"jsonrpc":"2.0","id":11,"method":"tools/call","params":{"name":"invoke_expression","arguments":{"pipeline":"Get-Date -Format yyyy-MM-dd"}}}'
489494
$response = Send-JsonRpc $invokeRequest 60000
490495
Write-Host "Response: $response"
491496
492-
$today = Get-Date -Format "yyyy-MM-dd"
493497
if ($response -match $today) {
494498
Write-Host "Second invoke_expression (Get-Date): PASSED" -ForegroundColor Green
495499
} else {

0 commit comments

Comments
 (0)