Skip to content

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

chore(agent): move turn progress tests under their module

Steven Enamakelbb91096debb9
diff --git a/crates/openhuman-core/src/agent/turn_progress.rs b/crates/openhuman-core/src/agent/turn_progress.rs
index fcb2c7871e..882988f8ca 100644
--- a/crates/openhuman-core/src/agent/turn_progress.rs
+++ b/crates/openhuman-core/src/agent/turn_progress.rs
@@ -434,3 +434,7 @@ pub(crate) fn sub_delta(
out.iteration = Some(iteration);
ChannelOutputEvent::Subagent(Box::new(out))
}
+
+#[cfg(test)]
+#[path = "turn_progress_tests.rs"]
+mod tests;
diff --git a/crates/openhuman-core/src/agent/turn_progress_tests.rs b/crates/openhuman-core/src/agent/turn_progress_tests.rs
index 5ad986f0d7..5a88a92257 100644
--- a/crates/openhuman-core/src/agent/turn_progress_tests.rs
+++ b/crates/openhuman-core/src/agent/turn_progress_tests.rs
@@ -90,12 +90,10 @@ fn a_finished_tool_call_caps_output_and_arguments_and_names_its_failure() {
panic!("tool result")
};
assert!(output.len() <= MAX_WEB_TOOL_PAYLOAD_BYTES && output.contains("truncated"));
- assert!(
- arguments
- .expect("arguments")
- .as_str()
- .is_some_and(|marker| marker.contains("truncated"))
- );
+ assert!(arguments
+ .expect("arguments")
+ .as_str()
+ .is_some_and(|marker| marker.contains("truncated")));
let summary = summary.expect("failure summary");
assert_eq!(summary.cause_plain, failure.cause_plain);
assert_eq!(summary.recoverable, failure.recoverable);
@@ -300,11 +298,9 @@ fn subagent_tool_calls_carry_their_arguments_and_capped_results() {
.expect("a completed sub-agent call"),
);
assert_eq!(completed.state, "tool_result");
- assert!(
- completed
- .output
- .is_some_and(|out| out.contains("truncated"))
- );
+ assert!(completed
+ .output
+ .is_some_and(|out| out.contains("truncated")));
assert_eq!(completed.structured, Some(json!({ "kind": "web_search" })));
assert!(sub_tool_completed(AgentProgress::TurnStarted).is_none());
}
diff --git a/crates/openhuman-core/src/web_chat/progress_map.rs b/crates/openhuman-core/src/web_chat/progress_map.rs
index 4961c65df2..581575d16e 100644
--- a/crates/openhuman-core/src/web_chat/progress_map.rs
+++ b/crates/openhuman-core/src/web_chat/progress_map.rs
@@ -5,14 +5,3 @@
//! use the same payload caps and structured tool failures.
pub(crate) use crate::agent::turn_progress::*;
-
-#[cfg(test)]
-use serde_json::Value;
-#[cfg(test)]
-use tinyagents_harness::progress::AgentProgress;
-#[cfg(test)]
-use tinychannels_bus::module_progressive::{ChannelOutputEvent, SubagentOutput};
-
-#[cfg(test)]
-#[path = "progress_map_tests.rs"]
-mod tests;