The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
test(composio): isolate anonymous raw coverage
Steven Enamakel0c190b2dd108
diff --git a/scripts/test-rust-with-mock.sh b/scripts/test-rust-with-mock.shindex b607ecec4b..376d77c00b 100755--- a/scripts/test-rust-with-mock.sh+++ b/scripts/test-rust-with-mock.sh@@ -75,11 +75,10 @@ fi# Source of truth: scripts/ci/product-features.txt.PRODUCT_FEATURES="$(bash "$REPO_ROOT/scripts/ci/product-features.sh")"-# The product test surface exercises memory and Composio through their native-# modules. CI builds the pinned submodules and supplies these explicit-# overrides; mirror that setup locally so the full runner never falls back to-# GitHub release metadata (which makes an otherwise hermetic mock-backend suite-# network-bound).+# The product test surface exercises memory through its native module. CI builds+# the pinned submodule and supplies this explicit override; mirror that setup+# locally so the full runner never falls back to GitHub release metadata (which+# makes an otherwise hermetic mock-backend suite network-bound).if [ -z "${TINYMEMORY_TEST_MODULE:-}" ]; thenmemory_manifest="vendor/tinymemory/crates/tinymemory-module/Cargo.toml"memory_module="vendor/tinymemory/crates/tinymemory-module/target/release/libtinymemory_module.so"@@ -90,10 +89,9 @@ fiif [ -z "${TINYCONNECTORS_TEST_MODULE:-}" ]; thenconnectors_manifest="vendor/tinyconnectors/crates/tinyconnectors/Cargo.toml"- connectors_module="vendor/tinyconnectors/target/release/libtinyconnectors.so"+ connectors_module="$REPO_ROOT/vendor/tinyconnectors/target/release/libtinyconnectors.so"echo "Building TinyConnectors test module from the pinned submodule ..."cargo build --release --manifest-path "$connectors_manifest"- export TINYCONNECTORS_TEST_MODULE="$REPO_ROOT/$connectors_module"ficargo_test() {@@ -117,7 +115,15 @@ run_raw_coverage_modules() {while IFS= read -r module; do[ -n "$module" ] || continueecho "[test-rust-with-mock] raw coverage module: ${module}"- cargo_test --test raw_coverage_all -- "${module}::" --test-threads=1 "$@"+ # Most Composio raw-coverage modules explicitly exercise the absent-module+ # path. This one module is the exception: it verifies the host-to-module+ # round trip, so inject the pinned connector only for that process.+ if [ "$module" = "composio_credentials_state_raw_coverage_e2e" ] && [ -z "${TINYCONNECTORS_TEST_MODULE:-}" ]; then+ TINYCONNECTORS_TEST_MODULE="$connectors_module" \+ cargo_test --test raw_coverage_all -- "${module}::" --test-threads=1 "$@"+ else+ cargo_test --test raw_coverage_all -- "${module}::" --test-threads=1 "$@"+ fidone < <(raw_coverage_modules)}diff --git a/tests/raw_coverage/composio_raw_coverage_e2e.rs b/tests/raw_coverage/composio_raw_coverage_e2e.rsindex 47ec552e0b..1cfaffa37b 100644--- a/tests/raw_coverage/composio_raw_coverage_e2e.rs+++ b/tests/raw_coverage/composio_raw_coverage_e2e.rs@@ -449,8 +449,11 @@ fn composio_action_tool_metadata_is_stable_without_network_execution() {#[tokio::test]async fn composio_action_tool_execute_reports_missing_route_without_network() {+ let tmp = tempfile::tempdir().expect("temp config directory");+ let mut config = Config::default();+ config.config_path = tmp.path().join("config.toml");let tool = ComposioActionTool::new(- Arc::new(Config::default()),+ Arc::new(config),"GMAIL_SEND_EMAIL".into(),"Send an email".into(),None,@@ -1161,7 +1164,10 @@ async fn composio_agent_tools_cover_metadata_missing_params_and_scope_helpers()"composio_execute",]);- let no_tools = all_composio_agent_tools(&Config::default());+ let anonymous_config_dir = tempfile::tempdir().expect("anonymous config directory");+ let mut anonymous_config = Config::default();+ anonymous_config.config_path = anonymous_config_dir.path().join("config.toml");+ let no_tools = all_composio_agent_tools(&anonymous_config);assert!(no_tools.is_empty());assert_eq!(