Skip to content

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

style: reformat test assertions and bindings

Steven Enamakel915355f2525b
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_tests.rs
index 334c29bb8f..57eea1c091 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_tests.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_tests.rs
@@ -473,10 +473,11 @@ async fn deleted_thread_marker_survives_router_restart_and_refuses_async_spawn()
let mut config = crate::config::Config::default();
config.workspace_dir = workspace.path().to_path_buf();
config.components.juice = false;
- let core = CoreContext::for_test_with_config(DomainSet::full(), config.clone()).derive_with(
- ContextOverlay::new(config, DomainSet::full(), ToolGroups::none())
- .definitions(definitions),
- );
+ let core = CoreContext::for_test_with_config(DomainSet::full(), config.clone())
+ .derive_with(
+ ContextOverlay::new(config, DomainSet::full(), ToolGroups::none())
+ .definitions(definitions),
+ );
let mut host_context = OpenHumanRunContext::new()
.with_core(Some(Arc::clone(&core)))
.with_parent(parent);
@@ -510,11 +511,7 @@ async fn deleted_thread_marker_survives_router_restart_and_refuses_async_spawn()
1,
"the fixture starts with a durable pending completion"
);
- background_completions::discard_for_thread(
- &original_dispatch,
- workspace.path(),
- thread_id,
- );
+ background_completions::discard_for_thread(&original_dispatch, workspace.path(), thread_id);
assert!(background_completions::pending_for(workspace.path(), thread_id).is_empty());
// Drop process-local router and thread gates, then reopen the same durable
@@ -547,9 +544,19 @@ async fn deleted_thread_marker_survives_router_restart_and_refuses_async_spawn()
.expect("spawn tool execution");
assert!(result.is_error, "deleted-thread spawn must be refused");
- assert!(result.output().contains("stopped or deleted"), "{}", result.output());
- assert!(provider.seen.lock().is_empty(), "refusal never calls the model");
- assert!(progress_rx.try_recv().is_err(), "refusal emits no spawn card");
+ assert!(
+ result.output().contains("stopped or deleted"),
+ "{}",
+ result.output()
+ );
+ assert!(
+ provider.seen.lock().is_empty(),
+ "refusal never calls the model"
+ );
+ assert!(
+ progress_rx.try_recv().is_err(),
+ "refusal emits no spawn card"
+ );
assert!(
crate::agent::orchestration::subagent_sessions::SubagentSessionStore::new(
workspace.path().to_path_buf()
diff --git a/crates/openhuman-core/src/agent/tinyagents/tool_registration_tests.rs b/crates/openhuman-core/src/agent/tinyagents/tool_registration_tests.rs
index 3011108fb8..2e3a6ee2a8 100644
--- a/crates/openhuman-core/src/agent/tinyagents/tool_registration_tests.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/tool_registration_tests.rs
@@ -263,7 +263,7 @@ async fn live_close_alias_enforces_parent_thread_ownership() {
.with_core(Some(Arc::clone(&core)))
.with_parent(parent);
live_context.thread_id = Some("voice-thread".into());
- let run = live_context
+ let mut run = live_context
.into_tinyagents(RunConfig::new("live-close-parent").with_thread("voice-thread"));
let mut status = tinyagents_harness::events::HarnessRunStatus::new(
run.run_id().clone(),