Skip to content

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

chore: fix doc indentation and redundant borrows in tests

Steven Enamakel6f0574407fa7
diff --git a/crates/openhuman-core/src/agent/context/mod.rs b/crates/openhuman-core/src/agent/context/mod.rs
index c54acac883..4241666a7e 100644
--- a/crates/openhuman-core/src/agent/context/mod.rs
+++ b/crates/openhuman-core/src/agent/context/mod.rs
@@ -9,7 +9,7 @@
//! module; there is no parallel implementation elsewhere in the crate.
//!
//! 2. **Middleware configuration** — `ContextConfig` configures the TinyAgents
-//! turn middleware stack.
+//! turn middleware stack.
//!
//! Session hosts hold their prompt builder and context settings directly;
//! TinyAgents owns live transcript reduction and middleware execution.
diff --git a/crates/openhuman-core/src/agent/session_host/runtime_session_tests.rs b/crates/openhuman-core/src/agent/session_host/runtime_session_tests.rs
index 979e0e5c18..8af49a55ad 100644
--- a/crates/openhuman-core/src/agent/session_host/runtime_session_tests.rs
+++ b/crates/openhuman-core/src/agent/session_host/runtime_session_tests.rs
@@ -472,7 +472,7 @@ async fn a_resumed_orchestrator_keeps_the_integration_actions_it_was_sent() {
// Fresh process: no integrations known, so no actions are synthesised.
prelude.refresh_delegation_tool_surface().unwrap();
- assert!(!synthesized_tool_names(&prelude).contains("GMAIL_SEND_EMAIL"));
+ assert!(!synthesized_tool_names(prelude).contains("GMAIL_SEND_EMAIL"));
// Resume hands back what the thread was sent.
let recorded = ToolSnapshot::new(vec![
@@ -497,7 +497,7 @@ async fn a_resumed_orchestrator_keeps_the_integration_actions_it_was_sent() {
}
prelude.refresh_delegation_tool_surface().unwrap();
- let names = synthesized_tool_names(&prelude);
+ let names = synthesized_tool_names(prelude);
assert!(names.contains("GMAIL_SEND_EMAIL"), "{names:?}");
assert!(names.contains("GMAIL_FETCH_EMAILS"), "{names:?}");
assert!(
diff --git a/crates/openhuman-core/src/inference/host_runtime/ops/agent_chat_tests.rs b/crates/openhuman-core/src/inference/host_runtime/ops/agent_chat_tests.rs
index 07379b1b09..4d41c201e7 100644
--- a/crates/openhuman-core/src/inference/host_runtime/ops/agent_chat_tests.rs
+++ b/crates/openhuman-core/src/inference/host_runtime/ops/agent_chat_tests.rs
@@ -87,7 +87,7 @@ fn chat_origin(thread: &str) -> crate::security::turn_origin::AgentTurnOrigin {
crate::security::turn_origin::AgentTurnOrigin::WebChat {
thread_id: thread.into(),
client_id: "client".into(),
- request_id: format!("req-{thread}").into(),
+ request_id: format!("req-{thread}"),
}
}
diff --git a/crates/openhuman-core/src/web_chat/turn_guards/backstop_tests.rs b/crates/openhuman-core/src/web_chat/turn_guards/backstop_tests.rs
index ec76bd6a6a..66b201205d 100644
--- a/crates/openhuman-core/src/web_chat/turn_guards/backstop_tests.rs
+++ b/crates/openhuman-core/src/web_chat/turn_guards/backstop_tests.rs
@@ -28,7 +28,7 @@ fn web_backstop_defaults_to_an_hour_and_keeps_the_override() {
Some(Duration::from_secs(120))
);
assert_eq!(parse_web_backstop(Some("0")), None);
- let deadline = TurnDeadline::starting_now(hour.unwrap());
+ let deadline = TurnDeadline::starting_now(Duration::from_secs(DEFAULT_WEB_TURN_BACKSTOP_SECS));
assert_eq!(deadline.wind_down_after(), Duration::from_secs(3_480));
assert_eq!(deadline.hard_stop_after(), Duration::from_secs(3_540));
}