(t *testing.T, executor *agent.StreamingToolExecutor, toolID string)
| 364 | if !executor.AddTool(coretools.ToolCall{ID: "block-1", Name: "blocking_abort", Input: map[string]any{}}) { |
| 365 | t.Fatal("expected blocking sibling tool to start immediately") |
| 366 | } |
| 367 | <-started |
| 368 | if !<-sawAbortEvent { |
| 369 | t.Fatal("expected executor to inject per-slot abort_event into tool context") |
| 370 | } |
| 371 | if !executor.AddTool(coretools.ToolCall{ID: "fail-1", Name: "fail_abort", Input: map[string]any{}}) { |
| 372 | t.Fatal("expected failing sibling tool to start immediately") |
| 373 | } |
| 374 | |
| 375 | waitForCompletedTool(t, executor, "fail-1") |
| 376 | executor.AbortSiblings("fail-1") |
| 377 | results := executor.GetRemainingResults(context.Background()) |
| 378 | |
| 379 | var abortContent string |
| 380 | for _, result := range results { |
| 381 | if result["tool_use_id"] == "block-1" { |
| 382 | abortContent, _ = result["content"].(string) |
| 383 | break |
| 384 | } |
| 385 | } |
| 386 | expected := "Execution aborted — sibling bash tool 'fail_abort' (fail-1) failed." |
| 387 | if abortContent != expected { |
no test coverage detected