[codex] fetch featured IDs for remote plugins (#29485)

## Summary

- fetch featured plugin IDs when the loaded catalog includes
`openai-curated-remote`
- extend the existing remote marketplace regression test to cover the
featured IDs response

## Why

When the remote plugin catalog was enabled, app-server loaded
`openai-curated-remote` but skipped `/plugins/featured` because the
request processor only fetched featured IDs for the local
`openai-curated` marketplace. As a result, the desktop app could not
render the backend-curated remote featured set.

This keeps the existing local behavior and also returns the curated
ranking for remote plugins.

## Test plan

- `just fmt`
- `git diff --check`
- `just test -p codex-app-server
plugin_list_includes_remote_marketplaces_when_remote_plugin_enabled`
This commit is contained in:
Eric Ning
2026-06-22 15:08:59 -07:00
committed by GitHub
Unverified
parent ff37f4a6ef
commit bf7148626b
2 changed files with 16 additions and 6 deletions
@@ -745,11 +745,10 @@ impl PluginRequestProcessor {
);
}
let featured_plugin_ids = if !plugins_input.remote_plugin_enabled
&& data
.iter()
.any(|marketplace| marketplace.name == OPENAI_CURATED_MARKETPLACE_NAME)
{
let featured_plugin_ids = if data.iter().any(|marketplace| {
marketplace.name == OPENAI_CURATED_MARKETPLACE_NAME
|| marketplace.name == REMOTE_GLOBAL_MARKETPLACE_NAME
}) {
match plugins_manager
.featured_plugin_ids_for_config(&plugins_input, auth.as_ref())
.await
@@ -1761,6 +1761,14 @@ async fn plugin_list_includes_remote_marketplaces_when_remote_plugin_enabled() -
.respond_with(ResponseTemplate::new(200).set_body_string(empty_page_body))
.mount(&server)
.await;
Mock::given(method("GET"))
.and(path("/backend-api/plugins/featured"))
.and(query_param("platform", "codex"))
.respond_with(
ResponseTemplate::new(200).set_body_string(r#"["linear@openai-curated-remote"]"#),
)
.mount(&server)
.await;
let mut mcp = TestAppServer::new(codex_home.path()).await?;
timeout(DEFAULT_TIMEOUT, mcp.initialize()).await??;
@@ -1854,7 +1862,10 @@ async fn plugin_list_includes_remote_marketplaces_when_remote_plugin_enabled() -
cached_plugin_ids,
vec!["plugins~Plugin_00000000000000000000000000000000".to_string()]
);
assert_eq!(response.featured_plugin_ids, Vec::<String>::new());
assert_eq!(
response.featured_plugin_ids,
vec!["linear@openai-curated-remote".to_string()]
);
assert!(
!server
.received_requests()