Skip to content

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

refactor(flows): use structurally_valid_graph in tests

Steven Enamakelfdec2ff75529
diff --git a/crates/openhuman-core/src/flows/ops_builder_trail_off_tests.rs b/crates/openhuman-core/src/flows/ops_builder_trail_off_tests.rs
index 889599fba0..9c6acf888c 100644
--- a/crates/openhuman-core/src/flows/ops_builder_trail_off_tests.rs
+++ b/crates/openhuman-core/src/flows/ops_builder_trail_off_tests.rs
@@ -96,7 +96,7 @@ async fn compute_required_connections_flags_missing_composio_toolkits() {
],
"edges": [ { "from_node": "t", "to_node": "send" } ]
});
- let graph = tinyflows::migrate::deserialize_graph(graph_json).unwrap();
+ let graph = structurally_valid_graph(graph_json);
let required = compute_required_connections(
&crate::core::runtime::DispatchCtx::ambient(),
&config,
@@ -125,7 +125,7 @@ async fn compute_required_connections_skips_native_and_http_nodes() {
{ "from_node": "search", "to_node": "http" }
]
});
- let graph = tinyflows::migrate::deserialize_graph(graph_json).unwrap();
+ let graph = structurally_valid_graph(graph_json);
let required = compute_required_connections(
&crate::core::runtime::DispatchCtx::ambient(),
&config,
diff --git a/crates/openhuman-core/src/flows/ops_tests.rs b/crates/openhuman-core/src/flows/ops_tests.rs
index 1bafae20c9..48c51b9e1a 100644
--- a/crates/openhuman-core/src/flows/ops_tests.rs
+++ b/crates/openhuman-core/src/flows/ops_tests.rs
@@ -26,6 +26,10 @@ fn structurally_valid_graph(value: Value) -> Value {
serde_json::to_value(graph).expect("graph serializes to portable JSON")
}
+fn graph(value: Value) -> Value {
+ structurally_valid_graph(value)
+}
+
fn trigger_only_graph() -> Value {
json!({
"name": "trigger-only",