Merge pull request #4111 from jeremymcs/fix/cli-validate-model-duplicate

fix(cli): resolve duplicate validateConfiguredModel import breaking all CI on main
This commit is contained in:
Jeremy McSpadden 2026-04-13 06:40:42 -05:00 committed by GitHub
commit eb7256b818
2 changed files with 24 additions and 2 deletions

View file

@ -16,8 +16,7 @@ import { agentDir, sessionsDir, authFilePath } from './app-paths.js'
import { initResources, buildResourceLoader, getNewerManagedResourceVersion } from './resource-loader.js'
import { ensureManagedTools } from './tool-bootstrap.js'
import { loadStoredEnvKeys } from './wizard.js'
import { migratePiCredentials } from './pi-migration.js'
import { validateConfiguredModel } from './startup-model-validation.js'
import { migratePiCredentials, getPiDefaultModelAndProvider } from './pi-migration.js'
import { shouldMigrateAnthropicToClaudeCode } from './provider-migrations.js'
import { shouldRunOnboarding, runOnboarding } from './onboarding.js'
import chalk from 'chalk'

View file

@ -0,0 +1,23 @@
// GSD-2 — Regression test for pi-migration.ts public exports consumed by cli.ts
//
// Guards against the TS2304 regression introduced by 080c6ac1e where
// src/cli.ts called `getPiDefaultModelAndProvider()` without importing it.
// If the symbol is ever renamed or unexported, this test fails before the
// root `tsc` build breaks every CI job on main.
import { test } from "node:test";
import assert from "node:assert/strict";
import * as piMigration from "../pi-migration.js";
test("pi-migration exports getPiDefaultModelAndProvider for cli.ts fallback-model resolution", () => {
assert.equal(
typeof piMigration.getPiDefaultModelAndProvider,
"function",
"cli.ts validateConfiguredModel relies on this export to pick a fallback model",
);
});
test("pi-migration exports migratePiCredentials for cli.ts startup migration", () => {
assert.equal(typeof piMigration.migratePiCredentials, "function");
});