Lightweight coding agent that runs in your terminal
Rust
Ignore non-JSON files in plugin catalog test helpers (#42126)
willwang-openai7730edf62c16
diff --git a/codex-rs/app-server/tests/suite/v2/plugin_list.rs b/codex-rs/app-server/tests/suite/v2/plugin_list.rsindex 69d19f3bd0..6db74de46e 100644--- a/codex-rs/app-server/tests/suite/v2/plugin_list.rs+++ b/codex-rs/app-server/tests/suite/v2/plugin_list.rs@@ -5134,6 +5134,9 @@ fn cached_remote_catalog_plugin_ids(codex_home: &std::path::Path) -> Result<Vec<let mut plugin_ids = Vec::new();for entry in std::fs::read_dir(cache_dir)? {let path = entry?.path();+ if path.extension().is_none_or(|ext| ext != "json") {+ continue;+ }let cached_catalog: serde_json::Value = serde_json::from_slice(&std::fs::read(path)?)?;let Some(plugins) = cached_catalog["plugins"].as_array() else {continue;@@ -5156,6 +5159,9 @@ fn rewrite_cached_remote_catalog_fetched_at(let cache_dir = codex_home.join("cache/remote_plugin_catalog");for entry in std::fs::read_dir(cache_dir)? {let path = entry?.path();+ if path.extension().is_none_or(|ext| ext != "json") {+ continue;+ }let mut cached_catalog: serde_json::Value = serde_json::from_slice(&std::fs::read(&path)?)?;cached_catalog["fetched_at"] = serde_json::json!(fetched_at);std::fs::write(path, serde_json::to_vec_pretty(&cached_catalog)?)?;