From 40ab6898066a9dca41c683c8f48002c1c04a5568 Mon Sep 17 00:00:00 2001 From: Dotta Date: Sat, 12 Sep 2026 14:13:28 -0500 Subject: [PATCH] fix: preserve validated conversation reset during admission recheck Co-Authored-By: Paperclip --- server/src/services/heartbeat.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/server/src/services/heartbeat.ts b/server/src/services/heartbeat.ts index c823c6b7d1..4c67ac4f40 100644 --- a/server/src/services/heartbeat.ts +++ b/server/src/services/heartbeat.ts @@ -26193,9 +26193,11 @@ export function heartbeatService( return { kind: "deferred" as const }; }; const explicitContinuationRunId = randomUUID(); + const executionBlockerOptions = { + conversationResetCommentId: opts.requestedByActorType === "user" ? wakeCommentId : null, + }; const executionBlocker = await getExecutionBlocker( - tx as unknown as Db, issue.companyId, issue.id, - { conversationResetCommentId: opts.requestedByActorType === "user" ? wakeCommentId : null }, + tx as unknown as Db, issue.companyId, issue.id, executionBlockerOptions, ); // Prove eligibility without retiring the hold. Later gates can still // decline this wake; hold retirement and successor creation stay atomic. @@ -26975,7 +26977,7 @@ export function heartbeatService( // Recovery can change while earlier admission gates await I/O. Use // the current blocker, not the snapshot from the start of admission. const remainingExecutionBlocker = await getExecutionBlocker( - tx as unknown as Db, issue.companyId, issue.id, + tx as unknown as Db, issue.companyId, issue.id, executionBlockerOptions, ); // A decision can reject a saved message after cleanup has removed // every recovery blocker; null can also mean no applicable hold to retire.