fix(test): align "cancelled" spelling with upstream "canceled"

The subagent code uses "canceled" (American spelling, upstream convention)
but the reporter test still expected "cancelled" (British spelling).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
dj-oyu 2026-02-28 23:23:39 +09:00
parent 0f160f4330
commit 3d6f9f2985

View file

@ -174,7 +174,7 @@ func TestSubagentManager_Spawn_SnapshotLiveDuringExecution(t *testing.T) {
// TestSubagentManager_Spawn_CancelledDuringExecution verifies that when the // TestSubagentManager_Spawn_CancelledDuringExecution verifies that when the
// context is cancelled while a subagent's LLM call is in progress, the // context is cancelled while a subagent's LLM call is in progress, the
// Broadcaster receives agent_gc with reason="cancelled" and the agent is // Broadcaster receives agent_gc with reason="canceled" and the agent is
// removed from the snapshot. // removed from the snapshot.
// //
// Synchronisation: // Synchronisation:
@ -224,7 +224,7 @@ loop:
} }
} }
// Locate agent_gc and verify reason = "cancelled". // Locate agent_gc and verify reason = "canceled".
var gcEv orch.Event var gcEv orch.Event
for _, ev := range events { for _, ev := range events {
if ev.Type == "agent_gc" { if ev.Type == "agent_gc" {
@ -232,12 +232,12 @@ loop:
break break
} }
} }
if gcEv.Reason != "cancelled" { if gcEv.Reason != "canceled" {
t.Errorf("agent_gc reason = %q, want %q; events: %+v", gcEv.Reason, "cancelled", events) t.Errorf("agent_gc reason = %q, want %q; events: %+v", gcEv.Reason, "canceled", events)
} }
// Snapshot must be empty after the GC event. // Snapshot must be empty after the GC event.
if snap := b.Snapshot(); len(snap) != 0 { if snap := b.Snapshot(); len(snap) != 0 {
t.Errorf("snapshot must be empty after agent_gc(cancelled), got: %v", snap) t.Errorf("snapshot must be empty after agent_gc(canceled), got: %v", snap)
} }
} }