From aecd709dfe6b4a53f085fc752ea267a47fd805c4 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Tue, 21 Apr 2026 00:46:54 +0100 Subject: [PATCH] test: use synthetic task channel fixtures --- src/tasks/task-flow-registry.store.test.ts | 4 ++-- src/tasks/task-registry.maintenance.issue-60299.test.ts | 6 +++--- src/tasks/task-registry.store.test.ts | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/tasks/task-flow-registry.store.test.ts b/src/tasks/task-flow-registry.store.test.ts index 9b75dc2d9b3..734c3179eca 100644 --- a/src/tasks/task-flow-registry.store.test.ts +++ b/src/tasks/task-flow-registry.store.test.ts @@ -118,7 +118,7 @@ describe("task-flow-registry store runtime", () => { expectedRevision: created.revision, currentStep: "ask_user", stateJson: { phase: "ask_user" }, - waitJson: { kind: "external_event", topic: "telegram" }, + waitJson: { kind: "external_event", topic: "forum" }, }); expect(waiting).toMatchObject({ applied: true, @@ -142,7 +142,7 @@ describe("task-flow-registry store runtime", () => { status: "waiting", currentStep: "ask_user", stateJson: { phase: "ask_user" }, - waitJson: { kind: "external_event", topic: "telegram" }, + waitJson: { kind: "external_event", topic: "forum" }, cancelRequestedAt: 444, }); }); diff --git a/src/tasks/task-registry.maintenance.issue-60299.test.ts b/src/tasks/task-registry.maintenance.issue-60299.test.ts index 239e7f97733..2b9adbb5295 100644 --- a/src/tasks/task-registry.maintenance.issue-60299.test.ts +++ b/src/tasks/task-registry.maintenance.issue-60299.test.ts @@ -132,7 +132,7 @@ function createTaskRegistryMaintenanceHarness(params: { describe("task-registry maintenance issue #60299", () => { it("marks stale cron tasks lost once the runtime no longer tracks the job as active", async () => { - const childSessionKey = "agent:main:slack:channel:test-channel"; + const childSessionKey = "agent:main:workspace:channel:test-channel"; const task = makeStaleTask({ runtime: "cron", sourceId: "cron-job-1", @@ -165,7 +165,7 @@ describe("task-registry maintenance issue #60299", () => { }); it("marks chat-backed cli tasks lost after the owning run context disappears", async () => { - const channelKey = "agent:main:slack:channel:C1234567890"; + const channelKey = "agent:main:workspace:channel:C1234567890"; const task = makeStaleTask({ runtime: "cli", sourceId: "run-chat-cli-stale", @@ -185,7 +185,7 @@ describe("task-registry maintenance issue #60299", () => { }); it("keeps chat-backed cli tasks live while the owning run context is still active", async () => { - const channelKey = "agent:main:slack:channel:C1234567890"; + const channelKey = "agent:main:workspace:channel:C1234567890"; const task = makeStaleTask({ runtime: "cli", sourceId: "run-chat-cli-live", diff --git a/src/tasks/task-registry.store.test.ts b/src/tasks/task-registry.store.test.ts index d6aa67ed6c8..9ca71aaa1c2 100644 --- a/src/tasks/task-registry.store.test.ts +++ b/src/tasks/task-registry.store.test.ts @@ -229,10 +229,10 @@ describe("task-registry store runtime", () => { it("preserves requesterSessionKey when it differs from ownerKey across sqlite restore", () => { const created = createTaskRecord({ runtime: "cli", - requesterSessionKey: "agent:main:slack:channel:C1234567890", + requesterSessionKey: "agent:main:workspace:channel:C1234567890", ownerKey: "agent:main:main", scopeKind: "session", - childSessionKey: "agent:main:slack:channel:C1234567890", + childSessionKey: "agent:main:workspace:channel:C1234567890", runId: "run-requester-session-restore", task: "Reply to channel task", status: "running", @@ -244,9 +244,9 @@ describe("task-registry store runtime", () => { expect(findTaskByRunId("run-requester-session-restore")).toMatchObject({ taskId: created.taskId, - requesterSessionKey: "agent:main:slack:channel:C1234567890", + requesterSessionKey: "agent:main:workspace:channel:C1234567890", ownerKey: "agent:main:main", - childSessionKey: "agent:main:slack:channel:C1234567890", + childSessionKey: "agent:main:workspace:channel:C1234567890", }); });