From ef8eb8bdd9c324d1b1afdf581f66511755e5c64c Mon Sep 17 00:00:00 2001 From: jif Date: Tue, 16 Jun 2026 12:07:43 +0100 Subject: [PATCH] [tests] Keep Apps out of generic core test harness (#28508) ## Summary - disable the stable Apps feature in the generic `test_codex()` integration-test harness - keep Apps-specific tests explicit: their builders re-enable Apps and point it at a local mock server ## Why Generic tests that use dummy ChatGPT auth were also enabling the host-owned `codex_apps` MCP server. That made unrelated tests contact `chatgpt.com` and wait for MCP startup, causing the Bazel timeouts observed on #28368. The generic harness should be hermetic and should not start an external service that the test did not request. This is test-only; production Apps behavior is unchanged. The broader optional-MCP startup behavior is being handled separately in #28407. ## Testing - `just test -p codex-core -E 'test(pre_sampling_compact_runs_when_comp_hash_changes) | test(model_switch_to_smaller_model_updates_token_context_window) | test(codex_apps_file_params_upload_local_paths_before_mcp_tool_call)'` - `just fix -p codex-core` - `just fmt` --- codex-rs/core/tests/common/test_codex.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/codex-rs/core/tests/common/test_codex.rs b/codex-rs/core/tests/common/test_codex.rs index bdac7fddc..daf6f79b5 100644 --- a/codex-rs/core/tests/common/test_codex.rs +++ b/codex-rs/core/tests/common/test_codex.rs @@ -28,6 +28,7 @@ use codex_extension_api::ExtensionRegistry; use codex_extension_api::LoadUserInstructionsFuture; use codex_extension_api::UserInstructionsProvider; use codex_extension_api::empty_extension_registry; +use codex_features::Feature; use codex_home::CodexHomeUserInstructionsProvider; use codex_login::CodexAuth; use codex_model_provider_info::ModelProviderInfo; @@ -1127,7 +1128,12 @@ fn function_call_output<'a>(bodies: &'a [Value], call_id: &str) -> &'a Value { pub fn test_codex() -> TestCodexBuilder { TestCodexBuilder { - config_mutators: vec![], + config_mutators: vec![Box::new(|config| { + config + .features + .disable(Feature::Apps) + .expect("test config should allow Apps override"); + })], auth: CodexAuth::from_api_key("dummy"), pre_build_hooks: vec![], workspace_setups: vec![],