Wait for local plugin cache refreshes in plugin/list (#34877)

## What changed

- Make `plugin/list` requests with `forceRefetch: true` wait for configured
  local plugin caches to finish reconciling before building the response.
- Track marketplace plugin sources when deduplicating refreshes so source
  changes can trigger a reinstall even when the plugin version is unchanged.
- Notify effective-plugin consumers when the awaited refresh changes the cache.

## Testing

Added coverage showing that a forced local plugin listing returns an upgraded
plugin from the same marketplace path only after the new version is installed
and the superseded cache entry is removed.

GitOrigin-RevId: c1b59f3be6cc19dac8db39aaea548ddf8e342f1d
This commit is contained in:
Cam moten authored and copyberry committed 2026-07-23 05:38:12 +00:00
1 parent 44d76c6a6d
commit 4e0cee8030
4 files changed
+256 -16

No files matched your search

@@ -571,6 +571,14 @@ impl PluginRequestProcessor {
let auth_mode = auth.as_ref().map(CodexAuth::api_auth_mode);
plugins_manager.set_auth_mode(auth_mode);
let plugins_input = config.plugins_config_input();
if include_local
&& force_refetch
&& plugins_manager
.refresh_non_curated_plugin_cache_for_config(&plugins_input, &roots)
.await
{
self.on_effective_plugins_changed();
}
let include_shared_with_me =
marketplace_kinds.contains(&PluginListMarketplaceKind::SharedWithMe);
let include_created_by_me_remote = marketplace_kinds