Skip to content

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

fix(running_subagents): reformat long function calls and assertions

Steven Enamakelce2ec8a0551f
diff --git a/crates/openhuman-core/src/agent/orchestration/running_subagents.rs b/crates/openhuman-core/src/agent/orchestration/running_subagents.rs
index af402bce56..3a7d745dad 100644
--- a/crates/openhuman-core/src/agent/orchestration/running_subagents.rs
+++ b/crates/openhuman-core/src/agent/orchestration/running_subagents.rs
@@ -64,8 +64,7 @@ mod tests;
#[cfg(test)]
pub(crate) use cancel::prune;
pub(crate) use cancel::{
- cancel_all, cancel_by_session_in_workspace, cancel_by_task, cancel_for_thread,
- stop_for_thread,
+ cancel_all, cancel_by_session_in_workspace, cancel_by_task, cancel_for_thread, stop_for_thread,
};
pub(crate) use registry::{register, status_channel, SubagentResumeRef, SubagentStatus};
pub(crate) use resolve::{resume_ref_for_task_in_workspace, task_id_for_session_in_workspace};
diff --git a/crates/openhuman-core/src/agent/orchestration/running_subagents_tests.rs b/crates/openhuman-core/src/agent/orchestration/running_subagents_tests.rs
index b9a9cf0d0d..2de5a5f64b 100644
--- a/crates/openhuman-core/src/agent/orchestration/running_subagents_tests.rs
+++ b/crates/openhuman-core/src/agent/orchestration/running_subagents_tests.rs
@@ -610,7 +610,8 @@ async fn stop_for_thread_aborts_the_threads_running_children() {
rx,
);
// Another thread's child must survive the stop.
- let _other = register_test_with_thread("task-stop-other", "session-stop", Some("thread-keep"), rq);
+ let _other =
+ register_test_with_thread("task-stop-other", "session-stop", Some("thread-keep"), rq);
let stopped = stop_for_thread("thread-stop");
assert_eq!(stopped, vec!["task-stop-1".to_string()]);
@@ -627,9 +628,14 @@ async fn stop_for_thread_aborts_the_threads_running_children() {
Err(SteerError::Unknown)
);
assert!(
- steer("task-stop-other", "session-stop", "x".into(), QueueLane::Steer)
- .await
- .is_ok(),
+ steer(
+ "task-stop-other",
+ "session-stop",
+ "x".into(),
+ QueueLane::Steer
+ )
+ .await
+ .is_ok(),
"a different thread's sub-agent is untouched"
);
assert!(stop_for_thread("thread-stop").is_empty(), "idempotent");
diff --git a/crates/openhuman-core/src/web_chat/web_tests_session_and_concurrency_tests.rs b/crates/openhuman-core/src/web_chat/web_tests_session_and_concurrency_tests.rs
index 73a153d230..e424a6dcc1 100644
--- a/crates/openhuman-core/src/web_chat/web_tests_session_and_concurrency_tests.rs
+++ b/crates/openhuman-core/src/web_chat/web_tests_session_and_concurrency_tests.rs
@@ -581,7 +581,10 @@ async fn unscoped_cancel_stops_the_threads_detached_subagents() {
.expect("scoped cancel");
assert_eq!(scoped.value["cancelled"], serde_json::json!(false));
assert_eq!(scoped.value["subagents_cancelled"], serde_json::json!(0));
- assert!(!child.is_finished(), "scoped cancel must not stop sub-agents");
+ assert!(
+ !child.is_finished(),
+ "scoped cancel must not stop sub-agents"
+ );
// The Stop button: no turn in flight, but the detached child is stopped.
let stop = channel_web_cancel("stop-client", thread_id, None)