Skip to content

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

test(channels): update test assertions and setup

Steven Enamakelf01715d8d43c
diff --git a/crates/openhuman-core/src/channels/tests/runtime_dispatch.rs b/crates/openhuman-core/src/channels/tests/runtime_dispatch.rs
index c9ecaebaac..238a30279d 100644
--- a/crates/openhuman-core/src/channels/tests/runtime_dispatch.rs
+++ b/crates/openhuman-core/src/channels/tests/runtime_dispatch.rs
@@ -174,7 +174,7 @@ async fn process_channel_message_cancels_scoped_typing_task() {
topic_id: None,
id: "typing-msg".to_string(),
sender: "alice".to_string(),
- reply_target: "chat-typing".to_string(),
+ reply_target: "42".to_string(),
content: "hello".to_string(),
channel: "test-channel".to_string(),
timestamp: 1,
diff --git a/crates/openhuman-core/src/channels/tests/runtime_tool_calls.rs b/crates/openhuman-core/src/channels/tests/runtime_tool_calls.rs
index 86653ce2ab..7c34d3d551 100644
--- a/crates/openhuman-core/src/channels/tests/runtime_tool_calls.rs
+++ b/crates/openhuman-core/src/channels/tests/runtime_tool_calls.rs
@@ -78,6 +78,10 @@ async fn process_channel_message_executes_native_tool_calls() {
#[tokio::test]
async fn process_channel_message_handles_models_command_without_llm_call() {
let _bus_guard = super::common::use_real_agent_handler().await;
+ let _module_storage = crate::channels::module_fixture::install_memory_storage();
+ let _module_client = crate::channels::module_fixture::client().await;
+ crate::core::bus::init().await.expect("bus init");
+ let _builtins = crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global_builtins();
let channel_impl = Arc::new(TestChannel::new("telegram"));
let channel = Arc::new(ChannelHandle::Test(channel_impl.clone()));
@@ -366,5 +370,9 @@ async fn process_channel_message_reports_configured_max_tool_iterations_limit()
let sent_messages = channel_impl.sent_messages.lock().await;
assert_eq!(sent_messages.len(), 1);
assert!(sent_messages[0].starts_with("chat-iter-fail:"));
- assert!(sent_messages[0].contains("⚠️ Error: Agent exceeded maximum tool iterations (3)"));
+ assert!(
+ sent_messages[0].contains("maximum number of tool steps")
+ && sent_messages[0].contains("retry the same question in this thread"),
+ "the user-facing max-iteration copy should explain the cap and allow retrying: {sent_messages:?}"
+ );
}