fix: preserve authoritative warm computers during orphan lease sweep

This commit is contained in:
Dotta committed 2026-10-11 03:00:55 -05:00
1 parent 8198c9a571
commit d14578ad13
4 files changed
+160 -16

No files matched your search

@@ -1,6 +1,7 @@
import { randomUUID } from "node:crypto";
import type { ComputerRepository, ComputerBackend } from "./ports.js";
import {
COMPUTER_RETIREMENT_GRACE_MS as RETIREMENT_GRACE_MS,
ComputerError,
ComputerStopPendingError,
assertAdmission,
@@ -25,8 +26,6 @@ class ComputerSessionBusyError extends ComputerError {
}
}
// This is shutdown time only; admission and ordinary work stop at the warm deadline.
const RETIREMENT_GRACE_MS = 30_000;
const FILE_OPERATION_BUDGET_MS = 120_000;
const FILE_OPERATION_SETTLEMENT_MS = 5000;
type Scope = { companyId: string; environmentId: string };
@@ -1,3 +1,6 @@
/** Shutdown only; ordinary work remains fenced at the warm deadline. */
export const COMPUTER_RETIREMENT_GRACE_MS = 30_000;
export type OwnerRef = {
computerId: string;
ownerId: string;