From cb88c7d832bcf6bb96349e6eab9b96e7f63a3f33 Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Sat, 16 May 2026 13:00:00 +0800 Subject: [PATCH] fix(codex): wait for curated migration marketplace --- extensions/codex/src/migration/apply.ts | 3 ++- extensions/codex/src/migration/provider.test.ts | 11 +++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/extensions/codex/src/migration/apply.ts b/extensions/codex/src/migration/apply.ts index 2dfdfaf70859..1fb473a46eee 100644 --- a/extensions/codex/src/migration/apply.ts +++ b/extensions/codex/src/migration/apply.ts @@ -29,6 +29,7 @@ import { resolveCodexAppServerFallbackApiKeyCacheKey, } from "../app-server/auth-bridge.js"; import { + CODEX_PLUGINS_MARKETPLACE_NAME, isCodexPluginsMarketplaceName, readCodexPluginConfig, resolveCodexAppServerRuntimeOptions, @@ -359,7 +360,7 @@ function hasOpenAiCuratedMarketplace(response: unknown): boolean { return false; } const name = (marketplace as { name?: unknown }).name; - return typeof name === "string" && isCodexPluginsMarketplaceName(name); + return name === CODEX_PLUGINS_MARKETPLACE_NAME; }) ); } diff --git a/extensions/codex/src/migration/provider.test.ts b/extensions/codex/src/migration/provider.test.ts index bfab1128fee0..60ccf6771d35 100644 --- a/extensions/codex/src/migration/provider.test.ts +++ b/extensions/codex/src/migration/provider.test.ts @@ -1462,7 +1462,7 @@ describe("buildCodexMigrationProvider", () => { if (method === "plugin/list" && isTarget) { targetPluginListCalls += 1; if (targetPluginListCalls === 1) { - return { marketplaces: [], marketplaceLoadErrors: [], featuredPluginIds: [] }; + return pluginList([], "openai-bundled"); } return pluginList([pluginSummary("google-calendar", { installed: true, enabled: true })]); } @@ -2225,12 +2225,15 @@ function createConfigRuntime( } as unknown as MigrationProviderContext["runtime"]; } -function pluginList(plugins: v2.PluginSummary[]): v2.PluginListResponse { +function pluginList( + plugins: v2.PluginSummary[], + marketplaceName = CODEX_PLUGINS_MARKETPLACE_NAME, +): v2.PluginListResponse { return { marketplaces: [ { - name: CODEX_PLUGINS_MARKETPLACE_NAME, - path: "/marketplaces/openai-curated", + name: marketplaceName, + path: `/marketplaces/${marketplaceName}`, interface: null, plugins, },