From d8db21e7a384876b05da362143fa0a239d8a590b Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Fri, 14 Aug 2026 05:23:27 -0700 Subject: [PATCH] perf(test): remove obsolete gateway channel pin proof (#123643) --- scripts/lib/ci-node-test-plan.mts | 1 - .../server.minimal-channel-pin.test.ts | 64 ------------------- 2 files changed, 65 deletions(-) delete mode 100644 src/gateway/server.minimal-channel-pin.test.ts diff --git a/scripts/lib/ci-node-test-plan.mts b/scripts/lib/ci-node-test-plan.mts index 11a4854a6259..06027f206d63 100644 --- a/scripts/lib/ci-node-test-plan.mts +++ b/scripts/lib/ci-node-test-plan.mts @@ -1105,7 +1105,6 @@ function resolveGatewayServerShardName(file: string): string { if ( name.startsWith("server.control-ui-root") || name.startsWith("server.ios-client-id") || - name.startsWith("server.minimal-channel-pin") || name.startsWith("server.tools-catalog") ) { return "agentic-control-plane-runtime-ui-tools"; diff --git a/src/gateway/server.minimal-channel-pin.test.ts b/src/gateway/server.minimal-channel-pin.test.ts deleted file mode 100644 index af4002f05c83..000000000000 --- a/src/gateway/server.minimal-channel-pin.test.ts +++ /dev/null @@ -1,64 +0,0 @@ -/** - * Minimal channel pinning regression tests. - */ -import { afterEach, expect, test } from "vitest"; -import { getChannelPlugin } from "../channels/plugins/index.js"; -import { - getActivePluginRegistry, - resetPluginRuntimeStateForTest, - setActivePluginRegistry, -} from "../plugins/runtime.js"; -import { createOutboundTestPlugin } from "../test-utils/channel-plugins.js"; -import { createRegistry } from "./server.e2e-registry-helpers.js"; -import { - getGatewayTestPort, - installGatewayTestHooks, - startTestGatewayServer, -} from "./test-helpers.js"; - -installGatewayTestHooks({ scope: "suite" }); - -const whatsappOutbound = { - deliveryMode: "direct" as const, - sendText: async () => ({ channel: "whatsapp", messageId: "text-1" }), - sendMedia: async () => ({ channel: "whatsapp", messageId: "media-1" }), -}; - -const replacementPlugin = createOutboundTestPlugin({ - id: "whatsapp", - outbound: whatsappOutbound, - label: "WhatsApp Replacement", -}); - -const replacementRegistry = createRegistry([ - { - pluginId: "whatsapp", - source: "test-replacement", - plugin: replacementPlugin, - }, -]); - -afterEach(() => { - resetPluginRuntimeStateForTest(); -}); - -test("minimal gateway tracks later channel registry updates", async () => { - const prevRegistry = getActivePluginRegistry(); - const prevVitest = process.env.VITEST; - resetPluginRuntimeStateForTest(); - process.env.VITEST = "1"; - const port = await getGatewayTestPort(); - const server = await startTestGatewayServer(port); - try { - expect(getChannelPlugin("whatsapp")).not.toBe(replacementPlugin); - setActivePluginRegistry(replacementRegistry); - expect(getChannelPlugin("whatsapp")).toBe(replacementPlugin); - } finally { - await server.close(); - process.env.VITEST = prevVitest; - resetPluginRuntimeStateForTest(); - if (prevRegistry) { - setActivePluginRegistry(prevRegistry); - } - } -});