From 8894520ed0fa47f103a5d5cc3dbd3b541795cf4a Mon Sep 17 00:00:00 2001 From: dotta Date: Wed, 8 Apr 2026 08:29:39 -0500 Subject: [PATCH] comment wake batching test --- .../heartbeat-comment-wake-batching.test.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/server/src/__tests__/heartbeat-comment-wake-batching.test.ts b/server/src/__tests__/heartbeat-comment-wake-batching.test.ts index 5c5d8805..f1b3fbd3 100644 --- a/server/src/__tests__/heartbeat-comment-wake-batching.test.ts +++ b/server/src/__tests__/heartbeat-comment-wake-batching.test.ts @@ -488,6 +488,23 @@ describe("heartbeat comment wake batching", () => { expect(firstRun).not.toBeNull(); await waitFor(() => gateway.getAgentPayloads().length === 1); + const firstPayload = gateway.getAgentPayloads()[0] ?? {}; + expect(firstPayload.paperclip).toMatchObject({ + wake: { + reason: "issue_assigned", + issue: { + id: issueId, + identifier: `${issuePrefix}-1`, + title: "Require a comment", + status: "todo", + priority: "medium", + }, + commentIds: [], + }, + }); + expect(String(firstPayload.message ?? "")).toContain("## Paperclip Wake Payload"); + expect(String(firstPayload.message ?? "")).toContain("Do not switch to another issue until you have handled this wake."); + expect(String(firstPayload.message ?? "")).toContain(`${issuePrefix}-1 Require a comment`); gateway.releaseFirstWait(); await waitFor(async () => { const runs = await db