From dd59e3898c9d88e995ecb9f1398c16cbc1444ac1 Mon Sep 17 00:00:00 2001 From: Dotta Date: Sun, 16 Aug 2026 20:38:59 +0000 Subject: [PATCH] test(server): acknowledge feedback in batching fixture Co-Authored-By: Paperclip --- .../heartbeat-comment-wake-batching.test.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/server/src/__tests__/heartbeat-comment-wake-batching.test.ts b/server/src/__tests__/heartbeat-comment-wake-batching.test.ts index 8d02875b265..9f087a58241 100644 --- a/server/src/__tests__/heartbeat-comment-wake-batching.test.ts +++ b/server/src/__tests__/heartbeat-comment-wake-batching.test.ts @@ -490,14 +490,27 @@ describeEmbeddedPostgres("heartbeat comment wake batching", () => { }); expect(firstRun).not.toBeNull(); + if (!firstRun?.wakeupRequestId) throw new Error("Expected first feedback run to retain its wake request"); await waitFor(() => gateway.getAgentPayloads().length === 1); await db.insert(issueComments).values({ companyId, issueId, authorAgentId: agentId, - createdByRunId: firstRun?.id ?? null, + createdByRunId: firstRun.id, body: "Heartbeat acknowledged", + metadata: { + version: 1, + feedbackDisposition: { + kind: "feedback_delivery", + rootWakeupRequestId: firstRun.wakeupRequestId, + handledCommentIds: [comment1.id], + }, + sections: [{ + title: "Feedback disposition", + rows: [{ type: "key_value", label: "Handled comment", value: comment1.id }], + }], + }, }); const comment2 = await db