Skip to content

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

test(tests): update flow and session tests

Steven Enamakel11436546ed8c
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.rs
index 9fd9b7a48e..bc14b01dfc 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
@@ -51,7 +51,7 @@ async fn flows_run_detached_registers_the_run_before_returning_its_id() {
let flow = store::create_flow(
&config,
"detached-cancel-race".to_string(),
- approval_gated_graph(),
+ structurally_valid_graph(approval_gated_graph()),
false,
true,
)
diff --git a/crates/openhuman-core/src/flows/ops_run_lifecycle_tests.rs b/crates/openhuman-core/src/flows/ops_run_lifecycle_tests.rs
index da519d5aec..923168cb56 100644
--- a/crates/openhuman-core/src/flows/ops_run_lifecycle_tests.rs
+++ b/crates/openhuman-core/src/flows/ops_run_lifecycle_tests.rs
@@ -17,7 +17,7 @@ async fn create_parked_run(config: &Config, name: &str) -> (Flow, String, Vec<St
.unwrap()
.value;
let run_id = parked["thread_id"].as_str().unwrap().to_owned();
- let pending = serde_json::from_value(parked["pending_approvals"].clone()).unwrap();
+ let pending: Vec<String> = serde_json::from_value(parked["pending_approvals"].clone()).unwrap();
assert!(!pending.is_empty(), "the fixture must park for approval");
(flow, run_id, pending)
}
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.rs
index 46afae2e56..f4b00c7ec5 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
@@ -1,4 +1,5 @@
use super::*;
+use chrono::Utc;
// The module owns terminal status classification; the public cancel boundary
// is covered by real module-created completed runs in ops_run_rows_and_notifications_tests.rs.
diff --git a/crates/openhuman-core/src/flows/runs_adapter/session_tests.rs b/crates/openhuman-core/src/flows/runs_adapter/session_tests.rs
index 83af81fa5a..126184b192 100644
--- a/crates/openhuman-core/src/flows/runs_adapter/session_tests.rs
+++ b/crates/openhuman-core/src/flows/runs_adapter/session_tests.rs
@@ -42,8 +42,9 @@ async fn private_agent_progress_advances_cursor_without_leaking_text_or_replayin
crate::core::bus::init().await.expect("bus init");
let collector = Arc::new(Collector::default());
+ let handler: Arc<dyn EventHandler<DomainEvent>> = collector.clone();
let _subscription = crate::core::bus::BUS
- .subscribe(Arc::clone(&collector))
+ .subscribe(handler)
.expect("subscriber installed");
let tmp = tempfile::TempDir::new().unwrap();