From 1c525c7fe0dda1dbecef8369137e3f8a09555eb7 Mon Sep 17 00:00:00 2001 From: Dotta Date: Sat, 12 Sep 2026 13:50:12 -0500 Subject: [PATCH] test: use cancellation-created recovery hold Co-Authored-By: Paperclip --- server/src/__tests__/heartbeat-process-recovery.test.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/server/src/__tests__/heartbeat-process-recovery.test.ts b/server/src/__tests__/heartbeat-process-recovery.test.ts index b8ab5fb763..c796cc28e9 100644 --- a/server/src/__tests__/heartbeat-process-recovery.test.ts +++ b/server/src/__tests__/heartbeat-process-recovery.test.ts @@ -2705,12 +2705,10 @@ describeEmbeddedPostgres("heartbeat orphaned process recovery", () => { expect(failedSave).toMatchObject({ state: "failed", error: "Injected storage outage" }); expect(failedSave.manifest.finalCheckpointAt).toBeUndefined(); - // Model the recovery hold recorded for this unfinished cleanup, then - // keep the agent occupied so resumption can be inspected without ever + // Cancellation already records a recovery hold for unfinished cleanup. + // Keep the agent occupied so resumption can be inspected without ever // starting a provider or running another heartbeat teardown. - await db.insert(issueRecoveryActions).values({ companyId, sourceIssueId: issueId, kind: "active_run_watchdog", - cause: "uncertain_external_action", fingerprint: `cancel-save-${runId}`, status: "active", - nextAction: "Recover the retained workspace", evidence: { runId } }); + expect(await getExecutionBlocker(db, companyId, issueId)).toMatchObject({ runId }); busyRunId = randomUUID(); await db.insert(heartbeatRuns).values({ id: busyRunId, companyId, agentId, status: "running", processPid: process.pid }); const commentId = randomUUID();