Fix plugin manager CI failures

This commit is contained in:
xli-oai
2026-04-29 22:48:24 -07:00
parent 110a381d6a
commit bd3f4edd48
5 changed files with 25 additions and 8 deletions

View File

@@ -1186,13 +1186,23 @@ async fn app_server_startup_refreshes_remote_installed_cache_each_process() -> R
{
let mut mcp = McpProcess::new_with_plugin_startup_tasks(codex_home.path()).await?;
timeout(DEFAULT_TIMEOUT, mcp.initialize()).await??;
wait_for_remote_plugin_request_count(&server, "/ps/plugins/installed", 2).await?;
wait_for_remote_plugin_request_count(
&server,
"/ps/plugins/installed",
/*expected_count*/ 2,
)
.await?;
}
{
let mut mcp = McpProcess::new_with_plugin_startup_tasks(codex_home.path()).await?;
timeout(DEFAULT_TIMEOUT, mcp.initialize()).await??;
wait_for_remote_plugin_request_count(&server, "/ps/plugins/installed", 4).await?;
wait_for_remote_plugin_request_count(
&server,
"/ps/plugins/installed",
/*expected_count*/ 4,
)
.await?;
}
Ok(())

View File

@@ -200,8 +200,10 @@ async fn skills_list_loads_remote_installed_plugin_skills_from_cache() -> Result
"installation_policy": "AVAILABLE",
"authentication_policy": "ON_USE",
"release": {
"version": "local",
"display_name": "Linear",
"description": "Track work in Linear",
"bundle_download_url": "https://example.com/linear.tar.gz",
"app_ids": [],
"interface": {},
"skills": []
@@ -222,8 +224,10 @@ async fn skills_list_loads_remote_installed_plugin_skills_from_cache() -> Result
"installation_policy": "AVAILABLE",
"authentication_policy": "ON_USE",
"release": {
"version": "local",
"display_name": "Linear",
"description": "Track work in Linear",
"bundle_download_url": "https://example.com/linear.tar.gz",
"app_ids": [],
"interface": {},
"skills": []

View File

@@ -102,7 +102,7 @@ enabled = true
)?;
ConfigEditsBuilder::new(&codex_home)
.set_plugin_enabled("linear@openai-curated", true)
.set_plugin_enabled("linear@openai-curated", /*enabled*/ true)
.clear_plugin("gmail@openai-curated")
.apply()
.await?;

View File

@@ -1058,7 +1058,8 @@ impl PluginsManager {
if current_enabled != Some(true) {
result.enabled_plugin_ids.push(plugin_key.clone());
config_edits = config_edits.set_plugin_enabled(&plugin_key, true);
config_edits =
config_edits.set_plugin_enabled(&plugin_key, /*enabled*/ true);
has_config_edits = true;
}
} else if !additive_only {

View File

@@ -786,7 +786,9 @@ remote_plugin = true
let server = MockServer::start().await;
mount_remote_installed_plugin_pages(
&server,
&remote_installed_plugin_json_with_release("linear", true, "2.0.0", None),
&remote_installed_plugin_json_with_release(
"linear", /*enabled*/ true, "2.0.0", /*bundle_download_url*/ None,
),
"",
)
.await;
@@ -836,8 +838,8 @@ remote_plugin = true
&server,
&format!(
"{},\n{}",
remote_installed_plugin_json("linear", true),
remote_installed_plugin_json("gmail", false)
remote_installed_plugin_json("linear", /*enabled*/ true),
remote_installed_plugin_json("gmail", /*enabled*/ false)
),
"",
)
@@ -938,7 +940,7 @@ async fn remote_installed_plugins_cache_refresh_clears_stale_cache_when_auth_is_
notification_count_for_callback.fetch_add(1, Ordering::SeqCst);
})),
);
wait_for_counter(&notification_count, 1).await;
wait_for_counter(&notification_count, /*expected*/ 1).await;
let outcome = manager
.plugins_for_config(