Skip to content

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

style(tinyagents): reformat turn policy signature and test assertions

Steven Enamakel7e56f7f89823
diff --git a/crates/openhuman-core/src/agent/tinyagents/turn_policy.rs b/crates/openhuman-core/src/agent/tinyagents/turn_policy.rs
index 986a215155..8aa313f619 100644
--- a/crates/openhuman-core/src/agent/tinyagents/turn_policy.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/turn_policy.rs
@@ -133,9 +133,7 @@ pub(super) fn parse_stream_first_event_timeout_ms(env_value: Option<&str>) -> Op
/// Pure core of the idle-timeout breaker:
/// `OPENHUMAN_MAX_CONSECUTIVE_STREAM_IDLE_TIMEOUTS`, `0` disables.
-pub(super) fn parse_max_consecutive_stream_idle_timeouts(
- env_value: Option<&str>,
-) -> Option<usize> {
+pub(super) fn parse_max_consecutive_stream_idle_timeouts(env_value: Option<&str>) -> Option<usize> {
let n = env_value
.and_then(|v| v.trim().parse::<usize>().ok())
.unwrap_or(DEFAULT_MAX_CONSECUTIVE_STREAM_IDLE_TIMEOUTS);
diff --git a/crates/openhuman-core/src/agent/tinyagents/turn_policy_budget_tests.rs b/crates/openhuman-core/src/agent/tinyagents/turn_policy_budget_tests.rs
index b3bf9bc763..f4ed154337 100644
--- a/crates/openhuman-core/src/agent/tinyagents/turn_policy_budget_tests.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/turn_policy_budget_tests.rs
@@ -31,9 +31,15 @@ fn stream_timeout_env_overrides_parse() {
assert_eq!(parse_stream_idle_timeout_ms(Some("30")), Some(30_000));
assert_eq!(parse_stream_idle_timeout_ms(Some("0")), None);
assert_eq!(parse_stream_idle_timeout_ms(Some("junk")), Some(120_000));
- assert_eq!(parse_stream_first_event_timeout_ms(Some("45")), Some(45_000));
+ assert_eq!(
+ parse_stream_first_event_timeout_ms(Some("45")),
+ Some(45_000)
+ );
assert_eq!(parse_stream_first_event_timeout_ms(Some("0")), None);
assert_eq!(parse_stream_first_event_timeout_ms(None), None);
assert_eq!(parse_max_consecutive_stream_idle_timeouts(Some("0")), None);
- assert_eq!(parse_max_consecutive_stream_idle_timeouts(Some("2")), Some(2));
+ assert_eq!(
+ parse_max_consecutive_stream_idle_timeouts(Some("2")),
+ Some(2)
+ );
}