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(flows): move alias wiring test into shared ops test module
Steven Enamakel8b2f1e8d9091
diff --git a/crates/openhuman-core/src/flows/host_gates/mod_tests.rs b/crates/openhuman-core/src/flows/host_gates/mod_tests.rsindex eefacc5c76..2a264edb6f 100644--- a/crates/openhuman-core/src/flows/host_gates/mod_tests.rs+++ b/crates/openhuman-core/src/flows/host_gates/mod_tests.rs@@ -24,6 +24,23 @@ fn graph(value: Value) -> WorkflowGraph {graph}+fn seeded_alias_contract() -> ToolContract {+ ToolContract {+ slug: "GOOGLEDRIVE_FIND_FILE".to_string(),+ toolkit: "googledrive".to_string(),+ description: None,+ required_args: vec![],+ input_schema: None,+ output_fields: vec!["files".to_string()],+ output_schema: Some(json!({+ "type": "object",+ "properties": { "files": { "type": "array" } }+ })),+ primary_array_path: Some("data.files".to_string()),+ is_curated: true,+ }+}+fn seeded_slack_send_contract() -> ToolContract {ToolContract {slug: "SLACK_SEND_MESSAGE".to_string(),@@ -326,54 +343,6 @@ async fn validate_tool_contracts_accepts_a_separated_action_slug_alias() {);}-#[tokio::test]-async fn graph_wiring_warnings_resolves_a_separated_action_slug_alias() {- seed_live_catalog_cache("googledrive", vec![seeded_alias_contract()]);- let g = graph(json!({- "nodes": [- { "id": "t", "kind": "trigger", "name": "Manual" },- { "id": "find", "kind": "tool_call", "name": "Find",- "config": { "slug": "GOOGLE_DRIVE_FIND_FILE", "args": {} } },- { "id": "split", "kind": "split_out", "name": "Split",- "config": { "path": "json.data.wrong" } },- { "id": "shape", "kind": "transform", "name": "Shape",- "config": { "set": { "file": "=nodes.find.item.json.data.wrong" } } }- ],- "edges": [- { "from_node": "t", "to_node": "find" },- { "from_node": "find", "to_node": "split" },- { "from_node": "find", "to_node": "shape" }- ]- }));-- let warnings = graph_wiring_warnings(&Config::default(), &g).await;-- assert_eq!(- warnings.len(),- 2,- "alias should reach both wiring checks: {warnings:?}"- );- assert!(- warnings- .iter()- .any(|warning| warning.contains("json.data.files")),- "{warnings:?}"- );- assert!(- warnings.iter().any(|warning| warning.contains("wrong")),- "{warnings:?}"- );-}--/// (Codex feedback on this PR) `notion` ships a static curated catalog-/// (`catalog_for_toolkit`), so at RUNTIME `flow_tool_allowed`'s Path A-/// hard-rejects any slug `find_curated` doesn't recognize — even a real,-/// live action. Without this check, a real-but-uncurated action for a-/// statically-catalogued toolkit would pass authoring/save here and then-/// fail every single run as "tool not permitted". Uses its own toolkit key-/// (`notion`, not `slack`/`gmail`) since it seeds different `is_curated`-/// content than every other test sharing those keys.-#[tokio::test]async fn validate_tool_contracts_rejects_a_real_but_uncurated_action_on_a_statically_catalogued_toolkit() {diff --git a/crates/openhuman-core/src/flows/ops_tool_contract_and_wiring_warnings_tests.rs b/crates/openhuman-core/src/flows/ops_tool_contract_and_wiring_warnings_tests.rsindex b79aee4398..257d283765 100644--- a/crates/openhuman-core/src/flows/ops_tool_contract_and_wiring_warnings_tests.rs+++ b/crates/openhuman-core/src/flows/ops_tool_contract_and_wiring_warnings_tests.rs@@ -424,3 +424,51 @@ async fn graph_wiring_warnings_suggests_the_probed_split_out_path_when_schema_isgraph_wiring_warnings(&config, &fixed).await);}++#[tokio::test]+async fn graph_wiring_warnings_resolves_a_separated_action_slug_alias() {+ seed_live_catalog_cache("googledrive", vec![seeded_alias_contract()]);+ let g = graph(json!({+ "nodes": [+ { "id": "t", "kind": "trigger", "name": "Manual" },+ { "id": "find", "kind": "tool_call", "name": "Find",+ "config": { "slug": "GOOGLE_DRIVE_FIND_FILE", "args": {} } },+ { "id": "split", "kind": "split_out", "name": "Split",+ "config": { "path": "json.data.wrong" } },+ { "id": "shape", "kind": "transform", "name": "Shape",+ "config": { "set": { "file": "=nodes.find.item.json.data.wrong" } } }+ ],+ "edges": [+ { "from_node": "t", "to_node": "find" },+ { "from_node": "find", "to_node": "split" },+ { "from_node": "find", "to_node": "shape" }+ ]+ }));++ let warnings = graph_wiring_warnings(&Config::default(), &g).await;++ assert_eq!(+ warnings.len(),+ 2,+ "alias should reach both wiring checks: {warnings:?}"+ );+ assert!(+ warnings+ .iter()+ .any(|warning| warning.contains("json.data.files")),+ "{warnings:?}"+ );+ assert!(+ warnings.iter().any(|warning| warning.contains("wrong")),+ "{warnings:?}"+ );+}++/// (Codex feedback on this PR) `notion` ships a static curated catalog+/// (`catalog_for_toolkit`), so at RUNTIME `flow_tool_allowed`'s Path A+/// hard-rejects any slug `find_curated` doesn't recognize — even a real,+/// live action. Without this check, a real-but-uncurated action for a+/// statically-catalogued toolkit would pass authoring/save here and then+/// fail every single run as "tool not permitted". Uses its own toolkit key+/// (`notion`, not `slack`/`gmail`) since it seeds different `is_curated`+/// content than every other test sharing those keys.