From e8898bb6c11088192add1c1b000802343d82fd1d Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Tue, 21 Apr 2026 01:14:52 +0100 Subject: [PATCH] test: use synthetic agent channel fixtures --- src/agents/acp-spawn-parent-stream.test.ts | 2 +- src/agents/subagent-orphan-recovery.test.ts | 2 +- src/agents/subagent-spawn.attachments.test.ts | 2 +- src/agents/subagent-spawn.thread-binding.test.ts | 6 +++--- src/agents/tool-mutation.test.ts | 2 +- src/agents/tools/sessions-access.test.ts | 2 +- src/agents/tools/sessions-resolution.test.ts | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/agents/acp-spawn-parent-stream.test.ts b/src/agents/acp-spawn-parent-stream.test.ts index c94758efd72..53b06c364e5 100644 --- a/src/agents/acp-spawn-parent-stream.test.ts +++ b/src/agents/acp-spawn-parent-stream.test.ts @@ -78,7 +78,7 @@ describe("startAcpSpawnParentStreamRelay", () => { it("relays assistant progress and completion to the parent session", () => { const deliveryContext = { - channel: "telegram", + channel: "forum", to: "-1001234567890", accountId: "default", threadId: 1122, diff --git a/src/agents/subagent-orphan-recovery.test.ts b/src/agents/subagent-orphan-recovery.test.ts index 174eb0bba38..500f6d16148 100644 --- a/src/agents/subagent-orphan-recovery.test.ts +++ b/src/agents/subagent-orphan-recovery.test.ts @@ -36,7 +36,7 @@ function createTestRunRecord(overrides: Partial = {}): Subage return { runId: "run-1", childSessionKey: "agent:main:subagent:test-session-1", - requesterSessionKey: "agent:main:signal:direct:+1234567890", + requesterSessionKey: "agent:main:quietchat:direct:+1234567890", requesterDisplayKey: "main", task: "Test task: implement feature X", cleanup: "delete", diff --git a/src/agents/subagent-spawn.attachments.test.ts b/src/agents/subagent-spawn.attachments.test.ts index 1de81c54fad..b2c1e470607 100644 --- a/src/agents/subagent-spawn.attachments.test.ts +++ b/src/agents/subagent-spawn.attachments.test.ts @@ -104,7 +104,7 @@ describe("spawnSubagentDirect filename validation", () => { const ctx = { agentSessionKey: "agent:main:main", - agentChannel: "telegram" as const, + agentChannel: "forum" as const, agentAccountId: "123", agentTo: "456", }; diff --git a/src/agents/subagent-spawn.thread-binding.test.ts b/src/agents/subagent-spawn.thread-binding.test.ts index bede7a929e3..6bd96229554 100644 --- a/src/agents/subagent-spawn.thread-binding.test.ts +++ b/src/agents/subagent-spawn.thread-binding.test.ts @@ -186,15 +186,15 @@ describe("spawnSubagentDirect thread binding delivery", () => { { status: "active", conversation: { - channel: "feishu", + channel: "collabchat", accountId: "work", - conversationId: "oc_dm_chat_1", + conversationId: "collab_dm_1", }, }, ], }; currentDeliveryTargetResolver = () => ({ - to: "channel:oc_dm_chat_1", + to: "channel:collab_dm_1", }); const result = await spawnSubagentDirect( diff --git a/src/agents/tool-mutation.test.ts b/src/agents/tool-mutation.test.ts index 780b4dbd749..904ca191a0b 100644 --- a/src/agents/tool-mutation.test.ts +++ b/src/agents/tool-mutation.test.ts @@ -55,7 +55,7 @@ describe("tool mutation helpers", () => { it("exposes mutation state for downstream payload rendering", () => { expect( - buildToolMutationState("message", { action: "send", to: "telegram:1" }).mutatingAction, + buildToolMutationState("message", { action: "send", to: "forum:1" }).mutatingAction, ).toBe(true); expect(buildToolMutationState("browser", { action: "list" }).mutatingAction).toBe(false); expect( diff --git a/src/agents/tools/sessions-access.test.ts b/src/agents/tools/sessions-access.test.ts index a753c0ec182..69ce1b32823 100644 --- a/src/agents/tools/sessions-access.test.ts +++ b/src/agents/tools/sessions-access.test.ts @@ -166,7 +166,7 @@ describe("createSessionVisibilityGuard", () => { }); expect(guard.check("agent:main:main")).toEqual({ allowed: true }); - expect(guard.check("agent:main:telegram:group:1")).toEqual({ + expect(guard.check("agent:main:forum:group:1")).toEqual({ allowed: false, status: "forbidden", error: diff --git a/src/agents/tools/sessions-resolution.test.ts b/src/agents/tools/sessions-resolution.test.ts index f6faca642bc..202f9925299 100644 --- a/src/agents/tools/sessions-resolution.test.ts +++ b/src/agents/tools/sessions-resolution.test.ts @@ -119,7 +119,7 @@ describe("session reference shape detection", () => { expect(looksLikeSessionKey("agent:main:main")).toBe(true); expect(looksLikeSessionKey("cron:daily-report")).toBe(true); expect(looksLikeSessionKey("node:macbook")).toBe(true); - expect(looksLikeSessionKey("telegram:group:123")).toBe(true); + expect(looksLikeSessionKey("forum:group:123")).toBe(true); expect(looksLikeSessionKey("random-slug")).toBe(false); });