Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/coding-agent/test/sdk-acp-prompt-terminal.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3297,14 +3297,14 @@ test("ACP cancel grace preserves background activity that starts after acknowled
}
});

test("ACP keeps the authoritative terminal when it arrives inside the cancel grace", async () => {
test("ACP settles an acknowledged cancel as cancelled when a stopped terminal arrives inside the cancel grace", async () => {
const fixture = await createFixture({ cancelSettlementGraceMs: 1_000 });
try {
const pending = prompt(fixture, "cancel with terminal");
await bounded(fixture.promptDelivered, "prompt delivery");
await bounded(fixture.agent.cancel({ sessionId: fixture.sessionId }), "cancel acknowledgement");
fixture.sendStopped("refusal");
expect(await bounded(pending, "terminal settlement")).toEqual({ stopReason: "refusal" });
expect(await bounded(pending, "terminal settlement")).toEqual({ stopReason: "cancelled" });
} finally {
fixture.dispose();
}
Expand Down
Loading