Skip to content

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

style: reformat subagent session and dispatch test code

Steven Enamakel03068531aebe
diff --git a/crates/openhuman-core/src/agent/orchestration/subagent_sessions/mod.rs b/crates/openhuman-core/src/agent/orchestration/subagent_sessions/mod.rs
index fa04b75886..6c076435ae 100644
--- a/crates/openhuman-core/src/agent/orchestration/subagent_sessions/mod.rs
+++ b/crates/openhuman-core/src/agent/orchestration/subagent_sessions/mod.rs
@@ -6,9 +6,8 @@ mod types;
pub use ops::{
action_root_key, cancel_driver_job_for_session, cancel_driver_jobs_for_thread, close,
- find_reusable, list_for_parent,
- mark_failed, mark_finished, normalize_task_key, resolve_lifecycle_key, reuse_decision,
- task_title_from_prompt, upsert_running,
+ find_reusable, list_for_parent, mark_failed, mark_finished, normalize_task_key,
+ resolve_lifecycle_key, reuse_decision, task_title_from_prompt, upsert_running,
};
pub(crate) use tiny_port::OpenHumanTinySubagentSessionStore;
pub use types::{
diff --git a/crates/openhuman-core/src/agent/orchestration/subagent_sessions/ops.rs b/crates/openhuman-core/src/agent/orchestration/subagent_sessions/ops.rs
index 784198f244..54838937e9 100644
--- a/crates/openhuman-core/src/agent/orchestration/subagent_sessions/ops.rs
+++ b/crates/openhuman-core/src/agent/orchestration/subagent_sessions/ops.rs
@@ -97,9 +97,7 @@ pub fn cancel_driver_job_for_session(
};
let key = session
.lifecycle_key
- .filter(|key| {
- key.task_id == task_id && key.thread_id.as_deref() == parent_thread_id
- })
+ .filter(|key| key.task_id == task_id && key.thread_id.as_deref() == parent_thread_id)
.or_else(|| {
resolve_lifecycle_key(
store,
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/dispatch_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/dispatch_tests.rs
index f0e6c19b45..cbfbc6ea8e 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/dispatch_tests.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/dispatch_tests.rs
@@ -229,14 +229,20 @@ async fn config_delegate_dispatch_preserves_tool_failure_in_shared_jobs() {
.expect("the host returns the configured tool result");
assert!(result.is_error);
- assert!(result.output().contains("configured policy rejected the request"));
- assert!(jobs.list().iter().any(|job| {
- job.agent == "configured-error"
- && job.status == tinyagents_orchestration::subagent::SubAgentJobStatus::Incomplete
- && job.output.as_deref().is_some_and(|error| {
- error.contains("configured policy rejected the request")
- })
- }), "the registered job retains the configured product failure");
+ assert!(result
+ .output()
+ .contains("configured policy rejected the request"));
+ assert!(
+ jobs.list().iter().any(|job| {
+ job.agent == "configured-error"
+ && job.status == tinyagents_orchestration::subagent::SubAgentJobStatus::Incomplete
+ && job
+ .output
+ .as_deref()
+ .is_some_and(|error| error.contains("configured policy rejected the request"))
+ }),
+ "the registered job retains the configured product failure"
+ );
}
#[test]