diff --git a/server/src/services/cancelled-native-startup.ts b/server/src/services/cancelled-native-startup.ts index f88c48a006a..d4775d8917d 100644 --- a/server/src/services/cancelled-native-startup.ts +++ b/server/src/services/cancelled-native-startup.ts @@ -48,9 +48,6 @@ export async function isFailedNativePreparationRetryAncestor(db: Db, run: Run, c async function failedNativePreparation(db: Db, run: Run, coordinator: Coordinator | undefined, historicalRetryAncestor: boolean) { if (!historicalRetryAncestor && !coordinator && await isInterruptedNativePreparation(db, run)) return true; const recovery = run.resultJson?.executionRecovery as Record | undefined; - // Older preparers used adapter_failed before provider dispatch. Apply the - // same full stop, host-log and saved-file proof whether that run is the - // latest Retry source or an ancestor behind a never-started recovery turn. const historicalEvidence = historicalRetryAncestor || run.errorCode === "adapter_failed"; const preparationFailure = run.errorCode === "setup_failed" || run.errorCode === "adapter_failed"; if (run.status !== "failed" || !run.finishedAt || run.runtimeMode !== "legacy" || run.runtimeModeResolvedAt diff --git a/server/src/services/saved-work-retry-eligibility.test.ts b/server/src/services/saved-work-retry-eligibility.test.ts index efbbb324ea5..856d6711f78 100644 --- a/server/src/services/saved-work-retry-eligibility.test.ts +++ b/server/src/services/saved-work-retry-eligibility.test.ts @@ -277,7 +277,6 @@ describe("Retry of a task whose saved work recovery settled", () => { it("admits Retry when the latest run is the verified legacy adapter preparation itself", async () => { const f = await sourceUnavailable({ heldRun: false }); - // Occupy the worker so this proves admission without starting a provider. await db.insert(heartbeatRuns).values({ companyId: f.companyId, agentId: f.agentId, status: "running" }); const receipt = await requestTaskRetry({ db, companyId: f.companyId, issueId: f.issueId, actorId, observedRunId: f.preparedId, idempotencyKey: randomUUID(), actorSource: "local_implicit" });