mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Replace Sites migration state with a runtime compatibility guard (#46108)
## Why Older Desktop clients can still provide bundled Sites to an independently updated SSH app-server. A cached remote Sites install must take precedence, even when disabled, while a missing remote bundle must preserve the bundled fallback. ## What changed - Remove persisted bundled-plugin exclusions, Sites migration checks, and the migration wait when loading local plugin configuration. - Suppress `sites@openai-bundled` during plugin loading when the remote global catalog is active and a cached remote Sites install is available. - Remove exclusion-based catalog filtering and read/install guards, and simplify `install_plugin` to accept `ConfigLayerStack`. ## Testing Expand the agent-turn Sites test to cover enabled remote precedence, disabled remote suppression of bundled Sites, and fallback when the remote bundle is missing. GitOrigin-RevId: e2758596e5493ccee051cdfbf6b4afbe4f98948c
This commit is contained in:
1 parent
77c1feb00e
commit
108e6a6dbe
15 files changed
+41
-727
No files matched your search
@@ -838,8 +838,15 @@ async fn legacy_plugin_skill_prompt_remains_complete() -> Result<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[test_case(true, true, (true, false); "enabled remote supersedes bundled")]
|
||||
#[test_case(false, true, (false, false); "disabled remote does not reactivate bundled")]
|
||||
#[test_case(true, false, (false, true); "missing remote bundle preserves bundled")]
|
||||
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
|
||||
async fn sites_migration_agent_turn_prefers_loadable_remote_sites() -> Result<()> {
|
||||
async fn sites_compatibility_guard_in_agent_turn(
|
||||
remote_enabled: bool,
|
||||
cache_remote_sites: bool,
|
||||
expected_skills: (bool, bool),
|
||||
) -> Result<()> {
|
||||
skip_if_no_network!(Ok(()));
|
||||
let server = start_mock_server().await;
|
||||
let response = mount_sse_once(
|
||||
@@ -863,7 +870,7 @@ async fn sites_migration_agent_turn_prefers_loadable_remote_sites() -> Result<()
|
||||
"description": "Sites",
|
||||
"interface": {},
|
||||
},
|
||||
"enabled": true,
|
||||
"enabled": remote_enabled,
|
||||
}],
|
||||
"pagination": {"next_page_token": null},
|
||||
})))
|
||||
@@ -885,6 +892,9 @@ enabled = true
|
||||
("openai-bundled", "bundled-sites"),
|
||||
("openai-curated-remote", "remote-sites"),
|
||||
] {
|
||||
if marketplace == "openai-curated-remote" && !cache_remote_sites {
|
||||
continue;
|
||||
}
|
||||
let root = codex_home
|
||||
.path()
|
||||
.join(format!("plugins/cache/{marketplace}/sites/local"));
|
||||
@@ -933,7 +943,7 @@ enabled = true
|
||||
developer_text.contains("sites:remote-sites"),
|
||||
developer_text.contains("sites:bundled-sites"),
|
||||
),
|
||||
(true, false),
|
||||
expected_skills,
|
||||
"unexpected Sites skills in developer prompt: {developer_text:?}"
|
||||
);
|
||||
Ok(())
|
||||
|
||||
Reference in new issue
Block a user