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
fix(test): update test module paths for flows ops bindings
Steven Enamakel6a043a433fd9
diff --git a/crates/openhuman-core/src/flows/ops_agent_binding_tests.rs b/crates/openhuman-core/src/flows/ops_agent_binding_tests.rsindex a5f1053b03..3ecd1e825a 100644--- a/crates/openhuman-core/src/flows/ops_agent_binding_tests.rs+++ b/crates/openhuman-core/src/flows/ops_agent_binding_tests.rs@@ -1,31 +1,5 @@use super::*;-#[test]-fn binding_to_agent_with_matching_schema_is_accepted() {- let g = graph(json!({- "nodes": [- { "id": "t", "kind": "trigger", "name": "Manual" },- { "id": "summarize", "kind": "agent", "name": "Summarize",- "config": { "prompt": "summarize",- "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" }- ]- }));- assert!(- validate_binding_resolvability(&g).is_empty(),- "{:?}",- validate_binding_resolvability(&g)- );-}-// ── validate_agent_refs (agent-ref resolvability gate, PR #5114) ───────────#[tokio::test]diff --git a/crates/openhuman-core/src/flows/ops_run_status_and_prompt_binding_tests.rs b/crates/openhuman-core/src/flows/ops_run_status_and_prompt_binding_tests.rsindex 746b37adda..1e846caf33 100644--- a/crates/openhuman-core/src/flows/ops_run_status_and_prompt_binding_tests.rs+++ b/crates/openhuman-core/src/flows/ops_run_status_and_prompt_binding_tests.rs@@ -144,58 +144,6 @@ fn failed_step_error_summary_names_every_errored_node() {);}-#[test]-fn envelope_violation_detected() {- // `summarize` DOES declare a matching schema, but the binding reaches- // into `.item.channel` (skipping `.json`) — that dereferences the- // `{json,text,raw}` envelope wrapper itself, not the field inside it.- let g = graph(json!({- "nodes": [- { "id": "t", "kind": "trigger", "name": "Manual" },- { "id": "summarize", "kind": "agent", "name": "Summarize",- "config": { "prompt": "summarize",- "output_parser": { "schema": { "type": "object",- "properties": { "channel": { "type": "string" } } } } } },- { "id": "post", "kind": "tool_call", "name": "Post",- "config": { "slug": "SLACK_SEND_MESSAGE",- "args": { "channel": "=nodes.summarize.item.channel" } } }- ],- "edges": [- { "from_node": "t", "to_node": "summarize" },- { "from_node": "summarize", "to_node": "post" }- ]- }));- let errors = validate_binding_resolvability(&g);- assert_eq!(errors.len(), 1, "{errors:?}");- assert!(errors[0].contains("json"), "{}", errors[0]);- assert!(errors[0].contains("summarize"), "{}", errors[0]);-}--#[test]-fn non_enveloping_node_binding_is_accepted() {- // `code` nodes emit their item directly (no envelope) — `.item.<field>`- // is the correct, and only, form.- let g = graph(json!({- "nodes": [- { "id": "t", "kind": "trigger", "name": "Manual" },- { "id": "compute", "kind": "code", "name": "Compute",- "config": { "language": "javascript", "source": "return {channel:'general'};" } },- { "id": "post", "kind": "tool_call", "name": "Post",- "config": { "slug": "SLACK_SEND_MESSAGE",- "args": { "channel": "=nodes.compute.item.channel" } } }- ],- "edges": [- { "from_node": "t", "to_node": "compute" },- { "from_node": "compute", "to_node": "post" }- ]- }));- assert!(- validate_binding_resolvability(&g).is_empty(),- "{:?}",- validate_binding_resolvability(&g)- );-}-#[test]fn literal_args_unaffected() {let g = graph(json!({@@ -232,68 +180,6 @@ fn agent_prompt_binding_unaffected() {// ── agent-prompt invalid-jq gate (PR C) ─────────────────────────────────────-#[test]-fn agent_prompt_prose_written_as_expression_is_rejected() {- // The exact live-failure shape: a builder smuggled upstream data into the- // prompt via a jq `=`-expression, but the result is prose, not a valid jq- // program — it resolves to `null` at runtime, handing the agent an empty- // prompt (the root-cause bug `input_context` exists to fix).- let g = graph(json!({- "nodes": [- { "id": "t", "kind": "trigger", "name": "Manual" },- { "id": "classify", "kind": "agent", "name": "Classify",- "config": { "prompt": "=You are given an email: .item. Classify the following \- email as urgent/normal/low priority. Return JSON with fields \"priority\" and \- \"reason\"." } }- ],- "edges": [ { "from_node": "t", "to_node": "classify" } ]- }));- let errors = validate_binding_resolvability(&g);- assert_eq!(errors.len(), 1, "{errors:?}");- assert!(errors[0].contains("classify"), "{}", errors[0]);- // The gate is `tinyflows::gates`', so the message says what is wrong with- // the graph and stops there. WHERE to put the data instead — this host's- // `input_context` node-config key, which its own LLM adapter reads and- // which the engine knows nothing about — is taught by the workflow_builder- // archetype, not by a crate-level error.- assert!(errors[0].contains("does not interpolate"), "{}", errors[0]);-}--#[test]-fn agent_prompt_jq_concatenation_is_accepted() {- // A real jq program built from string-literal concatenation is a- // legitimate, resolvable expression — not the prose failure mode above.- let g = graph(json!({- "nodes": [- { "id": "t", "kind": "trigger", "name": "Manual" },- { "id": "greet", "kind": "agent", "name": "Greet",- "config": { "prompt": "=\"Hi \" + .item.name" } }- ],- "edges": [ { "from_node": "t", "to_node": "greet" } ]- }));- assert!(- validate_binding_resolvability(&g).is_empty(),- "{:?}",- validate_binding_resolvability(&g)- );-}--#[test]-fn agent_plain_prompt_is_accepted() {- // No leading `=` at all — an ordinary instruction string, never inspected- // by this gate regardless of content.- let g = graph(json!({- "nodes": [- { "id": "t", "kind": "trigger", "name": "Manual" },- { "id": "classify", "kind": "agent", "name": "Classify",- "config": { "prompt": "Classify the email as urgent, normal, or low priority.",- "input_context": "=item" } }- ],- "edges": [ { "from_node": "t", "to_node": "classify" } ]- }));- assert!(validate_binding_resolvability(&g).is_empty());-}-#[test]fn agent_prompt_with_escaped_quote_inside_jq_string_is_accepted() {// Regression for the quote-toggle desync: an escaped quote (`\"`) inside@@ -318,52 +204,6 @@ fn agent_prompt_with_escaped_quote_inside_jq_string_is_accepted() {);}-#[test]-fn agent_prose_prompt_with_populated_messages_is_accepted() {- // Both runtime paths (`build_completion_messages` /- // `node_request_to_prompt` in `tinyflows/caps.rs`) fall through to a- // populated `messages` array once `prompt` resolves to `null` — exactly- // what this prose-as-`=`-expression prompt does. So a node with real- // `messages` never actually runs on the null prompt; this gate must not- // reject the graph for a vestigial/unused `prompt` field alongside it.- let g = graph(json!({- "nodes": [- { "id": "t", "kind": "trigger", "name": "Manual" },- { "id": "classify", "kind": "agent", "name": "Classify",- "config": {- "prompt": "=You are given an email: .item. Classify the following email.",- "messages": [ { "role": "user", "content": "Classify this email." } ]- } }- ],- "edges": [ { "from_node": "t", "to_node": "classify" } ]- }));- assert!(- validate_binding_resolvability(&g).is_empty(),- "{:?}",- validate_binding_resolvability(&g)- );-}--#[test]-fn agent_prose_prompt_with_empty_messages_is_still_rejected() {- // An empty `messages` array doesn't supply the turn at runtime (both- // `build_completion_messages` and `node_request_to_prompt` treat an empty- // array the same as absent) — the prose-prompt gate must still apply.- let g = graph(json!({- "nodes": [- { "id": "t", "kind": "trigger", "name": "Manual" },- { "id": "classify", "kind": "agent", "name": "Classify",- "config": {- "prompt": "=You are given an email: .item. Classify the following email.",- "messages": []- } }- ],- "edges": [ { "from_node": "t", "to_node": "classify" } ]- }));- let errors = validate_binding_resolvability(&g);- assert_eq!(errors.len(), 1, "{errors:?}");-}-#[test]fn finalize_terminal_status_pending_approval_wins_over_error() {// Precedence: an outstanding pending_approval always wins, even if a stepdiff --git a/crates/openhuman-core/src/flows/ops_validate_warnings_and_connections_tests.rs b/crates/openhuman-core/src/flows/ops_validate_warnings_and_connections_tests.rsindex f8c230451d..af75c34b5a 100644--- a/crates/openhuman-core/src/flows/ops_validate_warnings_and_connections_tests.rs+++ b/crates/openhuman-core/src/flows/ops_validate_warnings_and_connections_tests.rs@@ -584,81 +584,3 @@ fn flow_stream_target_generates_request_id_when_absent_or_blank() {// Two mints are distinct uuids.assert_ne!(a.request_id, b.request_id);}--#[test]-fn binding_to_agent_schema_missing_field_is_rejected() {- // TinyFlows deliberately permits a schema-less agent because its host- // runner can return arbitrary structured JSON. A declared schema that- // omits `channel`, however, proves this binding is unaddressable.- let g = graph(json!({- "nodes": [- { "id": "t", "kind": "trigger", "name": "Manual" },- { "id": "summarize", "kind": "agent", "name": "Summarize",- "config": { "agent_ref": "researcher", "prompt": "summarize",- "output_parser": { "schema": { "type": "object",- "properties": { "summary": { "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_binding_resolvability(&g);- assert_eq!(errors.len(), 1, "{errors:?}");- assert!(errors[0].contains("post"), "{}", errors[0]);- assert!(errors[0].contains("channel"), "{}", errors[0]);- assert!(errors[0].contains("summarize"), "{}", errors[0]);- assert!(errors[0].contains("output_parser.schema"), "{}", errors[0]);-}--#[test]-fn binding_to_agent_without_any_schema_is_unverifiable_not_rejected() {- // TinyFlows deliberately permits a schema-less agent (see the test above):- // with no `output_parser.schema` at all the runtime response shape is- // host-defined, the bound field MAY exist, and the gate treats the- // binding as unverifiable rather than invalid. Pinned so the rejection- // tests above cannot silently drift back to the pre-v0.8.2 contract.- let g = graph(json!({- "nodes": [- { "id": "t", "kind": "trigger", "name": "Manual" },- { "id": "summarize", "kind": "agent", "name": "Summarize",- "config": { "agent_ref": "researcher", "prompt": "summarize" } },- { "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_binding_resolvability(&g);- assert_eq!(errors, Vec::<String>::new(), "unverifiable is not invalid");-}--#[test]-fn binding_to_agent_with_schema_missing_field_is_rejected() {- // A schema IS declared, but it doesn't cover the field the binding reads.- let g = graph(json!({- "nodes": [- { "id": "t", "kind": "trigger", "name": "Manual" },- { "id": "summarize", "kind": "agent", "name": "Summarize",- "config": { "prompt": "summarize",- "output_parser": { "schema": { "type": "object",- "properties": { "summary": { "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_binding_resolvability(&g);- assert_eq!(errors.len(), 1, "{errors:?}");- assert!(errors[0].contains("channel"), "{}", errors[0]);-}