mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
[codex] Skip local curated discovery for remote plugins (#27311)
## Summary - skip the local `openai-curated` marketplace before marketplace loading when tool-suggest discovery uses remote plugins - preserve existing marketplace listing behavior for all other callers and when remote plugins are disabled - add regression coverage proving the curated marketplace is excluded before its malformed manifest can be read ## Why Tool-suggest discovery previously loaded every local `openai-curated` plugin manifest and only discarded that marketplace afterward when remote plugins were enabled. The remote catalog is used in that mode, so the local scan consumed CPU without contributing discoverable plugins. ## Impact Remote-plugin tool suggestion discovery no longer reads the local curated marketplace and its plugin manifests. `openai-bundled`, configured marketplaces, normal `plugin/list` behavior, and local curated discovery when remote plugins are disabled are unchanged. ## Validation - `just test -p codex-core-plugins list_marketplaces_can_skip_openai_curated_before_loading` - `just test -p codex-core list_tool_suggest_discoverable_plugins_omits_openai_curated_when_remote_enabled` - `just fmt` - `git diff --check`
This commit is contained in:
committed by
GitHub
Unverified
parent
b4445f2758
commit
7011044c1c
@@ -87,7 +87,11 @@ impl PluginsManager {
|
||||
}
|
||||
|
||||
let marketplaces = self
|
||||
.list_marketplaces_for_config(&input.plugins, &[])
|
||||
.list_marketplaces_for_config(
|
||||
&input.plugins,
|
||||
&[],
|
||||
/*include_openai_curated*/ !input.plugins.remote_plugin_enabled,
|
||||
)
|
||||
.context("failed to list plugin marketplaces for tool suggestions")?
|
||||
.marketplaces;
|
||||
let mut installed_app_connector_ids = self
|
||||
@@ -110,11 +114,6 @@ impl PluginsManager {
|
||||
let mut discoverable_plugins = Vec::<ToolSuggestDiscoverablePlugin>::new();
|
||||
for marketplace in marketplaces {
|
||||
let marketplace_name = marketplace.name;
|
||||
if input.plugins.remote_plugin_enabled
|
||||
&& marketplace_name == OPENAI_CURATED_MARKETPLACE_NAME
|
||||
{
|
||||
continue;
|
||||
}
|
||||
let use_legacy_local_curated_filter = should_use_legacy_local_curated_discovery_filter(
|
||||
&marketplace_name,
|
||||
marketplace.path.as_path(),
|
||||
|
||||
Reference in New Issue
Block a user