fix: dedupe board-owned blocker recovery notice

Co-authored-by: Paperclip <noreply@paperclip.ing>
This commit is contained in:
Nicky LeachandPaperclip committed 2026-07-13 20:57:44 +00:00
1 parent 69dcb5039f
commit bea361bc08
2 files changed
+16

No files matched your search

@@ -4539,6 +4539,9 @@ describeEmbeddedPostgres("heartbeat orphaned process recovery", () => {
expect(result.orphanBlockersAssigned).toBe(0);
const repeatResult = await heartbeat.reconcileStrandedAssignedIssues();
expect(repeatResult.orphanBlockersAssigned).toBe(0);
const blocker = await db
.select()
.from(issues)
@@ -4547,6 +4550,7 @@ describeEmbeddedPostgres("heartbeat orphaned process recovery", () => {
expect(blocker?.assigneeAgentId).toBeNull();
const comments = await db.select().from(issueComments).where(eq(issueComments.issueId, blockerIssueId));
expect(comments).toHaveLength(1);
expect(comments[0]?.body).toContain("Board-Owned Blocker");
expect(comments[0]?.body).toContain("responsibleUserId");
+12
View File
@@ -969,6 +969,18 @@ export function recoveryService(db: Db, deps: { enqueueWakeup: RecoveryWakeup })
const relations = await issuesSvc.getRelationSummaries(candidate.id);
const blockingLinks = formatIssueLinksForComment(relations.blocks);
if (candidate.responsibleUserId != null) {
const lastComment = await db
.select({ body: issueComments.body })
.from(issueComments)
.where(eq(issueComments.issueId, candidate.id))
.orderBy(desc(issueComments.createdAt), desc(issueComments.id))
.limit(1)
.then((rows) => rows[0] ?? null);
if (lastComment?.body.includes("Board-Owned Blocker")) {
skipped += 1;
continue;
}
await issuesSvc.addComment(
candidate.id,
[