Skip to content

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

style: reorder imports and collapse multi-line assertions

Steven Enamakel71d885939152
diff --git a/crates/openhuman-core/src/modules/schemas_tests.rs b/crates/openhuman-core/src/modules/schemas_tests.rs
index 7ca3759ed2..842f2419cb 100644
--- a/crates/openhuman-core/src/modules/schemas_tests.rs
+++ b/crates/openhuman-core/src/modules/schemas_tests.rs
@@ -1,9 +1,9 @@
use super::{
all_controller_schemas, all_registered_controllers, controller_value, schemas, string_param,
};
+use crate::core::runtime::context::CoreContext;
use crate::core::runtime::DispatchCtx;
use crate::core::runtime::DomainSet;
-use crate::core::runtime::context::CoreContext;
use serde_json::{Map, Value};
#[test]
diff --git a/crates/openhuman-core/src/modules/storage_grant_schemas_tests.rs b/crates/openhuman-core/src/modules/storage_grant_schemas_tests.rs
index f8445b640a..8cf11e7072 100644
--- a/crates/openhuman-core/src/modules/storage_grant_schemas_tests.rs
+++ b/crates/openhuman-core/src/modules/storage_grant_schemas_tests.rs
@@ -1,5 +1,5 @@
use super::*;
-use crate::modules::storage_grants::{Denied, Object, Plan, authorize, declared};
+use crate::modules::storage_grants::{authorize, declared, Denied, Object, Plan};
use serde_json::json;
fn allowed(
diff --git a/crates/openhuman-core/src/modules/storage_import_tinywallet.rs b/crates/openhuman-core/src/modules/storage_import_tinywallet.rs
index f44544d9c1..63832e4c39 100644
--- a/crates/openhuman-core/src/modules/storage_import_tinywallet.rs
+++ b/crates/openhuman-core/src/modules/storage_import_tinywallet.rs
@@ -22,7 +22,7 @@
use std::path::Path;
-use anyhow::{Context, Result, anyhow};
+use anyhow::{anyhow, Context, Result};
use tinystoragedrivers::ScopedStorage;
use super::storage_grant_schemas::tinywallet::{MODULE_ID, PAYMENTS_STREAM};
diff --git a/crates/openhuman-tinyhumans/src/channels/delivery.rs b/crates/openhuman-tinyhumans/src/channels/delivery.rs
index ed5d49b524..7c0323bfa9 100644
--- a/crates/openhuman-tinyhumans/src/channels/delivery.rs
+++ b/crates/openhuman-tinyhumans/src/channels/delivery.rs
@@ -6,7 +6,7 @@
use openhuman_embed::__host::channel_callback::ChannelCallbackCtx;
use openhuman_embed::__host::security::credentials::session_support::{
- BackendCredential, get_session_token, is_local_session_token,
+ get_session_token, is_local_session_token, BackendCredential,
};
use serde_json::json;
use tinychannels_bus::module_progressive::{
diff --git a/crates/openhuman-tinyhumans/src/channels/messaging.rs b/crates/openhuman-tinyhumans/src/channels/messaging.rs
index 09255a5ac2..dc183f574d 100644
--- a/crates/openhuman-tinyhumans/src/channels/messaging.rs
+++ b/crates/openhuman-tinyhumans/src/channels/messaging.rs
@@ -6,14 +6,14 @@
use openhuman_embed::__host::config::Config;
use openhuman_embed::__host::security::credentials::session_support::{
- BackendCredential, resolve_backend_credential,
+ resolve_backend_credential, BackendCredential,
};
use serde_json::Value;
use tinychannels_bus::controllers::{
ChannelReactionResult, ChannelThreadListResult, ChannelThreadResult,
};
-use crate::client::{BackendClient, flatten_authed_error};
+use crate::client::{flatten_authed_error, BackendClient};
/// A result type that keeps the backend payload when its shape is unknown.
pub(super) trait RawFallback {
diff --git a/crates/openhuman-tinyhumans/src/channels/mod.rs b/crates/openhuman-tinyhumans/src/channels/mod.rs
index 5592739a36..f8e2c9d26a 100644
--- a/crates/openhuman-tinyhumans/src/channels/mod.rs
+++ b/crates/openhuman-tinyhumans/src/channels/mod.rs
@@ -19,7 +19,7 @@ mod messaging;
#[cfg(feature = "channels")]
use openhuman_embed::__host::channel_callback::{
- CallbackFuture, ChannelCallbackCtx, register_channel_callback,
+ register_channel_callback, CallbackFuture, ChannelCallbackCtx,
};
#[cfg(feature = "channels")]
use tinychannels_bus::{ChannelBackendRequest, ChannelBackendResult};
diff --git a/crates/openhuman-tinyhumans/src/integrations/composio.rs b/crates/openhuman-tinyhumans/src/integrations/composio.rs
index 912d58f128..0d6a2499aa 100644
--- a/crates/openhuman-tinyhumans/src/integrations/composio.rs
+++ b/crates/openhuman-tinyhumans/src/integrations/composio.rs
@@ -6,12 +6,12 @@
//! ([`register`]). With this crate absent the mode answers
//! `BACKEND_UNAVAILABLE:`.
-use openhuman_embed::__host::composio::{ComposioRoute, register_composio_route_builder};
+use openhuman_embed::__host::composio::{register_composio_route_builder, ComposioRoute};
#[cfg(feature = "modules")]
-use openhuman_embed::__host::composio::{ProxyTarget, register_proxy_target};
+use openhuman_embed::__host::composio::{register_proxy_target, ProxyTarget};
+use openhuman_embed::__host::config::schema::COMPOSIO_MODE_BACKEND;
#[cfg(feature = "modules")]
use openhuman_embed::__host::config::Config;
-use openhuman_embed::__host::config::schema::COMPOSIO_MODE_BACKEND;
use super::build_client;
diff --git a/tests/legacy_voice_config_boot_e2e.rs b/tests/legacy_voice_config_boot_e2e.rs
index 1dd98ef82e..2d47fbcff2 100644
--- a/tests/legacy_voice_config_boot_e2e.rs
+++ b/tests/legacy_voice_config_boot_e2e.rs
@@ -1,7 +1,7 @@
//! A real CLI host boot must tolerate pre-removal voice settings without
//! starting the retired always-on listeners.
-use serde_json::{Value, json};
+use serde_json::{json, Value};
use std::io::{Read, Write};
use std::net::{TcpListener, TcpStream};
use std::path::Path;
diff --git a/tests/mcp_registry_multi_server.rs b/tests/mcp_registry_multi_server.rs
index 905b13a69e..33089f99c9 100644
--- a/tests/mcp_registry_multi_server.rs
+++ b/tests/mcp_registry_multi_server.rs
@@ -7,10 +7,10 @@
#![cfg(feature = "mcp")]
use openhuman_core::config::{
- Config,
schema::{ModuleOverride, ModulesConfig},
+ Config,
};
-use serde_json::{Map, Value, json};
+use serde_json::{json, Map, Value};
const MODULE_ARTIFACT_ENV: &str = "OPENHUMAN_TINYMCP_TEST_MODULE";
@@ -238,22 +238,18 @@ async fn failed_connect_does_not_block_healthy_peer() {
.expect("server remains visible after connect attempt")
};
assert_eq!(status_for(bad)["status"], "error");
- assert!(
- status_for(bad)["last_error"]
- .as_str()
- .is_some_and(|error| !error.is_empty())
- );
+ assert!(status_for(bad)["last_error"]
+ .as_str()
+ .is_some_and(|error| !error.is_empty()));
assert_eq!(status_for(good)["status"], "connected");
assert!(status_for(good)["last_error"].is_null());
let all_tools =
openhuman_core::mcp::registry::connections::all_connected_tools_for_config(&config).await;
assert!(all_tools.iter().all(|(id, _, _)| id != bad));
- assert!(
- all_tools
- .iter()
- .any(|(id, _, tool)| id == good && tool.name == "echo")
- );
+ assert!(all_tools
+ .iter()
+ .any(|(id, _, tool)| id == good && tool.name == "echo"));
assert_eq!(
call_echo(&config, good, "isolation-check").await,
"isolation-check"
@@ -295,11 +291,9 @@ async fn disabled_server_contributes_no_tools_to_agent_surface() {
let all_tools =
openhuman_core::mcp::registry::connections::all_connected_tools_for_config(&config).await;
- assert!(
- all_tools
- .iter()
- .any(|(id, _, tool)| id == live && tool.name == "echo")
- );
+ assert!(all_tools
+ .iter()
+ .any(|(id, _, tool)| id == live && tool.name == "echo"));
assert!(all_tools.iter().all(|(id, _, _)| id != quiet));
assert_eq!(
call_echo(&config, live, "live-while-quiet").await,