Merge verified sleep prerequisites into 02b

Co-Authored-By: Paperclip <noreply@paperclip.ing>

* commit '1142e1b3eefae4a174787244794e7750942a4d65':
  test: settle delegated chat completion before plan assertions
This commit is contained in:
DottaandPaperclip committed 2026-10-30 22:12:07 -05:00
commit aa8eb8147c
2 files changed
+7

No files matched your search

+3
View File
@@ -459,12 +459,15 @@ test("plan approval hands the preserved revision to an assigned project task", a
{ timeout: 60_000 },
)
.toBe(1);
// Task completion is delivered back to the chat as another real turn.
await idle(request, f.chatPath, 3);
const task = (
await json(await request.get(`/api/companies/${f.company.id}/issues`))
)[0];
expect(task.parentId).toBeNull();
expect(task.projectId).toBeTruthy();
expect(task.assigneeAgentId).toBe(f.agent.id);
await expect(page.getByText(`Delegated work completed: ${task.identifier}`, { exact: true })).toBeVisible();
const plan = await json(
await request.get(`/api/issues/${task.id}/documents/plan`),
);
+4
View File
@@ -36,6 +36,10 @@ if (!task.conversationAgentId) {
});
process.exit(0);
}
if (ctx.wakeReason === "chat_task_completed") {
await comment(`Delegated work completed: ${ctx.chatCompletionUpdates.map((update) => update.identifier).join(", ")}`);
process.exit(0);
}
const comments = await api(`/issues/${task.id}/comments?order=asc`);
const current =
comments.find((c) => c.id === ctx.wakeCommentId) ??