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
refactor(core): remove obsolete host gate tests
Steven Enamakel9d074ab733c5
diff --git a/crates/openhuman-core/src/flows/host_gates/mod_tests.rs b/crates/openhuman-core/src/flows/host_gates/mod_tests.rsindex 1664899cf9..8ec00ae6db 100644--- a/crates/openhuman-core/src/flows/host_gates/mod_tests.rs+++ b/crates/openhuman-core/src/flows/host_gates/mod_tests.rs@@ -307,148 +307,6 @@ fn validate_upload_paths_ignores_a_dynamic_path_expression() {assert!(validate_upload_paths(&upload_graph(json!("=nodes.prep.item.json.path"))).is_empty());}-/// (Codex feedback on PR #4826) This gate sandbox-runs every graph against-/// `json!({})` as the trigger payload, so a `tool_call` arg wired straight to-/// the trigger's own data — `"to": "=item.email"` on a node whose only-/// predecessor is the trigger — always resolves `null` here, even though a-/// real webhook/app-event/manual trigger fires with a real payload. Hard--/// rejecting that blocked every ordinary trigger-bound workflow. Contrast-/// with `validate_required_arg_resolvability_rejects_a_null_resolved_arg`-/// above, where the same `=item.<field>` shorthand addresses a real-/// (non-trigger) upstream node and stays a hard reject.-#[tokio::test]-async fn validate_required_arg_resolvability_allows_a_trigger_scoped_null_arg() {- let g = graph(json!({- "nodes": [- { "id": "t", "kind": "trigger", "name": "Webhook" },- { "id": "post", "kind": "tool_call", "name": "Post",- "config": { "slug": "GMAIL_SEND_EMAIL",- "args": { "recipient_email": "[email protected]", "subject": "hi", "body": "=item.email" } } }- ],- "edges": [ { "from_node": "t", "to_node": "post" } ]- }));- let errors = validate_required_arg_resolvability(&g).await;- assert!(errors.is_empty(), "{errors:?}");-}--/// The `nodes.<id>...` explicit-addressing form of the real B18 bug: an arg-/// wired to a specific upstream (non-trigger) node's output path that never-/// exists there. Unlike the trigger-scoped case above, this stays broken-/// regardless of what the trigger payload looks like at runtime, so it must-/// still hard-reject.-#[tokio::test]-async fn validate_required_arg_resolvability_rejects_an_explicit_nodes_reference() {- let g = graph(json!({- "nodes": [- { "id": "t", "kind": "trigger", "name": "Manual" },- { "id": "build_body", "kind": "code", "name": "Build Body",- "config": { "language": "javascript", "source": "return {};" } },- { "id": "post", "kind": "tool_call", "name": "Post",- "config": { "slug": "GMAIL_SEND_EMAIL",- "args": { "recipient_email": "[email protected]",- "subject": "=nodes.build_body.item.subject" } } }- ],- "edges": [- { "from_node": "t", "to_node": "build_body" },- { "from_node": "build_body", "to_node": "post" }- ]- }));- let errors = validate_required_arg_resolvability(&g).await;- assert_eq!(errors.len(), 1, "{errors:?}");- assert!(errors[0].contains("`subject`"), "{}", errors[0]);- assert!(errors[0].contains("nodes.build_body"), "{}", errors[0]);-}--/// A required tool arg wired to a PLAIN agent node's (`no agent_ref`)-/// `output_parser.schema` field must pass this sandbox gate: the module's-/// schema-aware mock LLM synthesizes a-/// schema-valid completion, so the agent's output-parser sub-port succeeds and-/// the downstream `=nodes.<agent>.item.json.<field>` binding resolves to a typed-/// placeholder (non-null) instead of the run aborting on a schema-validation-/// failure. Without the mock LLM this gate would sink `propose_workflow`/`save`-/// on a correctly-built graph (the vendored `MockLlm` echo fails the sub-port).-#[tokio::test]-async fn validate_required_arg_resolvability_accepts_a_schema_agent_field_binding() {- let g = graph(json!({- "nodes": [- { "id": "t", "kind": "trigger", "name": "Manual" },- { "id": "summarize", "kind": "agent", "name": "Summarize",- "config": { "prompt": "summarize the thread",- "output_parser": { "schema": { "type": "object",- "required": ["channel"],- "properties": { "channel": { "type": "string" } } } } } },- { "id": "post", "kind": "tool_call", "name": "Post",- "config": { "slug": "SLACK_SEND_MESSAGE",- "args": { "channel": "=nodes.summarize.item.json.channel" } } }- ],- "edges": [- { "from_node": "t", "to_node": "summarize" },- { "from_node": "summarize", "to_node": "post" }- ]- }));- let errors = validate_required_arg_resolvability(&g).await;- assert!(errors.is_empty(), "{errors:?}");-}--/// WS6: a required arg wired to the OUTPUT of an upstream Composio `tool_call`-/// must NOT be hard-rejected by this gate. The echo sandbox renders a Composio-/// `tool_call` as `{tool, args, connection}` and can never produce its real-/// output fields, so `=nodes.<composio>.item.json.data.<field>` resolves `null`-/// here even when the wiring is perfectly correct — rejecting it would block a-/// possibly-correct graph from ever being proposed (the transcript false-/// negative). Contrast `..._rejects_an_explicit_nodes_reference` above, where-/// the same explicit-`nodes` form addresses a `code` node (whose real output-/// the sandbox DOES produce) and stays a hard reject.-#[tokio::test]-async fn validate_required_arg_resolvability_downgrades_a_composio_tool_call_upstream_binding() {- let g = graph(json!({- "nodes": [- { "id": "t", "kind": "trigger", "name": "Manual" },- { "id": "get_me", "kind": "tool_call", "name": "Who am I",- "config": { "slug": "TWITTER_USER_LOOKUP_ME", "args": {} } },- { "id": "post", "kind": "tool_call", "name": "Post",- "config": { "slug": "GMAIL_SEND_EMAIL",- "args": { "recipient_email": "[email protected]", "subject": "hi",- "body": "=nodes.get_me.item.json.data.username" } } }- ],- "edges": [- { "from_node": "t", "to_node": "get_me" },- { "from_node": "get_me", "to_node": "post" }- ]- }));- let errors = validate_required_arg_resolvability(&g).await;- assert!(- errors.is_empty(),- "a binding to a Composio tool_call's output is UNVERIFIABLE, not a hard reject: {errors:?}"- );-}--/// WS6 companion: the implicit `=item...` form of the same case — `post`'s only-/// predecessor is a Composio `tool_call`, so `=item.json.data.username`-/// addresses that node's (echo-only) output and is likewise unverifiable, not a-/// reject.-#[tokio::test]-async fn validate_required_arg_resolvability_downgrades_an_item_scoped_composio_upstream_binding() {- let g = graph(json!({- "nodes": [- { "id": "t", "kind": "trigger", "name": "Manual" },- { "id": "get_me", "kind": "tool_call", "name": "Who am I",- "config": { "slug": "TWITTER_USER_LOOKUP_ME", "args": {} } },- { "id": "post", "kind": "tool_call", "name": "Post",- "config": { "slug": "GMAIL_SEND_EMAIL",- "args": { "recipient_email": "[email protected]", "subject": "hi",- "body": "=item.json.data.username" } } }- ],- "edges": [- { "from_node": "t", "to_node": "get_me" },- { "from_node": "get_me", "to_node": "post" }- ]- }));- let errors = validate_required_arg_resolvability(&g).await;- assert!(errors.is_empty(), "{errors:?}");-}--// ── validate_agent_refs (agent-ref resolvability gate, PR #5114) ───────────#[tokio::test]