From 18d4ad6aabd27cad7a781da5e0ea7ce2545d0678 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Thu, 19 Feb 2026 07:50:19 +0000 Subject: [PATCH] test: trim duplicate cross-context policy cases --- src/infra/outbound/outbound.test.ts | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/src/infra/outbound/outbound.test.ts b/src/infra/outbound/outbound.test.ts index 7b788363542..799f0fe7121 100644 --- a/src/infra/outbound/outbound.test.ts +++ b/src/infra/outbound/outbound.test.ts @@ -621,18 +621,6 @@ const discordConfig = { } as OpenClawConfig; describe("outbound policy", () => { - it("blocks cross-provider sends by default", () => { - expect(() => - enforceCrossContextPolicy({ - cfg: slackConfig, - channel: "telegram", - action: "send", - args: { to: "telegram:@ops" }, - toolContext: { currentChannelId: "C12345678", currentChannelProvider: "slack" }, - }), - ).toThrow(/Cross-context messaging denied/); - }); - it("allows cross-provider sends when enabled", () => { const cfg = { ...slackConfig, @@ -652,23 +640,6 @@ describe("outbound policy", () => { ).not.toThrow(); }); - it("blocks same-provider cross-context when disabled", () => { - const cfg = { - ...slackConfig, - tools: { message: { crossContext: { allowWithinProvider: false } } }, - } as OpenClawConfig; - - expect(() => - enforceCrossContextPolicy({ - cfg, - channel: "slack", - action: "send", - args: { to: "C99999999" }, - toolContext: { currentChannelId: "C12345678", currentChannelProvider: "slack" }, - }), - ).toThrow(/Cross-context messaging denied/); - }); - it("uses components when available and preferred", async () => { const decoration = await buildCrossContextDecoration({ cfg: discordConfig,