The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
refactor(channels): move callback tests module into callback.rs
Steven Enamakel445e05b53ece
diff --git a/crates/openhuman-core/src/channels/runtime/startup.rs b/crates/openhuman-core/src/channels/runtime/startup.rsindex a20d939559..8092b220a9 100644--- a/crates/openhuman-core/src/channels/runtime/startup.rs+++ b/crates/openhuman-core/src/channels/runtime/startup.rs@@ -1,9 +1,6 @@//! Channel startup wiring.mod callback;-#[cfg(test)]-#[path = "startup/callback_tests.rs"]-mod callback_tests;mod chat_workload;mod credentials;mod delivery_import;diff --git a/crates/openhuman-core/src/channels/runtime/startup/callback.rs b/crates/openhuman-core/src/channels/runtime/startup/callback.rsindex d30d01ac59..616733cbbe 100644--- a/crates/openhuman-core/src/channels/runtime/startup/callback.rs+++ b/crates/openhuman-core/src/channels/runtime/startup/callback.rs@@ -69,6 +69,10 @@ impl ChannelHostCallbacks {}}+#[cfg(test)]+#[path = "callback_tests.rs"]+mod tests;+#[tinybus::interface(name = "ai.tinyhumans.tinychannels.ChannelsHost")]impl ChannelHostCallbacks {async fn deliver_inbound(&self, channel: String, message: serde_json::Value) -> Result<()> {diff --git a/crates/openhuman-core/src/channels/runtime/startup/callback_tests.rs b/crates/openhuman-core/src/channels/runtime/startup/callback_tests.rsindex 3351ff03b2..e5de35d343 100644--- a/crates/openhuman-core/src/channels/runtime/startup/callback_tests.rs+++ b/crates/openhuman-core/src/channels/runtime/startup/callback_tests.rs@@ -1,8 +1,8 @@use super::*;+use crate::channels::Channel;use crate::channels::context::ChannelRuntimeContext;use crate::channels::runtime::dispatch::RuntimeChannelMessage;-use crate::channels::Channel;use std::collections::HashMap;use std::sync::{Arc, Mutex, OnceLock, Weak};use tinychannels_bus::channel::{@@ -148,8 +148,19 @@ async fn native_progressive_transport_dispatches_typed_content_through_configure);let sent = channel.sent.lock().await;assert_eq!(sent.len(), 1);- assert_eq!(sent[0].channel_ref.as_ref().unwrap().account_id.as_deref(), Some("bot-account-a"));- assert_eq!(sent[0].conversation_ref.as_ref().unwrap().thread_id.as_deref(), Some("topic-9"));+ assert_eq!(+ sent[0].channel_ref.as_ref().unwrap().account_id.as_deref(),+ Some("bot-account-a")+ );+ assert_eq!(+ sent[0]+ .conversation_ref+ .as_ref()+ .unwrap()+ .thread_id+ .as_deref(),+ Some("topic-9")+ );assert_eq!(sent[0].turn_id.as_deref(), Some("turn-11"));assert_eq!(sent[0].idempotency_key, "turn-11:3:1");assert_eq!(sent[0].parts, parts);