Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(e2e): probe the connections chain before asserting the filter\n\nBoth sources-list tests now call composio_list_connections over RPC and\nassert the mock's active set is visible BEFORE asserting the filtered\nlisting -- a broken scan then fails with its real error at the probe\ninstead of downstream as a silently fail-open, unfiltered list. Diagnostic\nby design and worth keeping: the probe pins the exact chain the filter's\ncorrectness depends on.\n

Shanuad6b7375fa2f
diff --git a/tests/json_rpc_e2e.rs b/tests/json_rpc_e2e.rs
index c9cf93be87..a7375ce9c4 100644
--- a/tests/json_rpc_e2e.rs
+++ b/tests/json_rpc_e2e.rs
@@ -13065,6 +13065,23 @@ async fn json_rpc_memory_sources_list_filters_to_active_connections() {
.await;
add_folder_memory_source(&rpc_base, 8804, "My notes", "/tmp/notes").await;
+ // Probe the exact chain the filter depends on FIRST, so a broken scan
+ // fails here with its real error instead of downstream as a silently
+ // fail-open (unfiltered) listing.
+ let probe = post_json_rpc(
+ &rpc_base,
+ 8899,
+ "openhuman.composio_list_connections",
+ json!({}),
+ )
+ .await;
+ let probe_result = assert_no_jsonrpc_error(&probe, "composio_list_connections probe").clone();
+ let probe_text = probe_result.to_string();
+ assert!(
+ probe_text.contains("conn_active_gmail"),
+ "the connections probe must see the mock's active set; got {probe_text}"
+ );
+
let list = post_json_rpc(&rpc_base, 8805, "openhuman.memory_sources_list", json!({})).await;
let result = assert_no_jsonrpc_error(&list, "memory_sources_list").clone();
let sources = memory_sources_from_list(&result);
@@ -13195,6 +13212,23 @@ async fn json_rpc_memory_sources_list_keeps_multiple_active_connections_per_tool
)
.await;
+ // Probe the exact chain the filter depends on FIRST, so a broken scan
+ // fails here with its real error instead of downstream as a silently
+ // fail-open (unfiltered) listing.
+ let probe = post_json_rpc(
+ &rpc_base,
+ 8999,
+ "openhuman.composio_list_connections",
+ json!({}),
+ )
+ .await;
+ let probe_result = assert_no_jsonrpc_error(&probe, "composio_list_connections probe").clone();
+ let probe_text = probe_result.to_string();
+ assert!(
+ probe_text.contains("conn_gmail_one"),
+ "the connections probe must see the mock's active set; got {probe_text}"
+ );
+
let list = post_json_rpc(&rpc_base, 8954, "openhuman.memory_sources_list", json!({})).await;
let result = assert_no_jsonrpc_error(&list, "memory_sources_list").clone();
let sources = memory_sources_from_list(&result);