chore(doctor): format migration tests, keep cron migration helpers module-local

This commit is contained in:
Peter Steinberger
2026-07-16 01:26:04 +01:00
parent 1491977816
commit 9c5eab471c
3 changed files with 6 additions and 5 deletions
@@ -42,7 +42,7 @@ function hasShellToolAccess(toolsAllow: unknown): boolean {
});
}
export type LegacyOpenAICodexCronModelRoute = {
type LegacyOpenAICodexCronModelRoute = {
legacyModelRef: string;
canonicalModelRef: string;
};
@@ -76,7 +76,7 @@ export function collectLegacyOpenAICodexCronModelRoutes(
}
/** Canonical OpenAI refs whose legacy cron shape implied the Codex runtime. */
export function collectLegacyOpenAICodexCronModelRefs(payload: UnknownRecord): string[] {
function collectLegacyOpenAICodexCronModelRefs(payload: UnknownRecord): string[] {
return [
...new Set(
collectLegacyOpenAICodexCronModelRoutes(payload).map((route) => route.canonicalModelRef),
@@ -34,9 +34,9 @@ vi.mock("../../../plugins/installed-plugin-index.js", async (importOriginal) =>
}));
import { legacyCodexProviderIdentityKey } from "./codex-route-model-ref.js";
import { collectBlockedLegacyOpenAICodexProviderPlan } from "./legacy-config-migrations.runtime.models.js";
import { repairCodexSessionStoreRoutes } from "./codex-route-session-repair.test-support.js";
import { collectCodexRouteWarnings, maybeRepairCodexRoutes } from "./codex-route-warnings.js";
import { collectBlockedLegacyOpenAICodexProviderPlan } from "./legacy-config-migrations.runtime.models.js";
describe("collectCodexRouteWarnings", () => {
beforeEach(() => {
@@ -324,8 +324,9 @@ vi.mock("./codex-route-warnings.js", () => ({
async function useRealCodexRouteWarningsOnce(): Promise<void> {
const mocked = await import("./codex-route-warnings.js");
const actual =
await vi.importActual<typeof import("./codex-route-warnings.js")>("./codex-route-warnings.js");
const actual = await vi.importActual<typeof import("./codex-route-warnings.js")>(
"./codex-route-warnings.js",
);
vi.mocked(mocked.collectCodexRouteWarnings).mockImplementationOnce(
actual.collectCodexRouteWarnings,
);