From 19e06f2a42d6d2e6c1e7fb9bbd6e2ce528ca44b9 Mon Sep 17 00:00:00 2001 From: Dotta Date: Tue, 24 Nov 2026 18:40:42 -0600 Subject: [PATCH] fix(test): expect external-chat task replies to be recovered in the control-plane conformance test #22807 made recovery post a done reply on an ordinary task that an external chat woke. The conformance test still asserted the old refusal, so it fails on master and Cloud readiness cancels every master Docker build. Co-Authored-By: Claude Opus 5.5 --- .../native-runtime/paperclip-control-plane-port.test.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/server/src/services/native-runtime/paperclip-control-plane-port.test.ts b/server/src/services/native-runtime/paperclip-control-plane-port.test.ts index 406070043ad..c8ada49eb9f 100644 --- a/server/src/services/native-runtime/paperclip-control-plane-port.test.ts +++ b/server/src/services/native-runtime/paperclip-control-plane-port.test.ts @@ -2000,14 +2000,16 @@ describe("PaperclipControlPlanePort conformance", () => { companyId: identity.companyId, issueId: taskIssueId, runId: taskRunId, }); expect(await repair()).toBe(false); + // An ordinary task woken by an external chat gets the reply the live path + // would have posted (#22807), and repeating recovery never posts it twice. await db.update(heartbeatRuns).set({ contextSnapshot: { externalChatContinuation: true } }) .where(eq(heartbeatRuns.id, taskRunId)); + expect(await repair()).toBe(true); expect(await repair()).toBe(false); await db.update(heartbeatRuns).set({ contextSnapshot: {} }).where(eq(heartbeatRuns.id, taskRunId)); const work = nativeResponsePresentationWork(db); - const [entry] = await work.load({ companyId: identity.companyId, runId: taskRunId }); - expect(entry?.id).toBe(taskRunId); - expect(await work.check(entry)).toBeNull(); + // The reply is on the task, so the presentation worker has nothing left to recover. + expect(await work.load({ companyId: identity.companyId, runId: taskRunId })).toEqual([]); expect(await repair()).toBe(false); expect(await db.select({ body: issueComments.body }).from(issueComments) .where(eq(issueComments.createdByRunId, taskRunId)).orderBy(asc(issueComments.createdAt)))