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
chore: files changed crates/openhuman-core/src/channels/bus/delivery.rs,crates/openhuman-core/src/ch
Steven Enamakeld1fb8c262a38
diff --git a/crates/openhuman-core/src/channels/bus/delivery.rs b/crates/openhuman-core/src/channels/bus/delivery.rsindex 8cdf632c97..f27402365b 100644--- a/crates/openhuman-core/src/channels/bus/delivery.rs+++ b/crates/openhuman-core/src/channels/bus/delivery.rs@@ -2,17 +2,17 @@use crate::backend::{BackendApiError, BackendClient};use crate::modules::channel_runtime::ChannelRuntimeLease;use crate::security::credentials::session_support::{- BackendCredential, get_session_token, is_local_session_token,+ get_session_token, is_local_session_token, BackendCredential,};+use serde_json::json;#[cfg(test)]use serde_json::Value;-use serde_json::json;use tinybus::module::ModuleCallError;use tinychannels_bus::module_progressive::{ProgressiveCommand, ProgressiveEvent, ProgressiveResult, ProgressiveTransportRequest,ProgressiveTransportResult,};-use tinychannels_bus::{ChannelBackendRequest, ChannelBackendResult, methods};+use tinychannels_bus::{methods, ChannelBackendRequest, ChannelBackendResult};/// Transport refusals are typed facts; recovery and retry budgets belong to the module.pub(super) fn map_backend_error(error: anyhow::Error) -> ProgressiveTransportResult {diff --git a/crates/openhuman-core/src/channels/bus/delivery_tests.rs b/crates/openhuman-core/src/channels/bus/delivery_tests.rsindex f50da2e333..9e8d49c9fa 100644--- a/crates/openhuman-core/src/channels/bus/delivery_tests.rs+++ b/crates/openhuman-core/src/channels/bus/delivery_tests.rs@@ -16,14 +16,12 @@ async fn transport_captures_no_local_or_missing_hosted_credential() {let _env_lock = crate::config::TEST_ENV_LOCK.lock().await;let workspace = tempfile::tempdir().expect("temporary workspace");let _workspace_env = EnvVarGuard::workspace_unlocked(workspace.path());- assert!(- ManagedTransport::capture(- &crate::config::Config::default(),- "telegram".into(),- tokio_util::sync::CancellationToken::new()- )- .is_err()- );+ assert!(ManagedTransport::capture(+ &crate::config::Config::default(),+ "telegram".into(),+ tokio_util::sync::CancellationToken::new()+ )+ .is_err());}#[test]diff --git a/crates/openhuman-core/src/channels/bus_inbound_thread_id_tests_tests.rs b/crates/openhuman-core/src/channels/bus_inbound_thread_id_tests_tests.rsindex bffce5fba7..f71f9a2de1 100644--- a/crates/openhuman-core/src/channels/bus_inbound_thread_id_tests_tests.rs+++ b/crates/openhuman-core/src/channels/bus_inbound_thread_id_tests_tests.rs@@ -15,12 +15,10 @@ fn channel_message_body_adds_deterministic_idempotency_key() {assert_eq!(left["text"], "hello");assert_eq!(left["threadId"], "topic-1");assert_eq!(left["idempotencyKey"], right["idempotencyKey"]);- assert!(- left["idempotencyKey"]- .as_str()- .expect("idempotency key")- .starts_with("legacy-send:telegram:")- );+ assert!(left["idempotencyKey"]+ .as_str()+ .expect("idempotency key")+ .starts_with("legacy-send:telegram:"));}#[test]diff --git a/crates/openhuman-core/src/channels/bus_test_support_tests.rs b/crates/openhuman-core/src/channels/bus_test_support_tests.rsindex e33eb8cc02..6ecc68b630 100644--- a/crates/openhuman-core/src/channels/bus_test_support_tests.rs+++ b/crates/openhuman-core/src/channels/bus_test_support_tests.rs@@ -2,7 +2,7 @@use tinychannels::channel::derive_inbound_thread_id;use tinychannels::delivery::progressive::{- StreamingState, extract_message_id, latest_thinking_snippet,+ extract_message_id, latest_thinking_snippet, StreamingState,};pub fn extract_message_id_for_test(resp: &serde_json::Value) -> Option<String> {diff --git a/crates/openhuman-core/src/channels/context.rs b/crates/openhuman-core/src/channels/context.rsindex f8df65b49b..92a804ae4b 100644--- a/crates/openhuman-core/src/channels/context.rs+++ b/crates/openhuman-core/src/channels/context.rs@@ -11,9 +11,9 @@ use std::sync::{Arc, Mutex};use tinytools::Tool;pub(crate) use tinychannels_runtime::context::{- CHANNEL_MESSAGE_TIMEOUT_SECS, CHANNEL_TYPING_REFRESH_INTERVAL_SECS, ChannelRouteSelection,- ConversationHistoryMap, DEFAULT_CHANNEL_INITIAL_BACKOFF_SECS, DEFAULT_CHANNEL_MAX_BACKOFF_SECS,- MAX_CHANNEL_HISTORY, clear_sender_history, compact_sender_history,+ clear_sender_history, compact_sender_history, ChannelRouteSelection, ConversationHistoryMap,+ CHANNEL_MESSAGE_TIMEOUT_SECS, CHANNEL_TYPING_REFRESH_INTERVAL_SECS,+ DEFAULT_CHANNEL_INITIAL_BACKOFF_SECS, DEFAULT_CHANNEL_MAX_BACKOFF_SECS, MAX_CHANNEL_HISTORY,};#[cfg(test)]@@ -23,7 +23,7 @@ pub(crate) use tinychannels_runtime::context::{#[cfg(test)]pub(crate) use tinychannels::context::{- MIN_CHANNEL_MESSAGE_TIMEOUT_SECS, effective_channel_message_timeout_secs,+ effective_channel_message_timeout_secs, MIN_CHANNEL_MESSAGE_TIMEOUT_SECS,};pub(crate) type TurnModelSourceCacheMap = Arc<Mutex<HashMap<String, TurnModelSource>>>;diff --git a/crates/openhuman-core/src/channels/context_tests.rs b/crates/openhuman-core/src/channels/context_tests.rsindex c5dee4251d..edbfeeab97 100644--- a/crates/openhuman-core/src/channels/context_tests.rs+++ b/crates/openhuman-core/src/channels/context_tests.rs@@ -114,22 +114,22 @@ fn clear_and_compact_sender_history_update_cached_messages() {}clear_sender_history(&ctx.conversation_histories, sender);- assert!(- !ctx.conversation_histories- .lock()- .unwrap()- .contains_key(sender)- );+ assert!(!ctx+ .conversation_histories+ .lock()+ .unwrap()+ .contains_key(sender));}#[tokio::test]async fn overflow_detection_covers_edge_cases() {let ctx = runtime_context();- assert!(- is_context_window_overflow_error(&ctx, &anyhow::anyhow!("Maximum context length exceeded"))- .await- .unwrap()- );+ assert!(is_context_window_overflow_error(+ &ctx,+ &anyhow::anyhow!("Maximum context length exceeded")+ )+ .await+ .unwrap());assert!(!is_context_window_overflow_error(&ctx, &anyhow::anyhow!("network timeout")).awaitdiff --git a/crates/openhuman-core/src/channels/contract_schema.rs b/crates/openhuman-core/src/channels/contract_schema.rsindex b9491f04b2..4371baee33 100644--- a/crates/openhuman-core/src/channels/contract_schema.rs+++ b/crates/openhuman-core/src/channels/contract_schema.rs@@ -7,8 +7,8 @@//! schemas the contract defines.use tinychannels_bus::controllers::{- ChannelControllerField, ChannelControllerFieldType, ChannelControllerSchema,- channel_controller_schema,+ channel_controller_schema, ChannelControllerField, ChannelControllerFieldType,+ ChannelControllerSchema,};use crate::core::{ControllerSchema, FieldSchema, TypeSchema};diff --git a/crates/openhuman-core/src/channels/controllers/backend.rs b/crates/openhuman-core/src/channels/controllers/backend.rsindex c99239ca29..004644c6e9 100644--- a/crates/openhuman-core/src/channels/controllers/backend.rs+++ b/crates/openhuman-core/src/channels/controllers/backend.rs@@ -1,19 +1,19 @@//! TinyChannels backend implementation for OpenHuman controller operations.-use serde_json::Value;#[cfg(test)]use serde_json::json;+use serde_json::Value;use crate::config::{ChannelsConfig, Config};use crate::core::Outcome;use super::ops;-#[cfg(test)]-use tinychannels_bus::SendMessage;use tinychannels_bus::controllers::{ChannelAuthMode, ChannelDisconnectResult, ChannelReactionResult, ChannelSendMessageResult,ChannelStatusEntry, ChannelThreadListResult, ChannelThreadResult,};+#[cfg(test)]+use tinychannels_bus::SendMessage;/// OpenHuman-owned implementation of the TinyChannels backend contract.#[derive(Debug, Clone)]diff --git a/crates/openhuman-core/src/channels/controllers/ops/connect/disconnect.rs b/crates/openhuman-core/src/channels/controllers/ops/connect/disconnect.rsindex b9edd23f90..d1c223a575 100644--- a/crates/openhuman-core/src/channels/controllers/ops/connect/disconnect.rs+++ b/crates/openhuman-core/src/channels/controllers/ops/connect/disconnect.rs@@ -1,7 +1,7 @@//! Disconnecting a channel: removing stored credentials and clearing its//! runtime config, optionally along with its memory chunks.-use serde_json::{Value, json};+use serde_json::{json, Value};use crate::config::Config;use crate::core::Outcome;@@ -9,7 +9,7 @@ use crate::security::credentials;use super::memory::clear_channel_memory;use super::shared::credential_provider;-use tinychannels_bus::controllers::{ChannelAuthMode, find_channel_definition};+use tinychannels_bus::controllers::{find_channel_definition, ChannelAuthMode};/// Disconnect a channel by removing stored credentials.pub async fn disconnect_channel(diff --git a/crates/openhuman-core/src/channels/controllers/ops/connect/status.rs b/crates/openhuman-core/src/channels/controllers/ops/connect/status.rsindex ba70d0fe33..9b32b27be5 100644--- a/crates/openhuman-core/src/channels/controllers/ops/connect/status.rs+++ b/crates/openhuman-core/src/channels/controllers/ops/connect/status.rs@@ -1,7 +1,7 @@//! Channel connection status, the default proactive-delivery channel, and//! the merged set of currently-connected channel slugs.-use serde_json::{Value, json};+use serde_json::{json, Value};use crate::config::Config;use crate::core::Outcome;diff --git a/crates/openhuman-core/src/channels/controllers/ops/connect/test_channel.rs b/crates/openhuman-core/src/channels/controllers/ops/connect/test_channel.rsindex 281f236073..86b970a0aa 100644--- a/crates/openhuman-core/src/channels/controllers/ops/connect/test_channel.rs+++ b/crates/openhuman-core/src/channels/controllers/ops/connect/test_channel.rs@@ -1,7 +1,7 @@//! Testing credentials through the module without persisting host configuration.use serde_json::Value;-use tinychannels_bus::{ChannelControllerRequest, ChannelControllerResult, methods};+use tinychannels_bus::{methods, ChannelControllerRequest, ChannelControllerResult};use crate::config::Config;use crate::core::Outcome;diff --git a/crates/openhuman-core/src/channels/controllers/ops/discord.rs b/crates/openhuman-core/src/channels/controllers/ops/discord.rsindex 957012c7ce..7709d54c4f 100644--- a/crates/openhuman-core/src/channels/controllers/ops/discord.rs+++ b/crates/openhuman-core/src/channels/controllers/ops/discord.rs@@ -8,8 +8,8 @@ use crate::core::Outcome;use crate::modules::channel_controller::{self, DiscordReply};use crate::security::credentials;use tinychannels_bus::{- ChannelControllerRequest,controllers::{BotPermissionCheck, DiscordGuild, DiscordTextChannel},+ ChannelControllerRequest,};use super::connect::shared::credential_provider;diff --git a/crates/openhuman-core/src/channels/controllers/ops_connect_status_tests.rs b/crates/openhuman-core/src/channels/controllers/ops_connect_status_tests.rsindex a603f1f955..253f5dec47 100644--- a/crates/openhuman-core/src/channels/controllers/ops_connect_status_tests.rs+++ b/crates/openhuman-core/src/channels/controllers/ops_connect_status_tests.rs@@ -462,12 +462,10 @@ async fn set_default_channel_rejects_unknown_and_empty() {.await.expect("seed discord");- assert!(- set_default_channel(&mut config, "myspace")- .await- .unwrap_err()- .contains("unknown channel"),- );+ assert!(set_default_channel(&mut config, "myspace")+ .await+ .unwrap_err()+ .contains("unknown channel"),);assert!(set_default_channel(&mut config, " ").await.is_err());// A rejected set must not clobber the previously persisted value.diff --git a/crates/openhuman-core/src/channels/controllers/schemas.rs b/crates/openhuman-core/src/channels/controllers/schemas.rsindex cb9e1c17fa..b5f02e8a21 100644--- a/crates/openhuman-core/src/channels/controllers/schemas.rs+++ b/crates/openhuman-core/src/channels/controllers/schemas.rs@@ -1,14 +1,14 @@//! RPC controller schemas and handlers for the channels domain.use crate::core::runtime::DispatchCtx;-use serde::Deserialize;use serde::de::DeserializeOwned;+use serde::Deserialize;use serde_json::{Map, Value};use crate::config::Config;+use crate::core::all::{ControllerFuture, RegisteredController};use crate::core::ControllerSchema;use crate::core::Outcome;-use crate::core::all::{ControllerFuture, RegisteredController};use super::backend::OpenHumanChannelBackend;use crate::channels::contract_schema::from_channel_controller_schema;diff --git a/crates/openhuman-core/src/channels/host/channel_events.rs b/crates/openhuman-core/src/channels/host/channel_events.rsindex 41382cbe98..b140482891 100644--- a/crates/openhuman-core/src/channels/host/channel_events.rs+++ b/crates/openhuman-core/src/channels/host/channel_events.rs@@ -6,8 +6,8 @@ use async_trait::async_trait;use std::collections::HashMap;use std::path::PathBuf;use std::sync::{Arc, Mutex};-use tinybus::EventHandler;use tinybus::module::ModuleClient;+use tinybus::EventHandler;use tinychannels_bus::ChannelMessage;#[derive(Clone)]diff --git a/crates/openhuman-core/src/channels/host/host_tests.rs b/crates/openhuman-core/src/channels/host/host_tests.rsindex 87b5943afe..a03eb07e33 100644--- a/crates/openhuman-core/src/channels/host/host_tests.rs+++ b/crates/openhuman-core/src/channels/host/host_tests.rs@@ -63,8 +63,8 @@ async fn event_sink_rejects_non_object_payload() {#[tokio::test]async fn event_sink_routes_channel_reactions_to_domain_bus() {let sink = OpenHumanEventSink;- assert!(- sink.publish(+ assert!(sink+ .publish("channel","reaction_received",serde_json::json!({@@ -73,10 +73,9 @@ async fn event_sink_routes_channel_reactions_to_domain_bus() {}),).await- .is_ok()- );- assert!(- sink.publish(+ .is_ok());+ assert!(sink+ .publish("channel","reaction_sent",serde_json::json!({@@ -85,19 +84,16 @@ async fn event_sink_routes_channel_reactions_to_domain_bus() {}),).await- .is_ok()- );+ .is_ok());// Unknown domain/kind is a benign no-op.- assert!(- sink.publish("mystery", "x", serde_json::json!({}))- .await- .is_ok()- );- assert!(- sink.publish("channel", "unknown", serde_json::json!({}))- .await- .is_ok()- );+ assert!(sink+ .publish("mystery", "x", serde_json::json!({}))+ .await+ .is_ok());+ assert!(sink+ .publish("channel", "unknown", serde_json::json!({}))+ .await+ .is_ok());}// --- ConversationHistoryStore --------------------------------------------diff --git a/crates/openhuman-core/src/channels/host/mod.rs b/crates/openhuman-core/src/channels/host/mod.rsindex 68fa4633ae..db5f6564d8 100644--- a/crates/openhuman-core/src/channels/host/mod.rs+++ b/crates/openhuman-core/src/channels/host/mod.rs@@ -19,10 +19,10 @@ pub use channel_events::{ChannelApprovalSurfaceSubscriber, ChannelTurnStateSubsc#[cfg(test)]use std::sync::Arc;-#[cfg(test)]-use tinychannels::ChannelHost;#[cfg(test)]use tinychannels::host::ChannelHostBuilder;+#[cfg(test)]+use tinychannels::ChannelHost;#[cfg(test)]use crate::config::Config;diff --git a/crates/openhuman-core/src/channels/host/remote_control.rs b/crates/openhuman-core/src/channels/host/remote_control.rsindex 592028bec4..6b433b3aa5 100644--- a/crates/openhuman-core/src/channels/host/remote_control.rs+++ b/crates/openhuman-core/src/channels/host/remote_control.rs@@ -1,6 +1,6 @@//! Captured host conversation and session state supplied to the channel module.-use crate::channels::context::{ChannelRuntimeContext, clear_sender_history};+use crate::channels::context::{clear_sender_history, ChannelRuntimeContext};use crate::core::runtime::DispatchCtx;use crate::threads::store::{self as conversations, CreateConversationThread};diff --git a/crates/openhuman-core/src/channels/host/voice.rs b/crates/openhuman-core/src/channels/host/voice.rsindex fc81ff8120..be4b9ba82a 100644--- a/crates/openhuman-core/src/channels/host/voice.rs+++ b/crates/openhuman-core/src/channels/host/voice.rs@@ -5,8 +5,8 @@//! here logs request ids, sizes and durations; transcripts, reply text and//! audio are never logged.-use crate::config::Config;use crate::config::schema::{ChannelVoiceConfig, VoiceReplyMode};+use crate::config::Config;use parking_lot::Mutex;use std::collections::VecDeque;use std::sync::Arc;diff --git a/crates/openhuman-core/src/channels/module_fixture_tests.rs b/crates/openhuman-core/src/channels/module_fixture_tests.rsindex 6701c57247..dc4ead440f 100644--- a/crates/openhuman-core/src/channels/module_fixture_tests.rs+++ b/crates/openhuman-core/src/channels/module_fixture_tests.rs@@ -8,8 +8,8 @@//! on a process-lifetime runtime, so it outlives the short Tokio runtimes of//! individual tests.-use crate::config::Config;use crate::config::schema::ModuleSourceMode;+use crate::config::Config;use crate::modules::linked::register_linked;use crate::modules::{ops, runtime};use std::sync::Arc;@@ -140,10 +140,10 @@ async fn linked_module_prepares_runtime_limits_over_confidential_bus_call() {#[cfg(feature = "e2e-test-support")]async fn linked_module_prepares_legacy_inbound_facts_over_confidential_bus_call() {let _storage = install_memory_storage();- use tinychannels_bus::ChannelMessage;use tinychannels_bus::module_inbound::{ChannelInboundSource, PrepareChannelInboundRequest, PreparedChannelInbound,};+ use tinychannels_bus::ChannelMessage;let message = ChannelMessage {id: "message-1".into(),diff --git a/crates/openhuman-core/src/channels/providers/relay/mod.rs b/crates/openhuman-core/src/channels/providers/relay/mod.rsindex d2c9ebde8c..725be88e74 100644--- a/crates/openhuman-core/src/channels/providers/relay/mod.rs+++ b/crates/openhuman-core/src/channels/providers/relay/mod.rs@@ -26,10 +26,10 @@ mod params;mod schemas;mod store;-pub use channel::{CHANNEL_OUTBOUND_EVENT, RelayChannel};+pub use channel::{RelayChannel, CHANNEL_OUTBOUND_EVENT};pub use ops::channel_relay_inbound;pub use params::{- DEFAULT_RELAY_CLIENT_ID, MAX_CHANNEL_LEN, MAX_ID_LEN, MAX_SENDER_NAME_CHARS, MAX_TEXT_BYTES,- RESERVED_CHANNELS, RelayInboundParams, validate_channel, validate_id,+ validate_channel, validate_id, RelayInboundParams, DEFAULT_RELAY_CLIENT_ID, MAX_CHANNEL_LEN,+ MAX_ID_LEN, MAX_SENDER_NAME_CHARS, MAX_TEXT_BYTES, RESERVED_CHANNELS,};pub use schemas::{all_relay_controller_schemas, all_relay_registered_controllers};diff --git a/crates/openhuman-core/src/channels/providers/relay/ops.rs b/crates/openhuman-core/src/channels/providers/relay/ops.rsindex 80638f6679..a1bbbf283b 100644--- a/crates/openhuman-core/src/channels/providers/relay/ops.rs+++ b/crates/openhuman-core/src/channels/providers/relay/ops.rs@@ -3,15 +3,15 @@use std::collections::HashMap;use std::sync::Arc;-use serde_json::{Value, json};+use serde_json::{json, Value};use super::channel::RelayChannel;use super::params::RelayInboundParams;use super::store::{self, Recorded};use crate::channels::context::MAX_CHANNEL_HISTORY;use crate::channels::runtime::{- PromptToolDescs, build_channel_turn_parts, prepare_runtime_limits,- process_channel_runtime_message, runtime_context,+ build_channel_turn_parts, prepare_runtime_limits, process_channel_runtime_message,+ runtime_context, PromptToolDescs,};use crate::config::Config;use crate::core::Outcome;diff --git a/crates/openhuman-core/src/channels/providers/relay/schemas_tests.rs b/crates/openhuman-core/src/channels/providers/relay/schemas_tests.rsindex 3b2e3facb1..555179bc7b 100644--- a/crates/openhuman-core/src/channels/providers/relay/schemas_tests.rs+++ b/crates/openhuman-core/src/channels/providers/relay/schemas_tests.rs@@ -25,11 +25,9 @@ fn the_controller_is_channel_relay_inbound() {#[test]fn the_controller_is_registered() {- assert!(- crate::core::all::all_registered_controllers()- .iter()- .any(|c| c.rpc_method_name() == "openhuman.channel_relay_inbound")- );+ assert!(crate::core::all::all_registered_controllers()+ .iter()+ .any(|c| c.rpc_method_name() == "openhuman.channel_relay_inbound"));}#[tokio::test]diff --git a/crates/openhuman-core/src/channels/routes.rs b/crates/openhuman-core/src/channels/routes.rsindex 7bef3bd80a..d7d51fda4b 100644--- a/crates/openhuman-core/src/channels/routes.rs+++ b/crates/openhuman-core/src/channels/routes.rs@@ -1,6 +1,6 @@//! Per-sender routing and runtime command handling.-use super::context::{ChannelRouteSelection, ChannelRuntimeContext, clear_sender_history};+use super::context::{clear_sender_history, ChannelRouteSelection, ChannelRuntimeContext};use super::{Channel, ChannelSendExt, SendMessage};use crate::inference::provider;use std::sync::Arc;diff --git a/crates/openhuman-core/src/channels/routes_tests.rs b/crates/openhuman-core/src/channels/routes_tests.rsindex f4cbf67b94..c0a3e9aa4a 100644--- a/crates/openhuman-core/src/channels/routes_tests.rs+++ b/crates/openhuman-core/src/channels/routes_tests.rs@@ -1,6 +1,6 @@use super::*;use crate::channels::context::{- ChannelRuntimeContext, RouteSelectionMap, TurnModelSourceCacheMap, conversation_history_key,+ conversation_history_key, ChannelRuntimeContext, RouteSelectionMap, TurnModelSourceCacheMap,};use crate::channels::host::ChannelTurnStateSubscriber;use crate::core::events::DomainEvent;@@ -337,11 +337,9 @@ async fn handle_runtime_command_unknown_provider_sends_helpful_error() {let sent = channel_impl.sent.lock().unwrap();assert_eq!(sent.len(), 1);- assert!(- sent[0]- .content- .contains("Unknown provider `definitely-not-a-provider`")- );+ assert!(sent[0]+ .content+ .contains("Unknown provider `definitely-not-a-provider`"));assert_eq!(sent[0].thread_ts.as_deref(), Some("thread-1"));}@@ -377,13 +375,12 @@ async fn handle_runtime_command_set_model_clears_sender_history_and_persists_rou.await;assert!(handled);- assert!(- ctx.conversation_histories- .lock()- .unwrap()- .get(key)- .is_none()- );+ assert!(ctx+ .conversation_histories+ .lock()+ .unwrap()+ .get(key)+ .is_none());assert_eq!(get_route_selection(&ctx, key),ChannelRouteSelection {@@ -488,11 +485,9 @@ async fn handle_runtime_command_telegram_help_replies_with_remote_command_list()assert!(sent[0].content.contains("`/status`"));assert!(sent[0].content.contains("`/sessions`"));assert!(sent[0].content.contains("`/new`"));- assert!(- sent[0]- .content- .contains("Model routing: `/model`, `/models`")- );+ assert!(sent[0]+ .content+ .contains("Model routing: `/model`, `/models`"));}#[tokio::test]@@ -525,11 +520,9 @@ async fn handle_runtime_command_telegram_sessions_reports_empty_store() {let sent = channel_impl.sent.lock().unwrap();assert_eq!(sent.len(), 1);- assert!(- sent[0]- .content- .contains("No conversation threads yet. Send `/new` to create one.")- );+ assert!(sent[0]+ .content+ .contains("No conversation threads yet. Send `/new` to create one."));assert_eq!(sent[0].thread_ts.as_deref(), Some("42"));}@@ -568,13 +561,12 @@ async fn handle_runtime_command_telegram_new_status_and_sessions_round_trip() {).await);- assert!(- ctx.conversation_histories- .lock()- .unwrap()- .get(sender_key)- .is_none()- );+ assert!(ctx+ .conversation_histories+ .lock()+ .unwrap()+ .get(sender_key)+ .is_none());ctx.conversation_histories.lock()@@ -650,11 +642,9 @@ async fn handle_runtime_command_telegram_new_status_and_sessions_round_trip() {let sent = channel_impl.sent.lock().unwrap();assert_eq!(sent.len(), 3);assert!(sent[0].content.contains("Started new session"));- assert!(- sent[0]- .content- .contains("In-memory channel history cleared for this chat.")- );+ assert!(sent[0]+ .content+ .contains("In-memory channel history cleared for this chat."));assert!(sent[1].content.contains("**Status**"));assert!(sent[1].content.contains("Thread: `Telegram"));@@ -665,10 +655,9 @@ async fn handle_runtime_command_telegram_new_status_and_sessions_round_trip() {assert!(sent[2].content.contains("**Recent sessions**"));assert!(sent[2].content.contains("→ `Telegram"));- assert!(- sent.iter()- .all(|message| message.thread_ts.as_deref() == Some("42"))- );+ assert!(sent+ .iter()+ .all(|message| message.thread_ts.as_deref() == Some("42")));}#[tokio::test]@@ -712,11 +701,9 @@ async fn handle_runtime_command_telegram_new_reports_unavailable_storage() {"{}",sent[0].content);- assert!(- sent[0]- .content- .contains("failed to persist the chat binding")- );+ assert!(sent[0]+ .content+ .contains("failed to persist the chat binding"));assert!(sent[0].content.contains("host storage is unavailable"));assert_eq!(sent[0].thread_ts.as_deref(), Some("42"));}diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/helpers_tests.rs b/crates/openhuman-core/src/channels/runtime/dispatch/helpers_tests.rsindex 4b5b2b37e2..bf6d113625 100644--- a/crates/openhuman-core/src/channels/runtime/dispatch/helpers_tests.rs+++ b/crates/openhuman-core/src/channels/runtime/dispatch/helpers_tests.rs@@ -1,7 +1,7 @@use super::*;use crate::core::runtime::DispatchCtx;use std::sync::Arc;-use tokio::sync::{Notify, oneshot};+use tokio::sync::{oneshot, Notify};struct DeferredTyping {started: Notify,diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/dispatch_tests.rs b/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/dispatch_tests.rsindex bd3a0e14ba..b654af7706 100644--- a/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/dispatch_tests.rs+++ b/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/dispatch_tests.rs@@ -3,13 +3,13 @@//! still goes to the orchestrator over the bus.use super::*;-use crate::agent::bus::{AgentTurnRequest, AgentTurnResponse, mock_agent_run_turn};+use crate::agent::bus::{mock_agent_run_turn, AgentTurnRequest, AgentTurnResponse};use crate::agent::host_agents::{self, HostAgent, HostAgentResolver};-use crate::channels::context::{CHANNEL_MESSAGE_TIMEOUT_SECS, ChannelRuntimeContext};+use crate::channels::context::{ChannelRuntimeContext, CHANNEL_MESSAGE_TIMEOUT_SECS};use crate::channels::runtime::process_channel_message;use crate::channels::{Channel, SendMessage};use crate::core::runtime::{CoreContext, DomainSet};-use serde_json::{Value, json};+use serde_json::{json, Value};use std::collections::HashMap;use std::sync::atomic::{AtomicUsize, Ordering};use std::sync::{Arc, Mutex};diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/mod.rs b/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/mod.rsindex 83edd4670e..9a00a48d80 100644--- a/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/mod.rs+++ b/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/mod.rs@@ -29,7 +29,7 @@ use tinychannels_bus as traits;pub(crate) mod posture;mod turn;-pub(crate) use turn::{HostChannelTurn, run_host_agent_turn, seed_rows};+pub(crate) use turn::{run_host_agent_turn, seed_rows, HostChannelTurn};/// What a channel's binding resolves to for one message.pub(crate) enum HostRoute {diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/posture.rs b/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/posture.rsindex 512bb00296..897b06d53f 100644--- a/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/posture.rs+++ b/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/posture.rs@@ -11,8 +11,8 @@use tinytools::{PermissionLevel, Tool};-use crate::agent::HostTools;use crate::agent::turn_origin::AgentTurnOrigin;+use crate::agent::HostTools;use crate::config::Config;/// The most a host agent may do on a turn from `origin`; `None` leaves thediff --git a/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/posture_tests.rs b/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/posture_tests.rsindex a73e103e55..a7df3a5833 100644--- a/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/posture_tests.rs+++ b/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/posture_tests.rs@@ -1,8 +1,8 @@use super::*;use crate::agent::HostTurnTools;-use serde_json::{Value, json};-use std::sync::Arc;+use serde_json::{json, Value};use std::sync::atomic::{AtomicUsize, Ordering};+use std::sync::Arc;use tinytools::{ToolCallOptions, ToolResult};fn external() -> AgentTurnOrigin {diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/mod.rs b/crates/openhuman-core/src/channels/runtime/dispatch/mod.rsindex 6681828b69..6fb02f67b5 100644--- a/crates/openhuman-core/src/channels/runtime/dispatch/mod.rs+++ b/crates/openhuman-core/src/channels/runtime/dispatch/mod.rs@@ -16,8 +16,8 @@ mod processor;mod routing;pub(crate) use processor::{- RuntimeChannelMessage, process_channel_message, process_channel_runtime_message,- run_message_dispatch_loop,+ process_channel_message, process_channel_runtime_message, run_message_dispatch_loop,+ RuntimeChannelMessage,};// `channel_has_approval_surface` stays pub(crate) on processor; re-export so@@ -33,7 +33,7 @@ use helpers::build_channel_context_block;use helpers::select_acknowledgment_reaction;#[cfg(test)]-use routing::{AgentScoping, build_visible_tool_set};+use routing::{build_visible_tool_set, AgentScoping};#[cfg(any(test, debug_assertions))]use tinychannels_bus as traits;diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/processor/bus_turn.rs b/crates/openhuman-core/src/channels/runtime/dispatch/processor/bus_turn.rsindex 9f0ddb08b4..dbf254e092 100644--- a/crates/openhuman-core/src/channels/runtime/dispatch/processor/bus_turn.rs+++ b/crates/openhuman-core/src/channels/runtime/dispatch/processor/bus_turn.rs@@ -1,7 +1,7 @@//! The orchestrator path: an unbound channel's turn goes over the native bus//! to the `agent.run_turn` handler, with the orchestrator's tool scoping.-use crate::agent::bus::{AGENT_RUN_TURN_METHOD, AgentTurnRequest, AgentTurnResponse};+use crate::agent::bus::{AgentTurnRequest, AgentTurnResponse, AGENT_RUN_TURN_METHOD};use crate::agent::turn_origin::AgentTurnOrigin;use crate::channels::context::{ChannelRouteSelection, ChannelRuntimeContext};use crate::core::bus::BUS;diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn.rs b/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn.rsindex 2ec3229453..08d232035a 100644--- a/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn.rs+++ b/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn.rs@@ -4,7 +4,7 @@use crate::agent::bus::AgentTurnResponse;use crate::channels::context::{- ChannelRuntimeContext, compact_sender_history, is_context_window_overflow_error,+ compact_sender_history, is_context_window_overflow_error, ChannelRuntimeContext,};use crate::channels::routes::{get_or_create_turn_model_source, get_route_selection, handle_runtime_command_if_needed,@@ -23,13 +23,13 @@ use tokio_util::sync::CancellationToken;use tokio_util::task::AbortOnDropHandle;use super::super::helpers::{- REPLY_LOG_TRUNCATE_CHARS, build_channel_context_block, log_worker_join_result,- spawn_typing_task,+ build_channel_context_block, log_worker_join_result, spawn_typing_task,+ REPLY_LOG_TRUNCATE_CHARS,};-use super::super::host_agent::{self, HostChannelTurn, HostRoute, run_host_agent_turn, seed_rows};-use super::RuntimeChannelMessage;+use super::super::host_agent::{self, run_host_agent_turn, seed_rows, HostChannelTurn, HostRoute};use super::approval::{channel_has_approval_surface, try_route_approval_reply};use super::bus_turn::dispatch_bus_turn;+use super::RuntimeChannelMessage;pub(crate) async fn process_channel_message(ctx: Arc<ChannelRuntimeContext>,diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/routing.rs b/crates/openhuman-core/src/channels/runtime/dispatch/routing.rsindex 195095eb90..803fd74a03 100644--- a/crates/openhuman-core/src/channels/runtime/dispatch/routing.rs+++ b/crates/openhuman-core/src/channels/runtime/dispatch/routing.rs@@ -10,8 +10,8 @@ use crate::agent::harness::host_definition::{AgentDefinition, AgentDefinitionReguse crate::agent::prompts::ConnectedIntegration;use crate::config::Config;use crate::integrations::composio::{- FetchConnectedIntegrationsStatus, cached_active_integrations,- fetch_connected_integrations_status,+ cached_active_integrations, fetch_connected_integrations_status,+ FetchConnectedIntegrationsStatus,};use crate::tools::orchestrator_tools;use std::collections::HashSet;diff --git a/crates/openhuman-core/src/channels/runtime/mod.rs b/crates/openhuman-core/src/channels/runtime/mod.rsindex 626aafc365..87b8ee69b1 100644--- a/crates/openhuman-core/src/channels/runtime/mod.rs+++ b/crates/openhuman-core/src/channels/runtime/mod.rs@@ -14,8 +14,8 @@ pub(crate) use startup::start_channels_with_session;// through the same pipeline, with a context built from the caller's config.#[cfg(test)]pub(crate) use dispatch::process_channel_message;-pub(crate) use dispatch::{RuntimeChannelMessage, process_channel_runtime_message};-pub(crate) use startup::{PromptToolDescs, build_channel_turn_parts, runtime_context};+pub(crate) use dispatch::{process_channel_runtime_message, RuntimeChannelMessage};+pub(crate) use startup::{build_channel_turn_parts, runtime_context, PromptToolDescs};#[cfg(any(test, debug_assertions))]pub mod test_support;diff --git a/crates/openhuman-core/src/channels/runtime/session_tests.rs b/crates/openhuman-core/src/channels/runtime/session_tests.rsindex 3502a55425..6aa6d4da36 100644--- a/crates/openhuman-core/src/channels/runtime/session_tests.rs+++ b/crates/openhuman-core/src/channels/runtime/session_tests.rs@@ -1,7 +1,7 @@use super::*;use crate::core::runtime::DispatchCtx;-use std::sync::Arc;use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering};+use std::sync::Arc;#[tokio::test]async fn independent_local_runtime_does_not_need_an_account_session() {diff --git a/crates/openhuman-core/src/channels/runtime/startup.rs b/crates/openhuman-core/src/channels/runtime/startup.rsindex b4b21ff1f8..8092b220a9 100644--- a/crates/openhuman-core/src/channels/runtime/startup.rs+++ b/crates/openhuman-core/src/channels/runtime/startup.rs@@ -53,7 +53,7 @@ pub(crate) async fn prepare_runtime_limits(pub(crate) use credentials::hydrate_channel_credentials;pub use start_channels::start_channels;pub(crate) use start_channels::start_channels_with_session;-pub(crate) use turn_parts::{PromptToolDescs, build_channel_turn_parts, runtime_context};+pub(crate) use turn_parts::{build_channel_turn_parts, runtime_context, PromptToolDescs};// Re-exported at module scope (rather than left as private `pub(super)`// items reached only through their owning submodule) so the `#[path]` test@@ -62,7 +62,7 @@ pub(crate) use turn_parts::{PromptToolDescs, build_channel_turn_parts, runtime_c#[cfg(test)]use crate::config::Config;#[cfg(test)]-use chat_workload::{ChatWorkloadResolution, resolve_chat_workload};+use chat_workload::{resolve_chat_workload, ChatWorkloadResolution};#[cfg(any(test, debug_assertions))]use credentials::resolve_yuanbao_app_secret;#[cfg(test)]diff --git a/crates/openhuman-core/src/channels/runtime/startup/delivery_import.rs b/crates/openhuman-core/src/channels/runtime/startup/delivery_import.rsindex cbdd61affc..a5af7e1111 100644--- a/crates/openhuman-core/src/channels/runtime/startup/delivery_import.rs+++ b/crates/openhuman-core/src/channels/runtime/startup/delivery_import.rs@@ -19,11 +19,11 @@ use std::collections::BTreeMap;use std::path::Path;use std::sync::Arc;-use serde_json::{Value, json};+use serde_json::{json, Value};use sha2::Digest;use tinychannels_bus::module_delivery::{- DELIVERY_PENDING_CAPACITY, DELIVERY_RECORD_BYTES, DELIVERY_RESULT_CAPACITY,- DELIVERY_RESULT_TTL_SECONDS, DeliveryQueueEntry, DeliveryTerminalResult,+ DeliveryQueueEntry, DeliveryTerminalResult, DELIVERY_PENDING_CAPACITY, DELIVERY_RECORD_BYTES,+ DELIVERY_RESULT_CAPACITY, DELIVERY_RESULT_TTL_SECONDS,};use tinystoragedrivers::{CollectionSpec, DocumentStore, ErrorKind, Precondition};@@ -148,7 +148,7 @@ async fn import_into(docs: &Arc<dyn DocumentStore>, workspace: &Path) -> anyhow:return Err(anyhow::anyhow!("write {collection} record: {:?}",error.kind()- ));+ ))}}}diff --git a/crates/openhuman-core/src/channels/runtime/startup/start_channels.rs b/crates/openhuman-core/src/channels/runtime/startup/start_channels.rsindex 5d456a0a5d..26e46f47bb 100644--- a/crates/openhuman-core/src/channels/runtime/startup/start_channels.rs+++ b/crates/openhuman-core/src/channels/runtime/startup/start_channels.rs@@ -3,7 +3,7 @@use super::super::dispatch::run_message_dispatch_loop;use super::module_providers::ModuleChannelRuntime;-use super::turn_parts::{PromptToolDescs, build_channel_turn_parts, runtime_context};+use super::turn_parts::{build_channel_turn_parts, runtime_context, PromptToolDescs};use crate::config::Config;use crate::core::bus::BUS;use crate::core::events::DomainEvent;diff --git a/crates/openhuman-core/src/channels/runtime/startup/turn_parts.rs b/crates/openhuman-core/src/channels/runtime/startup/turn_parts.rsindex e61c878585..7d9dfe7093 100644--- a/crates/openhuman-core/src/channels/runtime/startup/turn_parts.rs+++ b/crates/openhuman-core/src/channels/runtime/startup/turn_parts.rs@@ -6,7 +6,7 @@//! the caller's own config and policy, so a relayed turn never runs with the//! operator's tools or workspace.-use super::chat_workload::{ChatWorkloadResolution, resolve_chat_workload};+use super::chat_workload::{resolve_chat_workload, ChatWorkloadResolution};use super::prompt::format_access_context;use crate::agent::host_runtime;use crate::channels::context::ChannelRuntimeContext;diff --git a/crates/openhuman-core/src/channels/runtime/startup_tests.rs b/crates/openhuman-core/src/channels/runtime/startup_tests.rsindex 691e9fd8da..e8af9daf17 100644--- a/crates/openhuman-core/src/channels/runtime/startup_tests.rs+++ b/crates/openhuman-core/src/channels/runtime/startup_tests.rs@@ -7,7 +7,7 @@//! (cloud) path is preserved for users who haven't picked a local ///! BYOK model, and the override path activates for those who have.-use super::{ChatWorkloadResolution, RelayInboundMessageHandler, resolve_chat_workload};+use super::{resolve_chat_workload, ChatWorkloadResolution, RelayInboundMessageHandler};use crate::config::Config;use tinychannels::relay::RelayInboundHandler;diff --git a/crates/openhuman-core/src/channels/runtime/supervision.rs b/crates/openhuman-core/src/channels/runtime/supervision.rsindex 0e9007956d..53b33638b6 100644--- a/crates/openhuman-core/src/channels/runtime/supervision.rs+++ b/crates/openhuman-core/src/channels/runtime/supervision.rs@@ -86,7 +86,7 @@ pub(crate) fn spawn_supervised_listener(}#[cfg(test)]-pub(crate) use tinychannels::runtime::{MAX_JITTER_MS, jitter_millis};+pub(crate) use tinychannels::runtime::{jitter_millis, MAX_JITTER_MS};#[cfg(test)]#[path = "supervision_tests.rs"]diff --git a/crates/openhuman-core/src/channels/runtime/supervision_tests.rs b/crates/openhuman-core/src/channels/runtime/supervision_tests.rsindex 29aa464962..37facf80f2 100644--- a/crates/openhuman-core/src/channels/runtime/supervision_tests.rs+++ b/crates/openhuman-core/src/channels/runtime/supervision_tests.rs@@ -1,5 +1,5 @@use super::super::super::Channel;-use super::{MAX_JITTER_MS, jitter_millis, spawn_supervised_listener};+use super::{jitter_millis, spawn_supervised_listener, MAX_JITTER_MS};use std::sync::{Arc, Mutex};use tinychannels_bus as traits;use tokio::time::Instant;diff --git a/crates/openhuman-core/src/channels/runtime/test_support.rs b/crates/openhuman-core/src/channels/runtime/test_support.rsindex ff17edb0ac..b05ae7e243 100644--- a/crates/openhuman-core/src/channels/runtime/test_support.rs+++ b/crates/openhuman-core/src/channels/runtime/test_support.rs@@ -2,13 +2,13 @@pub use super::dispatch::test_support::build_channel_context_block_for_test;use super::dispatch::{- RuntimeChannelMessage, process_channel_message, process_channel_runtime_message,+ process_channel_message, process_channel_runtime_message, RuntimeChannelMessage,};pub use super::startup::test_support::resolve_yuanbao_app_secret_for_test;-use crate::agent::bus::{AGENT_RUN_TURN_METHOD, AgentTurnRequest, AgentTurnResponse};+use crate::agent::bus::{AgentTurnRequest, AgentTurnResponse, AGENT_RUN_TURN_METHOD};+use crate::channels::context::{ChannelRuntimeContext, CHANNEL_MESSAGE_TIMEOUT_SECS};use crate::channels::Channel;use crate::channels::ChannelSystemPrompt;-use crate::channels::context::{CHANNEL_MESSAGE_TIMEOUT_SECS, ChannelRuntimeContext};use crate::config::{MultimodalConfig, MultimodalFileConfig, ReliabilityConfig};use crate::core::bus::BUS;use crate::core::events::DomainEvent;diff --git a/crates/openhuman-core/src/channels/system_prompt.rs b/crates/openhuman-core/src/channels/system_prompt.rsindex a006d958b9..3933c952ed 100644--- a/crates/openhuman-core/src/channels/system_prompt.rs+++ b/crates/openhuman-core/src/channels/system_prompt.rs@@ -21,8 +21,8 @@//! bytes, which is the whole point.use crate::agent::context::channels_prompt::{- ProjectContextPlacement, PromptIdentityOverride, build_system_prompt_with_identity,- render_project_context,+ build_system_prompt_with_identity, render_project_context, ProjectContextPlacement,+ PromptIdentityOverride,};use std::collections::hash_map::DefaultHasher;use std::hash::{Hash, Hasher};diff --git a/crates/openhuman-core/src/channels/tests/discord_integration.rs b/crates/openhuman-core/src/channels/tests/discord_integration.rsindex ea8a3b2d74..20a0eb9809 100644--- a/crates/openhuman-core/src/channels/tests/discord_integration.rs+++ b/crates/openhuman-core/src/channels/tests/discord_integration.rs@@ -24,7 +24,7 @@//! starts failing.use super::super::context::{- CHANNEL_MESSAGE_TIMEOUT_SECS, ChannelRuntimeContext, conversation_history_key,+ conversation_history_key, ChannelRuntimeContext, CHANNEL_MESSAGE_TIMEOUT_SECS,};use super::super::runtime::process_channel_message;use super::super::{Channel, SendMessage};diff --git a/crates/openhuman-core/src/channels/tests/health.rs b/crates/openhuman-core/src/channels/tests/health.rsindex 63ad7ab500..17e0230fe7 100644--- a/crates/openhuman-core/src/channels/tests/health.rs+++ b/crates/openhuman-core/src/channels/tests/health.rs@@ -1,8 +1,8 @@-use super::super::Channel;use super::super::runtime::spawn_supervised_listener;+use super::super::Channel;use super::common::AlwaysFailChannel;-use std::sync::Arc;use std::sync::atomic::{AtomicUsize, Ordering};+use std::sync::Arc;use std::time::Duration;use tinychannels_bus as traits;@@ -33,12 +33,10 @@ async fn supervised_listener_marks_error_and_restarts_on_failures() {assert_eq!(component["status"], "error");assert!(component["restart_count"].as_u64().unwrap_or(0) >= 1);- assert!(- component["last_error"]- .as_str()- .unwrap_or("")- .contains("listen boom")- );+ assert!(component["last_error"]+ .as_str()+ .unwrap_or("")+ .contains("listen boom"));assert!(calls.load(Ordering::SeqCst) >= 1);}diff --git a/crates/openhuman-core/src/channels/tests/prompt.rs b/crates/openhuman-core/src/channels/tests/prompt.rsindex 0cd6152d56..b9c1d3bd41 100644--- a/crates/openhuman-core/src/channels/tests/prompt.rs+++ b/crates/openhuman-core/src/channels/tests/prompt.rs@@ -1,5 +1,5 @@use super::common::make_workspace;-use crate::agent::context::channels_prompt::{BOOTSTRAP_MAX_CHARS, build_system_prompt};+use crate::agent::context::channels_prompt::{build_system_prompt, BOOTSTRAP_MAX_CHARS};use tempfile::TempDir;#[test]diff --git a/crates/openhuman-core/src/channels/tests/runtime_dispatch.rs b/crates/openhuman-core/src/channels/tests/runtime_dispatch.rsindex 8ec56206be..87e8e826cb 100644--- a/crates/openhuman-core/src/channels/tests/runtime_dispatch.rs+++ b/crates/openhuman-core/src/channels/tests/runtime_dispatch.rs@@ -1,11 +1,11 @@-use super::super::Channel;-use super::super::context::{CHANNEL_MESSAGE_TIMEOUT_SECS, ChannelRuntimeContext};-use super::super::runtime::test_support::{DispatchHarnessOptions, run_dispatch_harness};+use super::super::context::{ChannelRuntimeContext, CHANNEL_MESSAGE_TIMEOUT_SECS};+use super::super::runtime::test_support::{run_dispatch_harness, DispatchHarnessOptions};use super::super::runtime::{- RuntimeChannelMessage, process_channel_message, run_message_dispatch_loop,+ process_channel_message, run_message_dispatch_loop, RuntimeChannelMessage,};-use super::common::{RecordingChannel, SlowModel, use_real_agent_handler};-use crate::agent::bus::{AgentTurnRequest, AgentTurnResponse, mock_agent_run_turn};+use super::super::Channel;+use super::common::{use_real_agent_handler, RecordingChannel, SlowModel};+use crate::agent::bus::{mock_agent_run_turn, AgentTurnRequest, AgentTurnResponse};use crate::core::events::DomainEvent;use crate::inference::provider;use std::collections::HashMap;@@ -699,10 +699,8 @@ async fn dispatch_replies_with_timeout_notice_when_handler_exceeds_deadline() {..Default::default()}).await;- assert!(- timed_out- .sends- .iter()- .any(|send| send.content.contains("Request timed out"))- );+ assert!(timed_out+ .sends+ .iter()+ .any(|send| send.content.contains("Request timed out")));}diff --git a/crates/openhuman-core/src/channels/tests/runtime_tool_calls.rs b/crates/openhuman-core/src/channels/tests/runtime_tool_calls.rsindex 36ef01c7c1..08096e3de9 100644--- a/crates/openhuman-core/src/channels/tests/runtime_tool_calls.rs+++ b/crates/openhuman-core/src/channels/tests/runtime_tool_calls.rs@@ -1,9 +1,9 @@-use super::super::Channel;use super::super::context::{- CHANNEL_MESSAGE_TIMEOUT_SECS, ChannelRouteSelection, ChannelRuntimeContext,- conversation_history_key,+ conversation_history_key, ChannelRouteSelection, ChannelRuntimeContext,+ CHANNEL_MESSAGE_TIMEOUT_SECS,};use super::super::runtime::process_channel_message;+use super::super::Channel;use super::common::{IterativeToolModel, MockPriceTool, ModelCaptureModel, RecordingChannel,TelegramRecordingChannel, ToolCallingModel,diff --git a/crates/openhuman-core/src/channels/tests/telegram_integration.rs b/crates/openhuman-core/src/channels/tests/telegram_integration.rsindex 2f5a8ec783..ce530b5dbc 100644--- a/crates/openhuman-core/src/channels/tests/telegram_integration.rs+++ b/crates/openhuman-core/src/channels/tests/telegram_integration.rs@@ -6,7 +6,7 @@//! about exactly what the channel receives, without needing a real Telegram HTTP server.use super::super::context::{- CHANNEL_MESSAGE_TIMEOUT_SECS, ChannelRuntimeContext, conversation_history_key,+ conversation_history_key, ChannelRuntimeContext, CHANNEL_MESSAGE_TIMEOUT_SECS,};use super::super::runtime::process_channel_message;use super::super::{Channel, SendMessage};diff --git a/crates/openhuman-core/src/cron/channel_bridge_tests.rs b/crates/openhuman-core/src/cron/channel_bridge_tests.rsindex c7b47e3664..541bdc3ce2 100644--- a/crates/openhuman-core/src/cron/channel_bridge_tests.rs+++ b/crates/openhuman-core/src/cron/channel_bridge_tests.rs@@ -70,9 +70,7 @@ async fn bridge_reads_appends_trims_and_sends() {"42|cron:j:r1","the send carries the run-specific idempotency key");- assert!(- send_to_channel("slack", "42", None, "hi", "k")- .await- .is_err()- );+ assert!(send_to_channel("slack", "42", None, "hi", "k")+ .await+ .is_err());}