refactor(gateway): remove stale restart sentinel wake predicate

This commit is contained in:
Vincent Koc
2026-06-19 02:53:35 +08:00
parent f381dca15b
commit 8f8162704d
2 changed files with 0 additions and 8 deletions

View File

@@ -646,10 +646,6 @@ export async function scheduleRestartSentinelWake(params: { deps: CliDeps }) {
await scheduleRestartSentinelWakeAttempt({ ...params, attempt: 0 });
}
export function shouldWakeFromRestartSentinel() {
return !process.env.VITEST && process.env.NODE_ENV !== "test";
}
export async function refreshLatestUpdateRestartSentinel(): Promise<RestartSentinelPayload | null> {
const current = await readRestartSentinel();
if (

View File

@@ -38,7 +38,6 @@ const hoisted = vi.hoisted(() => {
skipped: 0,
}));
const scheduleRestartAbortedMainSessionRecovery = vi.fn();
const shouldWakeFromRestartSentinel = vi.fn(() => false);
const scheduleRestartSentinelWake = vi.fn();
const refreshLatestUpdateRestartSentinel = vi.fn<
typeof import("./server-restart-sentinel.js").refreshLatestUpdateRestartSentinel
@@ -91,7 +90,6 @@ const hoisted = vi.hoisted(() => {
markStartupOrphanedMainSessionsForRecovery,
recoverStartupOrphanedMainSessions,
scheduleRestartAbortedMainSessionRecovery,
shouldWakeFromRestartSentinel,
scheduleRestartSentinelWake,
refreshLatestUpdateRestartSentinel,
getAcpRuntimeBackend,
@@ -177,7 +175,6 @@ vi.mock("../acp/runtime/registry.js", () => ({
vi.mock("./server-restart-sentinel.js", () => ({
refreshLatestUpdateRestartSentinel: hoisted.refreshLatestUpdateRestartSentinel,
scheduleRestartSentinelWake: hoisted.scheduleRestartSentinelWake,
shouldWakeFromRestartSentinel: hoisted.shouldWakeFromRestartSentinel,
}));
vi.mock("./server-startup-memory.js", () => ({
@@ -327,7 +324,6 @@ describe("startGatewayPostAttachRuntime", () => {
skipped: 0,
});
hoisted.scheduleRestartAbortedMainSessionRecovery.mockClear();
hoisted.shouldWakeFromRestartSentinel.mockReturnValue(false);
hoisted.scheduleRestartSentinelWake.mockClear();
hoisted.getAcpRuntimeBackend.mockReset();
hoisted.getAcpRuntimeBackend.mockReturnValue(null);