diff --git a/server/src/services/native-runtime/native-session-executor.test.ts b/server/src/services/native-runtime/native-session-executor.test.ts index d49205ae65b..6357d6ec8c8 100644 --- a/server/src/services/native-runtime/native-session-executor.test.ts +++ b/server/src/services/native-runtime/native-session-executor.test.ts @@ -10488,9 +10488,9 @@ describe("runnerd provider runtime wiring", () => { corrupt: true, accepted: false, }, - ] as const)( - "uses remote prior-run backup when acceptance=$accepted direct=$directLifecycle backup=$backupLifecycle corrupt=$corrupt", - async ({ directLifecycle, backupLifecycle, corrupt, accepted }) => { + ].flatMap(testCase => (["sandbox", "ssh"] as const).map(transport => ({ ...testCase, transport }))))( + "uses $transport prior-run backup when acceptance=$accepted direct=$directLifecycle backup=$backupLifecycle corrupt=$corrupt", + async ({ directLifecycle, backupLifecycle, corrupt, accepted, transport }) => { const priorExecution = scopedNativeExecution("remote-prior-scope"); @@ -10504,7 +10504,10 @@ describe("runnerd provider runtime wiring", () => { const priorRunDb = priorNativeRunDb(priorExecution); const remoteTarget = { kind: "remote" as const, - transport: "sandbox" as const, + transport, + spec: { host: "fixture.invalid", username: "fixture", port: 22, + remoteCwd: "/workspace", remoteWorkspacePath: "/workspace", + privateKey: null, knownHosts: null, strictHostKeyChecking: true }, providerKey: "daytona", leaseId: "environment-lease-remote-prior-scope", remoteCwd: "/home/daytona/paperclip-workspace", diff --git a/server/src/services/native-runtime/native-session-executor.ts b/server/src/services/native-runtime/native-session-executor.ts index b0fb8b56c98..ed860b6eb73 100644 --- a/server/src/services/native-runtime/native-session-executor.ts +++ b/server/src/services/native-runtime/native-session-executor.ts @@ -7729,9 +7729,7 @@ async function executePaperclipNativeSessionWithinScope( retainedTransition = await migrateRunnerdStateRootForExecution({ db: input.db, execution: input.execution, - allowVerifiedBackup: - input.runnerExecutionTarget?.kind === "remote" && - input.runnerExecutionTarget.transport === "sandbox", + allowVerifiedBackup: input.runnerExecutionTarget?.kind === "remote", // A retained warm runner is deliberately still ready rather than // suspended. Only the exact idle in-process owner may rotate that // prior-run authority; after a hard restart the map is empty and the @@ -11198,9 +11196,7 @@ export async function createRunnerdBackend(input: { retainedTransition = await migrateRunnerdStateRootForExecution({ db: input.db, execution: input.execution, - allowVerifiedBackup: - input.runnerExecutionTarget?.kind === "remote" && - input.runnerExecutionTarget.transport === "sandbox", + allowVerifiedBackup: input.runnerExecutionTarget?.kind === "remote", allowRetainedWarmRunner: false, allowLocalRecovery: input.runnerExecutionTarget?.kind !== "remote", onLog: input.onLog,