test: await recovery escalation activity

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip committed 2026-08-23 21:02:51 +00:00
1 parent 98b2a8d0b5
commit ebee3b3b15
1 file changed
+8 -5
@@ -5687,11 +5687,14 @@ describeEmbeddedPostgres("heartbeat orphaned process recovery", () => {
);
expect(recoveryComment).toBeTruthy();
const activity = await db.select().from(activityLog).where(eq(activityLog.entityId, issueId));
expect(activity.some((event) =>
(event.details as Record<string, unknown> | null)?.source ===
"recovery.reconcile_execution_review_participant",
)).toBe(true);
const escalationActivity = await waitForValue(async () => {
const activity = await db.select().from(activityLog).where(eq(activityLog.entityId, issueId));
return activity.find((event) =>
(event.details as Record<string, unknown> | null)?.source ===
"recovery.reconcile_execution_review_participant",
) ?? null;
}, 8_000);
expect(escalationActivity).toBeTruthy();
});
it("blocks failed execution-review recovery under the reviewer when the source assignee differs", async () => {