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): add coverage for builder tools and ops lifecycle
Steven Enamakel760b38d1e7aa
diff --git a/crates/openhuman-core/src/flows/builder_tools_draft_id_tests.rs b/crates/openhuman-core/src/flows/builder_tools_draft_id_tests.rsindex 6ee8a74e1f..e5512bc902 100644--- a/crates/openhuman-core/src/flows/builder_tools_draft_id_tests.rs+++ b/crates/openhuman-core/src/flows/builder_tools_draft_id_tests.rs@@ -16,7 +16,7 @@ async fn cancel_flow_run_cancels_when_flow_id_matches_the_owner() {.await.unwrap().value;- let run = ops::flows_run(+ let run = ops::flows_run(&crate::core::runtime::DispatchCtx::ambient(),&config,&flow.id,json!({}),diff --git a/crates/openhuman-core/src/flows/builder_tools_validate_and_create_tests.rs b/crates/openhuman-core/src/flows/builder_tools_validate_and_create_tests.rsindex 24e1afe125..3d22800ece 100644--- a/crates/openhuman-core/src/flows/builder_tools_validate_and_create_tests.rs+++ b/crates/openhuman-core/src/flows/builder_tools_validate_and_create_tests.rs@@ -528,7 +528,7 @@ async fn cancel_flow_run_refuses_a_run_the_caller_does_not_own() {.unwrap().value;- let run = ops::flows_run(+ let run = ops::flows_run(&crate::core::runtime::DispatchCtx::ambient(),&config,&owner_flow.id,json!({}),diff --git a/crates/openhuman-core/src/flows/ops_agent_binding_tests.rs b/crates/openhuman-core/src/flows/ops_agent_binding_tests.rsindex 9bb5bb004e..c60fe9e70b 100644--- a/crates/openhuman-core/src/flows/ops_agent_binding_tests.rs+++ b/crates/openhuman-core/src/flows/ops_agent_binding_tests.rs@@ -300,7 +300,7 @@ async fn flows_run_fails_cleanly_without_invoking_engine_when_inference_not_read.await.expect("creating (authoring) an agent-node flow must succeed even when signed out");- let err = flows_run(+ let err = flows_run(&crate::core::runtime::DispatchCtx::ambient(),&config,&created.value.id,json!({}),diff --git a/crates/openhuman-core/src/flows/ops_approval_manifest_and_catalog_tests.rs b/crates/openhuman-core/src/flows/ops_approval_manifest_and_catalog_tests.rsindex c0da8525ff..faec523f17 100644--- a/crates/openhuman-core/src/flows/ops_approval_manifest_and_catalog_tests.rs+++ b/crates/openhuman-core/src/flows/ops_approval_manifest_and_catalog_tests.rs@@ -13,7 +13,7 @@ async fn flows_run_detached_returns_running_run_id_and_inserts_row() {).unwrap();- let outcome = flows_run_detached(+ let outcome = flows_run_detached(&crate::core::runtime::DispatchCtx::ambient(),&config,&flow.id,json!({}),@@ -55,7 +55,7 @@ async fn flows_run_detached_registers_the_run_before_returning_its_id() {).unwrap();- let outcome = flows_run_detached(+ let outcome = flows_run_detached(&crate::core::runtime::DispatchCtx::ambient(),&config,&flow.id,json!({}),diff --git a/crates/openhuman-core/src/flows/ops_engine_compatibility_tests.rs b/crates/openhuman-core/src/flows/ops_engine_compatibility_tests.rsindex 30c689d426..91fedae5b4 100644--- a/crates/openhuman-core/src/flows/ops_engine_compatibility_tests.rs+++ b/crates/openhuman-core/src/flows/ops_engine_compatibility_tests.rs@@ -76,7 +76,7 @@ async fn flows_run_rejects_legacy_nested_conditional_fan_in_before_execution() {let graph = structurally_valid_graph(nested_conditional_fan_in_graph());let flow = store::create_flow(&config, "legacy".to_string(), graph, false, true).unwrap();- let err = flows_run(+ let err = flows_run(&crate::core::runtime::DispatchCtx::ambient(),&config,&flow.id,json!({ "outer": true, "inner": true }),@@ -116,7 +116,7 @@ async fn flows_run_rejects_an_incompatible_saved_child_before_execution() {).unwrap();- let error = flows_run(+ let error = flows_run(&crate::core::runtime::DispatchCtx::ambient(),&config,&parent.id,json!({}),diff --git a/crates/openhuman-core/src/flows/ops_resume_checkpoint_tests.rs b/crates/openhuman-core/src/flows/ops_resume_checkpoint_tests.rsindex 8d78931acd..be90b3726d 100644--- a/crates/openhuman-core/src/flows/ops_resume_checkpoint_tests.rs+++ b/crates/openhuman-core/src/flows/ops_resume_checkpoint_tests.rs@@ -11,7 +11,7 @@ async fn flows_resume_succeeds_when_the_graph_is_unchanged() {.await.unwrap();- let run = flows_run(+ let run = flows_run(&crate::core::runtime::DispatchCtx::ambient(),&config,&created.value.id,json!({ "x": 1 }),@@ -30,7 +30,7 @@ async fn flows_resume_succeeds_when_the_graph_is_unchanged() {"a freshly parked run must pin the graph it parked against");- let resumed = flows_resume(&config, &created.value.id, &thread_id, pending, vec![])+ let resumed = flows_resume(&crate::core::runtime::DispatchCtx::ambient(), &config, &created.value.id, &thread_id, pending, vec![]).await.expect("resume must succeed when the pinned graph still matches the current one");assert_eq!(resumed.value["pending_approvals"], json!([]));@@ -61,7 +61,7 @@ async fn flows_resume_allows_a_legacy_row_with_null_graph_hash() {.await.unwrap();- let run = flows_run(+ let run = flows_run(&crate::core::runtime::DispatchCtx::ambient(),&config,&created.value.id,json!({ "x": 1 }),@@ -112,7 +112,7 @@ async fn flows_resume_allows_a_legacy_row_with_null_graph_hash() {).unwrap();- let resumed = flows_resume(&config, &created.value.id, &thread_id, pending, vec![])+ let resumed = flows_resume(&crate::core::runtime::DispatchCtx::ambient(), &config, &created.value.id, &thread_id, pending, vec![]).await.expect("a legacy row with no graph_hash must still resume (unknown treated as allow)");assert_eq!(resumed.value["pending_approvals"], json!([]));@@ -155,7 +155,7 @@ async fn flows_resume_marks_an_incompatible_legacy_checkpoint_failed() {let created = flows_create(&config, "gated".to_string(), approval_gated_graph(), false).await.unwrap();- let run = flows_run(+ let run = flows_run(&crate::core::runtime::DispatchCtx::ambient(),&config,&created.value.id,json!({ "x": 1 }),@@ -206,7 +206,7 @@ async fn flows_resume_marks_an_incompatible_legacy_checkpoint_failed() {).unwrap();- let error = flows_resume(&config, &created.value.id, &thread_id, pending, vec![])+ let error = flows_resume(&crate::core::runtime::DispatchCtx::ambient(), &config, &created.value.id, &thread_id, pending, vec![]).await.expect_err("an incompatible checkpoint cannot be resumed safely");assert!(@@ -235,7 +235,7 @@ async fn flows_resume_marks_a_checkpoint_with_an_incompatible_saved_child_failedlet created = flows_create(&config, "gated".to_string(), approval_gated_graph(), false).await.unwrap();- let run = flows_run(+ let run = flows_run(&crate::core::runtime::DispatchCtx::ambient(),&config,&created.value.id,json!({ "x": 1 }),@@ -285,7 +285,7 @@ async fn flows_resume_marks_a_checkpoint_with_an_incompatible_saved_child_failed).unwrap();- let error = flows_resume(&config, &created.value.id, &thread_id, pending, vec![])+ let error = flows_resume(&crate::core::runtime::DispatchCtx::ambient(), &config, &created.value.id, &thread_id, pending, vec![]).await.expect_err("an incompatible saved child cannot be resumed safely");assert!(@@ -309,7 +309,7 @@ async fn flows_resume_marks_a_checkpoint_with_an_incompatible_saved_child_failedasync fn flows_resume_missing_flow_errors() {let tmp = TempDir::new().unwrap();let config = test_config(&tmp);- let err = flows_resume(&config, "missing", "thread-1", vec![], vec![])+ let err = flows_resume(&crate::core::runtime::DispatchCtx::ambient(), &config, "missing", "thread-1", vec![], vec![]).await.expect_err("must error");assert!(err.contains("not found"));@@ -334,7 +334,7 @@ async fn flows_resume_with_empty_approvals_is_rejected_and_does_not_complete_the.await.unwrap();- let run = flows_run(+ let run = flows_run(&crate::core::runtime::DispatchCtx::ambient(),&config,&created.value.id,json!({ "x": 1 }),@@ -345,7 +345,7 @@ async fn flows_resume_with_empty_approvals_is_rejected_and_does_not_complete_the.unwrap();let thread_id = run.value["thread_id"].as_str().unwrap().to_string();- let err = flows_resume(&config, &created.value.id, &thread_id, vec![], vec![])+ let err = flows_resume(&crate::core::runtime::DispatchCtx::ambient(), &config, &created.value.id, &thread_id, vec![], vec![]).await.expect_err("an empty approvals list must not silently approve the pending gate");assert!(@@ -374,7 +374,7 @@ async fn flows_resume_with_mismatched_approvals_is_rejected() {.await.unwrap();- let run = flows_run(+ let run = flows_run(&crate::core::runtime::DispatchCtx::ambient(),&config,&created.value.id,json!({ "x": 1 }),@@ -386,7 +386,7 @@ async fn flows_resume_with_mismatched_approvals_is_rejected() {let thread_id = run.value["thread_id"].as_str().unwrap().to_string();// Names a node id that is not actually pending for this run.- let err = flows_resume(+ let err = flows_resume(&crate::core::runtime::DispatchCtx::ambient(),&config,&created.value.id,&thread_id,@@ -406,7 +406,7 @@ async fn flows_resume_with_the_correct_gate_completes_and_runs_downstream() {.await.unwrap();- let run = flows_run(+ let run = flows_run(&crate::core::runtime::DispatchCtx::ambient(),&config,&created.value.id,json!({ "x": 1 }),@@ -417,7 +417,7 @@ async fn flows_resume_with_the_correct_gate_completes_and_runs_downstream() {.unwrap();let thread_id = run.value["thread_id"].as_str().unwrap().to_string();- let resumed = flows_resume(+ let resumed = flows_resume(&crate::core::runtime::DispatchCtx::ambient(),&config,&created.value.id,&thread_id,@@ -449,7 +449,7 @@ async fn flows_resume_denying_a_gate_routes_to_its_error_port() {.await.unwrap();- let run = flows_run(+ let run = flows_run(&crate::core::runtime::DispatchCtx::ambient(),&config,&created.value.id,json!({ "x": 1 }),@@ -461,7 +461,7 @@ async fn flows_resume_denying_a_gate_routes_to_its_error_port() {let thread_id = run.value["thread_id"].as_str().unwrap().to_string();// Deny the gate: no approvals, `gate` in rejections.- let resumed = flows_resume(+ let resumed = flows_resume(&crate::core::runtime::DispatchCtx::ambient(),&config,&created.value.id,&thread_id,@@ -500,7 +500,7 @@ async fn flows_resume_denying_a_gate_with_no_error_port_fails_the_run() {.await.unwrap();- let run = flows_run(+ let run = flows_run(&crate::core::runtime::DispatchCtx::ambient(),&config,&created.value.id,json!({ "x": 1 }),@@ -511,7 +511,7 @@ async fn flows_resume_denying_a_gate_with_no_error_port_fails_the_run() {.unwrap();let thread_id = run.value["thread_id"].as_str().unwrap().to_string();- let err = flows_resume(+ let err = flows_resume(&crate::core::runtime::DispatchCtx::ambient(),&config,&created.value.id,&thread_id,@@ -539,7 +539,7 @@ async fn flows_resume_rejects_a_gate_named_in_both_approvals_and_rejections() {.await.unwrap();- let run = flows_run(+ let run = flows_run(&crate::core::runtime::DispatchCtx::ambient(),&config,&created.value.id,json!({}),@@ -550,7 +550,7 @@ async fn flows_resume_rejects_a_gate_named_in_both_approvals_and_rejections() {.unwrap();let thread_id = run.value["thread_id"].as_str().unwrap().to_string();- let err = flows_resume(+ let err = flows_resume(&crate::core::runtime::DispatchCtx::ambient(),&config,&created.value.id,&thread_id,@@ -576,7 +576,7 @@ async fn flows_resume_of_a_non_paused_run_errors_clearly() {// This run completes outright (no approval gate) — its recorded status// is "completed", not "pending_approval".- let run = flows_run(+ let run = flows_run(&crate::core::runtime::DispatchCtx::ambient(),&config,&created.value.id,json!({}),@@ -587,7 +587,7 @@ async fn flows_resume_of_a_non_paused_run_errors_clearly() {.unwrap();let thread_id = run.value["thread_id"].as_str().unwrap().to_string();- let err = flows_resume(&config, &created.value.id, &thread_id, vec![], vec![])+ let err = flows_resume(&crate::core::runtime::DispatchCtx::ambient(), &config, &created.value.id, &thread_id, vec![], vec![]).await.expect_err("resuming an already-completed run must be a clear error, not a silent no-op");assert!(diff --git a/crates/openhuman-core/src/flows/ops_run_lifecycle_tests.rs b/crates/openhuman-core/src/flows/ops_run_lifecycle_tests.rsindex 12eb4c1046..7435e0f0c6 100644--- a/crates/openhuman-core/src/flows/ops_run_lifecycle_tests.rs+++ b/crates/openhuman-core/src/flows/ops_run_lifecycle_tests.rs@@ -110,7 +110,7 @@ async fn flows_run_completes_trigger_only_graph() {.await.unwrap();- let outcome = flows_run(+ let outcome = flows_run(&crate::core::runtime::DispatchCtx::ambient(),&config,&created.value.id,json!({ "hello": "world" }),@@ -146,7 +146,7 @@ async fn flows_run_on_trigger_only_graph_surfaces_no_actionable_nodes_note() {.await.unwrap();- let outcome = flows_run(+ let outcome = flows_run(&crate::core::runtime::DispatchCtx::ambient(),&config,&created.value.id,json!({}),@@ -199,7 +199,7 @@ async fn flows_run_on_graph_with_actionable_nodes_has_no_empty_flow_note() {.await.unwrap();- let outcome = flows_run(+ let outcome = flows_run(&crate::core::runtime::DispatchCtx::ambient(),&config,&created.value.id,json!({}),@@ -243,7 +243,7 @@ async fn flows_run_on_graph_with_disconnected_component_still_surfaces_empty_flo.await.unwrap();- let outcome = flows_run(+ let outcome = flows_run(&crate::core::runtime::DispatchCtx::ambient(),&config,&created.value.id,json!({}),@@ -284,7 +284,7 @@ async fn flows_run_reports_pending_approval_and_blocks_downstream() {.await.unwrap();- let outcome = flows_run(+ let outcome = flows_run(&crate::core::runtime::DispatchCtx::ambient(),&config,&created.value.id,json!({ "x": 1 }),@@ -317,7 +317,7 @@ async fn flows_get_missing_flow_errors() {async fn flows_run_missing_flow_errors() {let tmp = TempDir::new().unwrap();let config = test_config(&tmp);- let err = flows_run(+ let err = flows_run(&crate::core::runtime::DispatchCtx::ambient(),&config,"missing",json!({}),@@ -343,7 +343,7 @@ async fn flows_run_threads_declared_inputs_into_the_run() {.await.unwrap();- let run = flows_run(+ let run = flows_run(&crate::core::runtime::DispatchCtx::ambient(),&config,&created.value.id,json!({}),@@ -389,7 +389,7 @@ async fn flows_run_detached_threads_and_validates_declared_inputs_too() {.await.unwrap();- let err = flows_run_detached(+ let err = flows_run_detached(&crate::core::runtime::DispatchCtx::ambient(),&config,&created.value.id,json!({}),@@ -400,7 +400,7 @@ async fn flows_run_detached_threads_and_validates_declared_inputs_too() {.expect_err("a missing required input must be refused before a run id is handed out");assert!(err.contains("repo"), "got: {err}");- let started = flows_run_detached(+ let started = flows_run_detached(&crate::core::runtime::DispatchCtx::ambient(),&config,&created.value.id,json!({}),@@ -428,7 +428,7 @@ async fn flows_run_rejects_a_missing_required_input_without_creating_a_run_row().await.unwrap();- let err = flows_run(+ let err = flows_run(&crate::core::runtime::DispatchCtx::ambient(),&config,&created.value.id,json!({}),@@ -471,7 +471,7 @@ async fn flows_run_rejects_a_wrongly_typed_or_undeclared_input() {.await.unwrap();- let type_err = flows_run(+ let type_err = flows_run(&crate::core::runtime::DispatchCtx::ambient(),&config,&created.value.id,json!({}),@@ -482,7 +482,7 @@ async fn flows_run_rejects_a_wrongly_typed_or_undeclared_input() {.expect_err("a string for a number input must be rejected");assert!(type_err.contains("depth"), "got: {type_err}");- let unknown_err = flows_run(+ let unknown_err = flows_run(&crate::core::runtime::DispatchCtx::ambient(),&config,&created.value.id,json!({}),@@ -514,7 +514,7 @@ async fn flows_run_leaves_a_flow_declaring_no_inputs_unchanged() {.await.unwrap();- let run = flows_run(+ let run = flows_run(&crate::core::runtime::DispatchCtx::ambient(),&config,&created.value.id,json!({ "hi": 1 }),@@ -550,7 +550,7 @@ async fn flows_run_records_failed_status_when_a_node_errors() {.await.unwrap();- let err = flows_run(+ let err = flows_run(&crate::core::runtime::DispatchCtx::ambient(),&config,&created.value.id,json!({}),@@ -599,7 +599,7 @@ async fn flows_run_populates_error_when_a_continue_policy_node_errors() {.await.unwrap();- let run = flows_run(+ let run = flows_run(&crate::core::runtime::DispatchCtx::ambient(),&config,&created.value.id,json!({}),diff --git a/crates/openhuman-core/src/flows/ops_run_rows_and_notifications_tests.rs b/crates/openhuman-core/src/flows/ops_run_rows_and_notifications_tests.rsindex ff35145e1a..7b9f313a9c 100644--- a/crates/openhuman-core/src/flows/ops_run_rows_and_notifications_tests.rs+++ b/crates/openhuman-core/src/flows/ops_run_rows_and_notifications_tests.rs@@ -8,7 +8,7 @@ async fn flows_resume_with_no_recorded_run_for_thread_id_errors_clearly() {.await.unwrap();- let err = flows_resume(+ let err = flows_resume(&crate::core::runtime::DispatchCtx::ambient(),&config,&created.value.id,"thread-that-was-never-started",@@ -30,7 +30,7 @@ async fn flows_run_persists_a_flow_run_row_queryable_via_list_and_get() {.await.unwrap();- let run = flows_run(+ let run = flows_run(&crate::core::runtime::DispatchCtx::ambient(),&config,&created.value.id,json!({ "hello": "world" }),@@ -70,7 +70,7 @@ async fn flows_list_all_runs_aggregates_across_flows_newest_first() {.unwrap();// Run alpha first, then beta — beta's run is the newest.- flows_run(+ flows_run(&crate::core::runtime::DispatchCtx::ambient(),&config,&a.value.id,json!({}),@@ -79,7 +79,7 @@ async fn flows_list_all_runs_aggregates_across_flows_newest_first() {).await.unwrap();- let beta_run = flows_run(+ let beta_run = flows_run(&crate::core::runtime::DispatchCtx::ambient(),&config,&b.value.id,json!({}),@@ -128,7 +128,7 @@ async fn flows_run_emits_pending_approval_notification() {.await.unwrap();- let run = flows_run(+ let run = flows_run(&crate::core::runtime::DispatchCtx::ambient(),&config,&created.value.id,json!({}),@@ -187,7 +187,7 @@ async fn flows_run_does_not_notify_when_run_completes_without_pending_approvals(.unwrap();let created_id = created.value.id.clone();- flows_run(+ flows_run(&crate::core::runtime::DispatchCtx::ambient(),&config,&created.value.id,json!({}),@@ -269,7 +269,7 @@ async fn flows_run_publishes_flow_run_started_with_flow_and_run_id() {.await.unwrap();- let run = flows_run(+ let run = flows_run(&crate::core::runtime::DispatchCtx::ambient(),&config,&created.value.id,json!({}),@@ -362,7 +362,7 @@ async fn flows_run_finished_event_skips_pending_approval_and_fires_once_on_resum.await.unwrap();- let run = flows_run(+ let run = flows_run(&crate::core::runtime::DispatchCtx::ambient(),&config,&created.value.id,json!({ "x": 1 }),@@ -387,7 +387,7 @@ async fn flows_run_finished_event_skips_pending_approval_and_fires_once_on_resum);}- let resumed = flows_resume(&config, &created.value.id, &thread_id, pending, vec![])+ let resumed = flows_resume(&crate::core::runtime::DispatchCtx::ambient(), &config, &created.value.id, &thread_id, pending, vec![]).await.unwrap();assert_eq!(resumed.value["pending_approvals"], json!([]));@@ -505,7 +505,7 @@ async fn flows_run_persists_live_steps_with_status_and_timing() {.await.unwrap();- let run = flows_run(+ let run = flows_run(&crate::core::runtime::DispatchCtx::ambient(),&config,&created.value.id,json!({ "x": 1 }),@@ -559,7 +559,7 @@ async fn flows_cancel_run_cancels_a_parked_pending_approval_run() {// Run pauses at the gate → a durable `pending_approval` row with no live// task (the run future already returned): the not-in-flight cancel path.- let run = flows_run(+ let run = flows_run(&crate::core::runtime::DispatchCtx::ambient(),&config,&created.value.id,json!({}),@@ -596,7 +596,7 @@ async fn flows_cancel_run_cancels_a_parked_pending_approval_run() {assert_eq!(reloaded.value.last_status.as_deref(), Some("cancelled"));// A cancelled run can no longer be resumed — the status guard rejects it.- let err = flows_resume(+ let err = flows_resume(&crate::core::runtime::DispatchCtx::ambient(),&config,&created.value.id,&thread_id,@@ -616,7 +616,7 @@ async fn flows_cancel_run_of_an_already_completed_run_errors() {.await.unwrap();- let run = flows_run(+ let run = flows_run(&crate::core::runtime::DispatchCtx::ambient(),&config,&created.value.id,json!({}),diff --git a/crates/openhuman-core/src/flows/ops_triggers_and_resume_tests.rs b/crates/openhuman-core/src/flows/ops_triggers_and_resume_tests.rsindex daeab2ed95..045483eea6 100644--- a/crates/openhuman-core/src/flows/ops_triggers_and_resume_tests.rs+++ b/crates/openhuman-core/src/flows/ops_triggers_and_resume_tests.rs@@ -415,7 +415,7 @@ async fn flows_resume_continues_a_paused_run_to_completion() {.await.unwrap();- let run = flows_run(+ let run = flows_run(&crate::core::runtime::DispatchCtx::ambient(),&config,&created.value.id,json!({ "x": 1 }),@@ -429,7 +429,7 @@ async fn flows_resume_continues_a_paused_run_to_completion() {serde_json::from_value(run.value["pending_approvals"].clone()).unwrap();assert_eq!(pending, vec!["gate".to_string()]);- let resumed = flows_resume(&config, &created.value.id, &thread_id, pending, vec![])+ let resumed = flows_resume(&crate::core::runtime::DispatchCtx::ambient(), &config, &created.value.id, &thread_id, pending, vec![]).await.unwrap();assert_eq!(resumed.value["pending_approvals"], json!([]));@@ -472,7 +472,7 @@ async fn flows_resume_refuses_when_the_graph_changed_after_park() {.await.unwrap();- let run = flows_run(+ let run = flows_run(&crate::core::runtime::DispatchCtx::ambient(),&config,&created.value.id,json!({ "x": 1 }),@@ -511,7 +511,7 @@ async fn flows_resume_refuses_when_the_graph_changed_after_park() {).unwrap();- let error = flows_resume(+ let error = flows_resume(&crate::core::runtime::DispatchCtx::ambient(),&config,&created.value.id,&thread_id,@@ -545,7 +545,7 @@ async fn flows_resume_refuses_when_the_graph_changed_after_park() {// A second resume attempt must not succeed either — the checkpoint was// dropped, and the row is now terminal, not `pending_approval`.- let second = flows_resume(&config, &created.value.id, &thread_id, pending, vec![]).await;+ let second = flows_resume(&crate::core::runtime::DispatchCtx::ambient(), &config, &created.value.id, &thread_id, pending, vec![]).await;assert!(second.is_err(),"a settled/refused run must not be resumable again"diff --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 4b7f930317..b84c38f4aa 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@@ -13,7 +13,7 @@ async fn flows_cancel_run_of_a_completed_with_warnings_run_errors() {.await.unwrap();- let run = flows_run(+ let run = flows_run(&crate::core::runtime::DispatchCtx::ambient(),&config,&created.value.id,json!({}),@@ -54,7 +54,7 @@ async fn flows_cancel_run_of_an_interrupted_run_errors() {.await.unwrap();- let run = flows_run(+ let run = flows_run(&crate::core::runtime::DispatchCtx::ambient(),&config,&created.value.id,json!({}),@@ -129,7 +129,7 @@ async fn parked_run_ttl_sweep_expires_stale_runs_but_spares_fresh_ones() {.unwrap();// A genuinely fresh parked run (just paused now) must survive the sweep.- let fresh = flows_run(+ let fresh = flows_run(&crate::core::runtime::DispatchCtx::ambient(),&config,&created.value.id,json!({}),@@ -157,7 +157,7 @@ async fn parked_run_ttl_sweep_expires_stale_runs_but_spares_fresh_ones() {);// The swept run is no longer resumable.- let err = flows_resume(+ let err = flows_resume(&crate::core::runtime::DispatchCtx::ambient(),&config,&created.value.id,&stale_id,