From f941a5fb927b429e2575cf32da8b27472255683a Mon Sep 17 00:00:00 2001 From: Alex Zamoshchin Date: Fri, 13 Nov 2026 21:21:58 +0000 Subject: [PATCH] Add optional release IDs to cloud plugin source locations (#61393) ## What changed Add `release_id: Option` to `PluginSourceLocation::Cloud` to carry the opaque release ID selected by the cloud catalog for a plugin declaration. Update catalog and discovery test fixtures to supply the new field, including a populated release ID in catalog reconciliation tests. GitOrigin-RevId: 1d60e25bd5fb8efd84e6e825305ad68b847fc1ee --- codex-rs/core-plugins/src/catalog.rs | 2 ++ codex-rs/core-plugins/src/catalog_tests.rs | 1 + codex-rs/core/tests/suite/executor_discovery_v2.rs | 1 + codex-rs/ext/mcp/src/cloud_plugin_tests.rs | 1 + codex-rs/ext/mcp/src/plugin/discovery_tests.rs | 1 + codex-rs/ext/mcp/src/plugin_contributor_state_tests.rs | 1 + codex-rs/ext/mcp/tests/plugin_mcp.rs | 1 + 7 files changed, 8 insertions(+) diff --git a/codex-rs/core-plugins/src/catalog.rs b/codex-rs/core-plugins/src/catalog.rs index 06f847c390..9ec181a16e 100644 --- a/codex-rs/core-plugins/src/catalog.rs +++ b/codex-rs/core-plugins/src/catalog.rs @@ -77,6 +77,8 @@ pub enum PluginSourceLocation { Cloud { resource_uri: String, bundle_uri: Option, + /// Opaque release ID selected by the cloud catalog for this declaration. + release_id: Option, }, Executor { /// Executor environment that owns `root`. diff --git a/codex-rs/core-plugins/src/catalog_tests.rs b/codex-rs/core-plugins/src/catalog_tests.rs index 81ec37636e..fe9bdc7e32 100644 --- a/codex-rs/core-plugins/src/catalog_tests.rs +++ b/codex-rs/core-plugins/src/catalog_tests.rs @@ -25,6 +25,7 @@ fn cloud_plugin(remote_id: &str) -> PluginCatalogEntry { locations: vec![PluginSourceLocation::Cloud { resource_uri: format!("plugin://{remote_id}"), bundle_uri: None, + release_id: Some("release-1".to_string()), }], } } diff --git a/codex-rs/core/tests/suite/executor_discovery_v2.rs b/codex-rs/core/tests/suite/executor_discovery_v2.rs index 36b1a040ed..96e0c40096 100644 --- a/codex-rs/core/tests/suite/executor_discovery_v2.rs +++ b/codex-rs/core/tests/suite/executor_discovery_v2.rs @@ -1155,6 +1155,7 @@ impl PluginProvider for Cloud { locations: vec![PluginSourceLocation::Cloud { resource_uri: "plugin://plugin_demo".into(), bundle_uri: None, + release_id: None, }], }] }, diff --git a/codex-rs/ext/mcp/src/cloud_plugin_tests.rs b/codex-rs/ext/mcp/src/cloud_plugin_tests.rs index 72c4d20731..f06cb95298 100644 --- a/codex-rs/ext/mcp/src/cloud_plugin_tests.rs +++ b/codex-rs/ext/mcp/src/cloud_plugin_tests.rs @@ -458,6 +458,7 @@ fn cloud_catalog() -> PluginCatalog { locations: vec![codex_core_plugins::PluginSourceLocation::Cloud { resource_uri: "plugin://plugin_remote".to_string(), bundle_uri: None, + release_id: None, }], }], ..Default::default() diff --git a/codex-rs/ext/mcp/src/plugin/discovery_tests.rs b/codex-rs/ext/mcp/src/plugin/discovery_tests.rs index 9509150baa..43b00b3b99 100644 --- a/codex-rs/ext/mcp/src/plugin/discovery_tests.rs +++ b/codex-rs/ext/mcp/src/plugin/discovery_tests.rs @@ -33,6 +33,7 @@ async fn merged_mcp_declarations_require_an_executor_location() -> anyhow::Resul locations: vec![PluginSourceLocation::Cloud { resource_uri: "plugin://plugin_example".to_string(), bundle_uri: None, + release_id: None, }], }; let projections = v2_metadata_from_catalog(&entry, &config.features); diff --git a/codex-rs/ext/mcp/src/plugin_contributor_state_tests.rs b/codex-rs/ext/mcp/src/plugin_contributor_state_tests.rs index a594e6ab1c..b232892b99 100644 --- a/codex-rs/ext/mcp/src/plugin_contributor_state_tests.rs +++ b/codex-rs/ext/mcp/src/plugin_contributor_state_tests.rs @@ -75,6 +75,7 @@ fn cloud_plugin(remote_id: &str) -> PluginCatalogEntry { locations: vec![PluginSourceLocation::Cloud { resource_uri: format!("plugin://{remote_id}"), bundle_uri: None, + release_id: None, }], } } diff --git a/codex-rs/ext/mcp/tests/plugin_mcp.rs b/codex-rs/ext/mcp/tests/plugin_mcp.rs index adf42e03f9..d30177ace6 100644 --- a/codex-rs/ext/mcp/tests/plugin_mcp.rs +++ b/codex-rs/ext/mcp/tests/plugin_mcp.rs @@ -768,6 +768,7 @@ async fn run_cloud_plugin_projection_scenarios() -> anyhow::Result<()> { locations: vec![PluginSourceLocation::Cloud { resource_uri: "plugin://plugin_notes".into(), bundle_uri: None, + release_id: None, }], }], ..Default::default()