mirror of
https://github.com/openai/codex.git
synced 2026-11-12 21:20:34 +00:00
Gate plugin recommendation cache warming on feature flags (#60721)
## Why Background plugin cache refreshes fetched recommendations even when plugin recommendations were disabled. ## What changed Pass the effective recommendation feature state into `PluginsConfigInput` and skip recommendation cache warming unless apps, plugins, and either `tool_suggest` or `recommended_plugins` are enabled. Installed-plugin cache refreshes continue independently. Disable `tool_suggest` and `recommended_plugins` by default in core and app-server test helpers, with explicit overrides for recommendation tests. ## Testing Update cache-warming and external-login recommendation tests to opt in explicitly. Update config RPC assertions to verify the test helpers' session flag overrides. GitOrigin-RevId: dc04e2847c94e2b15842fcd95cc0cf1f104e1fac
This commit is contained in:
@@ -17,6 +17,7 @@ use codex_core::config::ConfigBuilder;
|
||||
use codex_core::config::ConfigOverrides;
|
||||
pub use codex_core::test_support::TestCodexResponsesRequestKind;
|
||||
pub use codex_core::test_support::responses_metadata;
|
||||
use codex_features::Feature;
|
||||
use codex_utils_absolute_path::AbsolutePathBuf;
|
||||
pub use codex_utils_absolute_path::test_support::PathBufExt;
|
||||
pub use codex_utils_absolute_path::test_support::PathExt;
|
||||
@@ -213,14 +214,21 @@ pub async fn load_default_config_for_test_with_cloud_config_bundle(
|
||||
codex_home: &TempDir,
|
||||
cloud_config_bundle: CloudConfigBundleLoader,
|
||||
) -> Config {
|
||||
ConfigBuilder::default()
|
||||
let mut config = ConfigBuilder::default()
|
||||
.loader_overrides(LoaderOverrides::without_managed_config_for_tests())
|
||||
.codex_home(codex_home.path().to_path_buf())
|
||||
.harness_overrides(default_test_overrides())
|
||||
.cloud_config_bundle(cloud_config_bundle)
|
||||
.build()
|
||||
.await
|
||||
.expect("defaults for test should always succeed")
|
||||
.expect("defaults for test should always succeed");
|
||||
for feature in [Feature::ToolSuggest, Feature::RecommendedPlugins] {
|
||||
config
|
||||
.features
|
||||
.disable(feature)
|
||||
.expect("test config should allow disabling plugin recommendations");
|
||||
}
|
||||
config
|
||||
}
|
||||
|
||||
pub fn managed_network_requirements_loader() -> CloudConfigBundleLoader {
|
||||
|
||||
Reference in New Issue
Block a user