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
fix(channels): populate new transport and delivery fields in tests
Steven Enamakel420d88f38257
diff --git a/crates/openhuman-core/src/channels/bus/delivery_tests.rs b/crates/openhuman-core/src/channels/bus/delivery_tests.rsindex 263f33f03d..9e8d49c9fa 100644--- a/crates/openhuman-core/src/channels/bus/delivery_tests.rs+++ b/crates/openhuman-core/src/channels/bus/delivery_tests.rs@@ -30,18 +30,34 @@ fn every_transport_operation_carries_the_channel_scoped_by_the_host() {ProgressiveTransportRequest::Send {channel: "discord:fixture".into(),message: json!({"text":"hello"}),+ turn_id: None,+ channel_ref: None,+ conversation: None,+ sequence: None,+ idempotency_key: None,},ProgressiveTransportRequest::Edit {channel: "discord:fixture".into(),message_id: "message".into(),text: "edited".into(),+ turn_id: None,+ channel_ref: None,+ conversation: None,+ receipt: None,},ProgressiveTransportRequest::Delete {channel: "discord:fixture".into(),message_id: "message".into(),+ turn_id: None,+ channel_ref: None,+ conversation: None,+ receipt: None,},ProgressiveTransportRequest::Typing {channel: "discord:fixture".into(),+ turn_id: None,+ channel_ref: None,+ conversation: None,},] {assert_eq!(request_channel(&request), "discord:fixture");diff --git a/crates/openhuman-core/src/channels/host/adapters.rs b/crates/openhuman-core/src/channels/host/adapters.rsindex ca4243f053..8e338b922c 100644--- a/crates/openhuman-core/src/channels/host/adapters.rs+++ b/crates/openhuman-core/src/channels/host/adapters.rs@@ -137,6 +137,7 @@ impl SpeechSynthesizer for VoiceSynthesizer {Ok(SpeechResult {audio_base64: value.audio_base64,mime_type: value.audio_mime,+ duration_ms: None,visemes,})}diff --git a/crates/openhuman-core/src/channels/runtime/startup/delivery_import_tests.rs b/crates/openhuman-core/src/channels/runtime/startup/delivery_import_tests.rsindex 1af0fa9fad..ae4bc5c404 100644--- a/crates/openhuman-core/src/channels/runtime/startup/delivery_import_tests.rs+++ b/crates/openhuman-core/src/channels/runtime/startup/delivery_import_tests.rs@@ -9,6 +9,9 @@ fn entry(id: &str, at: u64) -> DeliveryQueueEntry {idempotency_key: id.to_owned(),channel_id: "telegram".into(),conversation_id: "chat-1".into(),+ channel_ref: None,+ conversation_ref: None,+ turn_id: None,reply_to_id: None,thread_id: None,durability: DeliveryDurability::Required,@@ -39,6 +42,7 @@ fn legacy_state() -> Value {id: "done".into(),intent_fingerprint: "fp".into(),completed_at_unix_ms: now_unix_ms(),+ receipt: None,};let stale = DeliveryTerminalResult {id: "old".into(),diff --git a/crates/openhuman-core/src/channels/runtime/startup/relay.rs b/crates/openhuman-core/src/channels/runtime/startup/relay.rsindex 45d9b6aaa4..4f66daa065 100644--- a/crates/openhuman-core/src/channels/runtime/startup/relay.rs+++ b/crates/openhuman-core/src/channels/runtime/startup/relay.rs@@ -31,8 +31,8 @@ impl tinychannels::relay::RelayInboundHandler for RelayInboundMessageHandler {})?;// Non-text content (voice notes, media) has no legacy projection; the// processor prepares it from the envelope instead.- let msg = tinychannels::legacy_message_from_inbound_envelope(&envelope, 0)- .unwrap_or_default();+ let msg =+ tinychannels::legacy_message_from_inbound_envelope(&envelope, 0).unwrap_or_default();self.tx.send(RuntimeChannelMessage::with_inbound_envelope(msg, envelope)).awaitdiff --git a/crates/openhuman-core/src/modules/channel_runtime_tests.rs b/crates/openhuman-core/src/modules/channel_runtime_tests.rsindex 475165f917..dbfca330a0 100644--- a/crates/openhuman-core/src/modules/channel_runtime_tests.rs+++ b/crates/openhuman-core/src/modules/channel_runtime_tests.rs@@ -122,7 +122,7 @@ impl TransportFixture {let tinychannels_bus::ChannelBackendRequest::ProgressiveTransport(request) = request else {return Err(tinybus::Error::failed("unexpected fixture capability"));};- let value = if let ProgressiveTransportRequest::Send { message, .. } = request {+ let value = if let ProgressiveTransportRequest::Send { message, .. } = *request {assert!(message["idempotencyKey"].as_str().is_some());assert_eq!(message["text"].as_str(), Some(self.expected_text.as_str()));self.sends.fetch_add(1, Ordering::SeqCst);@@ -131,9 +131,9 @@ impl TransportFixture {serde_json::Value::Null};Ok(- tinychannels_bus::ChannelBackendResult::ProgressiveTransport(+ tinychannels_bus::ChannelBackendResult::ProgressiveTransport(Box::new(ProgressiveTransportResult::Success(value),- ),+ )),)}}