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 <noreply@anthropic.com>
This commit is contained in:
DottaandClaude Opus 5.5 committed 2026-11-24 18:40:42 -06:00
1 parent 8c04793a4a
commit 19e06f2a42
1 file changed
+5 -3
@@ -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)))