forked from EduCraft/curriculum-project-hub
fix(hub): always send interrupt notice when card finalize fails
If StreamingAgentCard.finish cannot patch the live card, plain-text fallback can still succeed with partial answer text. Interrupt is terminal — always emit the explicit 已中断 notice when the card path failed so teachers see the abort. Harden the integration assertion with waitFor.
This commit is contained in:
@@ -1611,7 +1611,9 @@ describe("trigger full lifecycle (integration)", () => {
|
||||
expect(runs[0]?.status).toBe("CANCELED");
|
||||
});
|
||||
expect(patch).toHaveBeenCalled();
|
||||
expect(rt.sentTexts).toContain("已中断当前运行。");
|
||||
await vi.waitFor(() => {
|
||||
expect(rt.sentTexts).toContain("已中断当前运行。");
|
||||
});
|
||||
});
|
||||
|
||||
it("denies interrupt when the operator lacks agent.cancel permission", async () => {
|
||||
|
||||
Reference in New Issue
Block a user