Skip to content

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

chore(composio): tidy flow gate test module placement and formatting

Steven Enamakel6b7f35c6a138
diff --git a/crates/openhuman-core/src/integrations/composio/flow_gate.rs b/crates/openhuman-core/src/integrations/composio/flow_gate.rs
index d46c6dd081..9f6106884f 100644
--- a/crates/openhuman-core/src/integrations/composio/flow_gate.rs
+++ b/crates/openhuman-core/src/integrations/composio/flow_gate.rs
@@ -194,10 +194,6 @@ pub(crate) async fn preflight_composio_args(
Err(format!("tool_call `{slug}`: required arg(s) {list} missing or resolved to null — wire each from an upstream node's output, e.g. \"{first}\": \"=nodes.<node_id>.item.json.<field>\" (drop `.json` only if `<node_id>` is a code/transform/split_out/merge/trigger node — `agent`/`tool_call`/`http_request` nodes wrap their output in a `{{json,text,raw}}` envelope). If the value comes from an agent node, give that agent an output schema (config.output_parser.schema) so its fields are addressable."))
}
-#[cfg(test)]
-#[path = "flow_gate_tests.rs"]
-mod tests;
-
/// Converts a provider-side unsuccessful execution response into a policy error.
pub(crate) fn reject_unsuccessful_composio_response(
slug: &str,
@@ -216,3 +212,7 @@ pub(crate) fn reject_unsuccessful_composio_response(
"tool_call `{slug}` failed at the connected provider: {detail}"
))
}
+
+#[cfg(test)]
+#[path = "flow_gate_tests.rs"]
+mod tests;
diff --git a/crates/openhuman-core/src/integrations/composio/flow_gate_tests.rs b/crates/openhuman-core/src/integrations/composio/flow_gate_tests.rs
index b7363f20a4..34812f3923 100644
--- a/crates/openhuman-core/src/integrations/composio/flow_gate_tests.rs
+++ b/crates/openhuman-core/src/integrations/composio/flow_gate_tests.rs
@@ -284,7 +284,6 @@ async fn connected_uncatalogued_toolkit_rejects_a_hallucinated_slug() {
);
}
-
/// Unit coverage of the classifier itself, independent of the gate: a
/// curated Read entry classifies as `Read`; curated Write/Admin entries,
/// an uncurated toolkit, and an unparseable/empty slug all classify as
@@ -309,13 +308,9 @@ fn classify_composio_action_for_tier_matches_curated_scope_fail_safe() {
CommandClass::Network
);
// Unparseable / empty slug.
- assert_eq!(
- classify_composio_action_for_tier(""),
- CommandClass::Network
- );
+ assert_eq!(classify_composio_action_for_tier(""), CommandClass::Network);
}
-
fn seeded_required_args_contract(slug: &str, toolkit: &str, required: &[&str]) -> ToolContract {
ToolContract {
slug: slug.to_string(),
@@ -352,7 +347,10 @@ async fn preflight_fails_before_dispatch_naming_the_missing_field() {
)
.await
.expect_err("null required arg must fail preflight");
- assert!(message.contains("`to`"), "error must name the field: {message}");
+ assert!(
+ message.contains("`to`"),
+ "error must name the field: {message}"
+ );
assert!(
message.contains("=nodes.<node_id>.item.json.<field>"),
"error must suggest the wiring fix: {message}"