From f071c2257cf67d6f4d0dc1d85351ef668ba7b730 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 3 Oct 2026 23:45:43 +0000 Subject: [PATCH] test: look up the home main conversation in the scheduling journey Since every project has its own main conversation, the journey that schedules for a specialist found the user's main conversation with findFirst over all of them. With the Lab project's conversation also matching, it picked either one, so the check failed about one run in three. The lookup now names the home space, where the specialist joined and the routine is created. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01MRtGG9ARfqqhma3t85Ro2u --- packages/testkit/src/journeys.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/testkit/src/journeys.test.ts b/packages/testkit/src/journeys.test.ts index f236434..3ab5e55 100644 --- a/packages/testkit/src/journeys.test.ts +++ b/packages/testkit/src/journeys.test.ts @@ -1305,8 +1305,9 @@ describeJourneys("required product journeys", () => { }); await joinMainConversation(prisma, { userId: me.userId, botIds: [writer.id] }); + // Lab has a main conversation of its own; the home one is where Writer joined. const conversation = await prisma.chatGroup.findFirstOrThrow({ - where: { userId: me.userId, kind: "main" }, + where: { userId: me.userId, spaceId: main.spaceId, kind: "main" }, include: { thread: true }, }); const inMain = await scheduleAndWake("Writer", "main-digest");