Skip to content

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

test(tests): update test modules with new imports and refactors

Steven Enamakel4cb87e7e387a
diff --git a/crates/openhuman-core/src/agent/orchestration/subagent_sessions/ops_tests.rs b/crates/openhuman-core/src/agent/orchestration/subagent_sessions/ops_tests.rs
index 02c12a0a29..619a063eb1 100644
--- a/crates/openhuman-core/src/agent/orchestration/subagent_sessions/ops_tests.rs
+++ b/crates/openhuman-core/src/agent/orchestration/subagent_sessions/ops_tests.rs
@@ -550,6 +550,7 @@ fn an_equal_millisecond_live_close_persists_and_a_stale_snapshot_cannot_reopen_i
task_title: "Task".into(),
worker_thread_id: None,
task_id: "task-id".into(),
+ lifecycle_key: None,
},
None,
)
diff --git a/crates/openhuman-core/src/agent/prompts/mod_tests_composition_tests.rs b/crates/openhuman-core/src/agent/prompts/mod_tests_composition_tests.rs
index 1ea657a798..d056afd5e6 100644
--- a/crates/openhuman-core/src/agent/prompts/mod_tests_composition_tests.rs
+++ b/crates/openhuman-core/src/agent/prompts/mod_tests_composition_tests.rs
@@ -33,6 +33,7 @@ fn composed_prompt_keeps_context_and_volatile_system_message_boundaries() {
personality_roster: vec![],
agents_md_global: None,
agents_md_local: None,
+ flow_archetype_text: None,
};
RENDERS.store(0, std::sync::atomic::Ordering::SeqCst);
@@ -91,6 +92,7 @@ fn unmarked_dynamic_body_stays_volatile_after_stable_and_context_messages() {
personality_roster: vec![],
agents_md_global: None,
agents_md_local: None,
+ flow_archetype_text: None,
};
let rendered = SystemPromptBuilder::from_dynamic(dynamic_prompt)
.build_tiered(&ctx)
diff --git a/crates/openhuman-core/src/agent/subagent_host/tool_prep_tests.rs b/crates/openhuman-core/src/agent/subagent_host/tool_prep_tests.rs
index b2e9c52ddc..640112b847 100644
--- a/crates/openhuman-core/src/agent/subagent_host/tool_prep_tests.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/tool_prep_tests.rs
@@ -107,6 +107,7 @@ fn dynamic_child_prompt_lists_text_dialect_catalogue_once() {
personality_roster: vec![],
agents_md_global: None,
agents_md_local: None,
+ flow_archetype_text: None,
};
let definition = AgentDefinition {
id: "dynamic-child".into(),
diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware/repeated_failure_tests.rs b/crates/openhuman-core/src/agent/tinyagents/middleware/repeated_failure_tests.rs
index a763cc227b..d409dd99d2 100644
--- a/crates/openhuman-core/src/agent/tinyagents/middleware/repeated_failure_tests.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/middleware/repeated_failure_tests.rs
@@ -7,7 +7,7 @@ async fn classified_stop_cause_survives_the_latch_cleanup_on_agent_finish() {
let slot = std::sync::Arc::new(std::sync::Mutex::new(None));
let handle = SteeringHandle::new(SteeringPolicy::new());
let middleware = RepeatedToolFailureMiddleware::new(handle, 3, slot);
- middleware.stop.halt_classified(
+ middleware.policy.stop.halt_classified(
"classified summary".into(),
"uncertain_side_effect",
"web_answer_tool",
diff --git a/crates/openhuman-core/src/flows/bus_subscriber_tests.rs b/crates/openhuman-core/src/flows/bus_subscriber_tests.rs
index 82c34de170..eda403b666 100644
--- a/crates/openhuman-core/src/flows/bus_subscriber_tests.rs
+++ b/crates/openhuman-core/src/flows/bus_subscriber_tests.rs
@@ -233,7 +233,7 @@ async fn digest_ignores_cancelled_run() {
}
#[tokio::test]
-fn digest_rendering_scrubs_persisted_outputs() {
+async fn digest_rendering_scrubs_persisted_outputs() {
let step = tinyflows_catalog::FlowRunStep {
node_id: "n1".to_string(),
output: json!({
diff --git a/crates/openhuman-core/src/flows/caps_host/prompt_tests.rs b/crates/openhuman-core/src/flows/caps_host/prompt_tests.rs
index 7f6be13640..78dfaba2e5 100644
--- a/crates/openhuman-core/src/flows/caps_host/prompt_tests.rs
+++ b/crates/openhuman-core/src/flows/caps_host/prompt_tests.rs
@@ -1,4 +1,5 @@
use super::*;
+use crate::inference::provider::BilledUsage;
/// The flow `agent`/`llm` node result exposes usage under these exact keys;
/// they are a contract with saved flows, so pin the literal JSON.
diff --git a/crates/openhuman-core/src/flows/catalog_storage_tests.rs b/crates/openhuman-core/src/flows/catalog_storage_tests.rs
index df16e44ddd..6852d0c9a5 100644
--- a/crates/openhuman-core/src/flows/catalog_storage_tests.rs
+++ b/crates/openhuman-core/src/flows/catalog_storage_tests.rs
@@ -479,7 +479,7 @@ async fn catalog_storage_resolves_the_current_backend_and_confines_graph_namespa
.unwrap();
assert!(matches!(ensured, CatalogStorageReply::Value { .. }));
let rebound = proxy
- .call::<CatalogStorageReply, _>(
+ .call::<CatalogStorageReply>(
catalog::storage::GET,
&(catalog::DocGetRequest {
collection: "graph.threads".into(),
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 8e93580191..9fd9b7a48e 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
@@ -37,9 +37,10 @@ async fn flows_run_detached_returns_running_run_id_and_inserts_row() {
// The `running` row is inserted synchronously before the background task is
// spawned, so the copilot's immediate `get_flow_run(run_id)` poll finds it.
- let row = store::get_flow_run(&config, &run_id)
- .unwrap()
- .expect("a run row must exist immediately after detaching");
+ let row = flows_get_run(&config, &run_id)
+ .await
+ .expect("a run row must exist immediately after detaching")
+ .value;
assert_eq!(row.flow_id, flow.id);
}
diff --git a/crates/openhuman-core/src/flows/ops_run_finalizer_tests.rs b/crates/openhuman-core/src/flows/ops_run_finalizer_tests.rs
index 5f5289c285..03881c4f63 100644
--- a/crates/openhuman-core/src/flows/ops_run_finalizer_tests.rs
+++ b/crates/openhuman-core/src/flows/ops_run_finalizer_tests.rs
@@ -29,7 +29,7 @@ async fn streamed_flow_finalizer_settles_the_bridge_workspace_turn_state() {
request_id: "flow-stream-request-binding".to_string(),
};
for config in [&config_a, &config_b] {
- crate::agent::session_store::turn_states_for(&config.workspace_dir)
+ crate::storage::sessions::turn_states_for(&config.workspace_dir)
.put(&TurnState::started(
target.thread_id.clone(),
target.request_id.clone(),
@@ -49,11 +49,11 @@ async fn streamed_flow_finalizer_settles_the_bridge_workspace_turn_state() {
)
.await;
- let state_a = crate::agent::session_store::turn_states_for(&config_a.workspace_dir)
+ let state_a = crate::storage::sessions::turn_states_for(&config_a.workspace_dir)
.get_turn(&target.thread_id, &target.request_id)
.unwrap()
.unwrap();
- let state_b = crate::agent::session_store::turn_states_for(&config_b.workspace_dir)
+ let state_b = crate::storage::sessions::turn_states_for(&config_b.workspace_dir)
.get_turn(&target.thread_id, &target.request_id)
.unwrap()
.unwrap();
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.rs
index 9f7a967f8b..fbe29adae1 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
@@ -474,7 +474,7 @@ async fn flows_run_persists_live_steps_with_status_and_timing() {
}
}
- BUS.init().await.expect("bus init");
+ crate::core::bus::init().await.expect("bus init");
let progress = Arc::new(Mutex::new(Vec::new()));
let _progress_subscription = BUS
.subscribe(Arc::new(ProgressCollector {
diff --git a/crates/openhuman-core/src/flows/ops_tests.rs b/crates/openhuman-core/src/flows/ops_tests.rs
index c45fd87db2..8be14e34f3 100644
--- a/crates/openhuman-core/src/flows/ops_tests.rs
+++ b/crates/openhuman-core/src/flows/ops_tests.rs
@@ -431,8 +431,8 @@ fn seeded_slack_send_message_contract_with_schema() -> ToolContract {
// degrade_completed_status (PR2 — run honesty)
// ─────────────────────────────────────────────────────────────────────────────
-fn clean_step(node_id: &str) -> FlowRunStep {
- FlowRunStep {
+fn clean_step(node_id: &str) -> tinyflows_catalog::FlowRunStep {
+ tinyflows_catalog::FlowRunStep {
node_id: node_id.to_string(),
output: Value::Null,
port: None,
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 1b3c971330..83af81fa5a 100644
--- a/crates/openhuman-core/src/flows/runs_adapter/session_tests.rs
+++ b/crates/openhuman-core/src/flows/runs_adapter/session_tests.rs
@@ -40,7 +40,7 @@ async fn private_agent_progress_advances_cursor_without_leaking_text_or_replayin
}
}
- crate::core::bus::BUS.init().await.expect("bus init");
+ crate::core::bus::init().await.expect("bus init");
let collector = Arc::new(Collector::default());
let _subscription = crate::core::bus::BUS
.subscribe(Arc::clone(&collector))