Lightweight coding agent that runs in your terminal
Rust
fix: disable plugins in SDK integration tests (#16036)
Michael Bolin95845cf6ceb8
diff --git a/sdk/typescript/tests/testCodex.ts b/sdk/typescript/tests/testCodex.tsindex d73b519b65..a4cac8b143 100644--- a/sdk/typescript/tests/testCodex.ts+++ b/sdk/typescript/tests/testCodex.ts@@ -44,33 +44,43 @@ export function createTestClient(options: CreateTestClientOptions = {}): TestClicodexPathOverride: codexExecPath,baseUrl: options.baseUrl,apiKey: options.apiKey,- config: mergeTestProviderConfig(options.baseUrl, options.config),+ config: mergeTestConfig(options.baseUrl, options.config),env,}),};}-function mergeTestProviderConfig(+function mergeTestConfig(baseUrl: string | undefined,config: CodexConfigObject | undefined,): CodexConfigObject | undefined {- if (!baseUrl || hasExplicitProviderConfig(config)) {- return config;- }+ const mergedConfig: CodexConfigObject | undefined =+ !baseUrl || hasExplicitProviderConfig(config)+ ? config+ : {+ ...config,+ // Built-in providers are merged before user config, so tests need a+ // custom provider entry to force SSE against the local mock server.+ model_provider: "mock",+ model_providers: {+ mock: {+ name: "Mock provider for test",+ base_url: baseUrl,+ wire_api: "responses",+ supports_websockets: false,+ },+ },+ };+ const featureOverrides = mergedConfig?.features;- // Built-in providers are merged before user config, so tests need a custom- // provider entry to force SSE against the local mock server.return {- ...config,- model_provider: "mock",- model_providers: {- mock: {- name: "Mock provider for test",- base_url: baseUrl,- wire_api: "responses",- supports_websockets: false,- },- },+ ...mergedConfig,+ // Disable plugins in SDK integration tests so background curated-plugin+ // sync does not race temp CODEX_HOME cleanup.+ features:+ featureOverrides && typeof featureOverrides === "object" && !Array.isArray(featureOverrides)+ ? { ...featureOverrides, plugins: false }+ : { plugins: false },};}