mirror of
https://github.com/openai/codex.git
synced 2026-11-15 21:50:46 +00:00
Prefer remote Sites over the bundled plugin (#42100)
## Why When the remote Sites plugin is installed and its local bundle is available, exposing the bundled copy as well creates duplicate catalog entries and can load the wrong skills. ## What changed - Persist an account- and backend-scoped exclusion for `sites@openai-bundled` once the remote replacement is installed and loadable. - Apply the exclusion to plugin catalogs, search, direct reads and installs, runtime loading, hooks, and skill caches while preserving the remote plugin's server-owned enabled state. - Restore the bundled fallback when the remote plugin is absent or its local files are unavailable, and throttle repeated availability checks for 60 seconds. ## Testing - Added manager tests for persistence across restarts, account/backend isolation, fallback restoration, concurrent checks, and refresh throttling. - Added app-server and agent-turn tests confirming that catalog, search, and skill loading prefer remote Sites. GitOrigin-RevId: bc1154f79d3107910fee9fa27389a0ddb48ce6cf
This commit is contained in:
@@ -12,14 +12,30 @@ impl PluginRequestProcessor {
|
||||
&self,
|
||||
cwds: &[AbsolutePathBuf],
|
||||
) -> Result<Config, JSONRPCErrorError> {
|
||||
if cwds.is_empty() {
|
||||
let config = if cwds.is_empty() {
|
||||
self.config_manager
|
||||
.load_non_project_config()
|
||||
.await
|
||||
.map_err(|err| internal_error(format!("failed to reload config: {err}")))
|
||||
} else {
|
||||
self.load_latest_config(/*fallback_cwd*/ None).await
|
||||
}?;
|
||||
// TODO(sites-migration): Remove this initial migration wait after bundled Sites is retired.
|
||||
let auth = self.auth_manager.auth().await;
|
||||
match Box::pin(
|
||||
self.thread_manager
|
||||
.plugins_manager()
|
||||
.ensure_sites_migration_ready(&config.plugins_config_input(), auth.as_ref()),
|
||||
)
|
||||
.await
|
||||
{
|
||||
Ok(Some(change)) => (self.effective_plugins_changed_callback())(change),
|
||||
Ok(None) => {}
|
||||
Err(err) => {
|
||||
warn!(error = %err, "Sites migration refresh failed; preserving local plugins")
|
||||
}
|
||||
}
|
||||
Ok(config)
|
||||
}
|
||||
|
||||
pub(super) async fn load_marketplace_context(
|
||||
|
||||
Reference in New Issue
Block a user