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
test(channels): align channel tests with contract crate types
Steven Enamakelbfc4f1be0802
diff --git a/crates/openhuman-core/src/channels/context_tests.rs b/crates/openhuman-core/src/channels/context_tests.rsindex e4edec7879..e3d8622aca 100644--- a/crates/openhuman-core/src/channels/context_tests.rs+++ b/crates/openhuman-core/src/channels/context_tests.rs@@ -45,7 +45,7 @@ fn runtime_context() -> ChannelRuntimeContext {api_url: None,inference_url: None,reliability: Arc::new(crate::config::ReliabilityConfig::default()),- provider_runtime_options: crate::inference::provider::ProviderRuntimeOptions::default(),+ provider_runtime_options: crate::tools::delegate::ProviderRuntimeOptions::default(),workspace_dir: Arc::new(PathBuf::from("/tmp")),message_timeout_secs: CHANNEL_MESSAGE_TIMEOUT_SECS,multimodal: crate::config::MultimodalConfig::default(),diff --git a/crates/openhuman-core/src/channels/contract_reexport_tests.rs b/crates/openhuman-core/src/channels/contract_reexport_tests.rsindex b7440bbb23..af87d8c728 100644--- a/crates/openhuman-core/src/channels/contract_reexport_tests.rs+++ b/crates/openhuman-core/src/channels/contract_reexport_tests.rs@@ -1,6 +1,7 @@//! The host's `Channel` seam is the contract crate's trait, not a copy.use super::*;use std::sync::Mutex;+use tinychannels_bus::{ChannelSendExt, SendMessage};#[derive(Default)]struct Recorder {@@ -40,8 +41,4 @@ fn channel_vocabulary_is_the_contract_crates_own_types() {TypeId::of::<dyn Channel>(),TypeId::of::<dyn tinychannels_bus::Channel>());- assert_eq!(- TypeId::of::<SendMessage>(),- TypeId::of::<tinychannels_bus::SendMessage>()- );}diff --git a/crates/openhuman-core/src/channels/proactive_tests.rs b/crates/openhuman-core/src/channels/proactive_tests.rsindex 9ffe6cec12..c992f41b0e 100644--- a/crates/openhuman-core/src/channels/proactive_tests.rs+++ b/crates/openhuman-core/src/channels/proactive_tests.rs@@ -1,6 +1,7 @@use super::*;use std::sync::atomic::{AtomicUsize, Ordering};use tinychannels_bus::ChannelOutboundMessage;+use tinychannels_bus::SendMessage;use tokio::sync::mpsc;struct MockChannel {diff --git a/crates/openhuman-core/src/channels/runtime/startup_tests.rs b/crates/openhuman-core/src/channels/runtime/startup_tests.rsindex e1b2658508..b34feaf01f 100644--- a/crates/openhuman-core/src/channels/runtime/startup_tests.rs+++ b/crates/openhuman-core/src/channels/runtime/startup_tests.rs@@ -91,18 +91,13 @@ async fn relay_inbound_handler_forwards_envelopes_to_dispatch_bus() {.expect("handle relay inbound");let runtime_msg = rx.recv().await.expect("forwarded channel message");- let msg = runtime_msg.message;- assert_eq!(msg.channel, "telegram");- assert_eq!(msg.id, "relay-msg-1");- assert_eq!(msg.reply_target, "chat-1");- assert_eq!(msg.sender, "alice");- assert_eq!(msg.content, "hello from relay");- assert_eq!(msg.thread_ts.as_deref(), Some("topic-1"));- let forwarded = runtime_msg- .inbound_envelope- .expect("relay envelope should stay attached for dispatch");+ let forwarded = runtime_msg.message;assert_eq!(forwarded.message_id, "relay-msg-1");+ assert_eq!(forwarded.channel.id, "telegram");assert_eq!(forwarded.conversation.id, "chat-1");+ assert_eq!(forwarded.sender.id, "alice");+ assert_eq!(forwarded.text, "hello from relay");+ assert_eq!(forwarded.conversation.thread_id.as_deref(), Some("topic-1"));assert_eq!(forwarded.conversation.topic_id.as_deref(), Some("topic-1"));}diff --git a/crates/openhuman-core/src/channels/runtime/supervision_tests.rs b/crates/openhuman-core/src/channels/runtime/supervision_tests.rsindex e8ba8b6590..cfdf387ad5 100644--- a/crates/openhuman-core/src/channels/runtime/supervision_tests.rs+++ b/crates/openhuman-core/src/channels/runtime/supervision_tests.rs@@ -2,6 +2,7 @@ use super::super::super::Channel;use super::{jitter_millis, spawn_supervised_listener, MAX_JITTER_MS};use std::sync::{Arc, Mutex};use tinychannels_bus as traits;+use tinychannels_bus::SendMessage;use tokio::time::Instant;#[test]@@ -52,7 +53,7 @@ impl Channel for ReconnectOkChannel {deprecated,reason = "TinyChannels v22 still requires the legacy send method on focused listener fixtures")]- async fn send(&self, _message: &super::super::super::SendMessage) -> anyhow::Result<()> {+ async fn send(&self, _message: &SendMessage) -> anyhow::Result<()> {Ok(())}diff --git a/crates/openhuman-core/src/channels/tests/runtime_dispatch.rs b/crates/openhuman-core/src/channels/tests/runtime_dispatch.rsindex e8e6c5ce21..4c95664d84 100644--- a/crates/openhuman-core/src/channels/tests/runtime_dispatch.rs+++ b/crates/openhuman-core/src/channels/tests/runtime_dispatch.rs@@ -453,7 +453,7 @@ async fn run_resolved_route_message(message_id: &str, noise_after: usize) {"alice","alice","hello from resolved route test",- message_id.to_string(),+ message_id,1,None,None,diff --git a/crates/openhuman-core/src/inference/host_runtime/schemas_tests.rs b/crates/openhuman-core/src/inference/host_runtime/schemas_tests.rsindex f51c065ca7..01b03344b4 100644--- a/crates/openhuman-core/src/inference/host_runtime/schemas_tests.rs+++ b/crates/openhuman-core/src/inference/host_runtime/schemas_tests.rs@@ -1,4 +1,5 @@use super::*;+use crate::agent_runs::agent_chat::params::AgentChatParams;use crate::core::all::assert_schema_controller_parity;#[test]diff --git a/crates/openhuman-core/src/threads/store/bus_tests.rs b/crates/openhuman-core/src/threads/store/bus_tests.rsindex 10cbe48c45..2656565107 100644--- a/crates/openhuman-core/src/threads/store/bus_tests.rs+++ b/crates/openhuman-core/src/threads/store/bus_tests.rs@@ -20,7 +20,7 @@ async fn persists_inbound_and_processed_turns_into_workspace_thread() {let temp = TempDir::new().expect("tempdir");let subscriber = ConversationPersistenceSubscriber::new(temp.path().to_path_buf());let mut inbound_envelope =- tinychannels_runtime::channel::inbound_envelope_from_legacy_message(&ChannelMessage {+ tinychannels_runtime::channel::inbound_envelope_from_legacy_message(&tinychannels_bus::ChannelMessage {channel: "slack".into(),id: "m1".into(),sender: "alice".into(),