Keep blocked issue wakes idle until dependencies resolve

This commit is contained in:
Dotta committed 2026-04-21 14:55:23 -05:00
1 parent 3c0b2f9858
commit d98c7a3c3a
1 file changed
+8
@@ -267,6 +267,14 @@ describeEmbeddedPostgres("heartbeat dependency-aware queued run selection", () =
dependencyBlockedInteraction: true,
unresolvedBlockerIssueIds: [blockerId],
});
expect(blockedWakeRequest).toBe(true);
const blockedRunsBeforeResolution = await db
.select({ count: sql<number>`count(*)::int` })
.from(heartbeatRuns)
.where(sql`${heartbeatRuns.contextSnapshot} ->> 'issueId' = ${blockedIssueId}`)
.then((rows) => rows[0]?.count ?? 0);
expect(blockedRunsBeforeResolution).toBe(0);
const readyWake = await heartbeat.wakeup(agentId, {
source: "assignment",