mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-26 18:31:34 +01:00
test(server): align cancellation batching fixture
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
dd59e3898c
commit
d328f82bd0
1 file changed
+21
@@ -704,8 +704,29 @@ 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,
|
||||
body: "Initial feedback handled before cancellation.",
|
||||
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 queuedComment = await db
|
||||
.insert(issueComments)
|
||||
.values({
|
||||
|
||||
Reference in new issue
Block a user