Preserve plugin app manifest order (#25491)

## Summary
- Preserve app declaration order when loading plugin .app.json files.
- Keep plugin connector summaries in plugin app order after connector
metadata is merged and filtered.
- Add regression coverage for .app.json order and connector summary
order.

## Validation
- just fmt
- just test -p codex-chatgpt
connectors_for_plugin_apps_returns_only_requested_plugin_apps
- just test -p codex-core-plugins
effective_apps_preserves_app_config_order
- just fix -p codex-core-plugins (passes with existing clippy
large_enum_variant warning in core-plugins/src/manifest.rs)
- just fix -p codex-chatgpt
- just bazel-lock-update
- just bazel-lock-check
This commit is contained in:
charlesgong-openai authored and GitHub committed 2026-06-01 11:04:21 -07:00
1 parent 6ddb747e76
commit 9756316d89
5 files changed
+63 -15

No files matched your search

@@ -985,6 +985,50 @@ async fn effective_apps_dedupes_connector_ids_across_plugins() {
);
}
#[tokio::test]
async fn effective_apps_preserves_app_config_order() {
let codex_home = TempDir::new().unwrap();
let plugin_root = codex_home
.path()
.join("plugins/cache")
.join("test/sample/local");
write_file(
&plugin_root.join(".codex-plugin/plugin.json"),
r#"{"name":"sample"}"#,
);
write_file(
&plugin_root.join(".app.json"),
r#"{
"apps": {
"slack": {
"id": "connector_slack"
},
"github": {
"id": "connector_github"
},
"slack-copy": {
"id": "connector_slack"
}
}
}"#,
);
let outcome = load_plugins_from_config(
&plugin_config_toml(/*enabled*/ true, /*plugins_feature_enabled*/ true),
codex_home.path(),
)
.await;
assert_eq!(
outcome.effective_apps(),
vec![
AppConnectorId("connector_slack".to_string()),
AppConnectorId("connector_github".to_string()),
]
);
}
#[test]
fn capability_index_filters_inactive_and_zero_capability_plugins() {
let codex_home = TempDir::new().unwrap();