From 7327ba41f4c69b3cf47f0e3a784976040980457f Mon Sep 17 00:00:00 2001 From: Vellum Assistant Date: Sat, 9 May 2026 04:27:38 +0000 Subject: [PATCH] test(app-control): update stop test to expect idempotent success when no proxy attached PR #30079 moved the app_control_stop short-circuit BEFORE the isAvailable() gate so a disconnected client cannot strand the singleton lock. After that change, stop succeeds as a no-op even when no proxy is attached, but this test still asserted the old isError behavior. Update the assertion to match the new contract (stop is idempotent). --- .../__tests__/conversation-surfaces-app-control.test.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/assistant/src/__tests__/conversation-surfaces-app-control.test.ts b/assistant/src/__tests__/conversation-surfaces-app-control.test.ts index 270306e2e59..eb57d180411 100644 --- a/assistant/src/__tests__/conversation-surfaces-app-control.test.ts +++ b/assistant/src/__tests__/conversation-surfaces-app-control.test.ts @@ -130,15 +130,18 @@ describe("surfaceProxyResolver — app-control tool routing", () => { proxy.dispose(); }); - test("returns isError for app_control_stop when no proxy is attached", async () => { + test("app_control_stop succeeds idempotently when no proxy is attached", async () => { + // Stop is local-only and runs BEFORE the isAvailable() gate so a + // disconnected client cannot strand the singleton lock. With no proxy + // attached at all, it must still succeed as a no-op without dispatching. const ctx = buildMockContext(); const result = await surfaceProxyResolver(ctx, "app_control_stop", { tool: "stop", }); - expect(result.isError).toBe(true); - expect(result.content).toContain("not available"); + expect(result.isError).toBe(false); + expect(result.content.toLowerCase()).toContain("stopped"); expect(sentMessages).toHaveLength(0); }); });