Skip to content

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

chore: files changed crates/openhuman-core/src/mcp/host_sandbox_tests.rs,crates/openhuman-core/src/m

Steven Enamakelc29b8e952778
diff --git a/crates/openhuman-core/src/mcp/host_sandbox_tests.rs b/crates/openhuman-core/src/mcp/host_sandbox_tests.rs
index b63f537caf..19a2078813 100644
--- a/crates/openhuman-core/src/mcp/host_sandbox_tests.rs
+++ b/crates/openhuman-core/src/mcp/host_sandbox_tests.rs
@@ -31,7 +31,11 @@ fn configured_grants_pass_the_host_floor() {
"/no/such/dir/anywhere".into(),
];
let sandbox = stdio_sandbox(&config).expect("a sandbox");
- let granted = granted.canonicalize().unwrap().to_string_lossy().into_owned();
+ let granted = granted
+ .canonicalize()
+ .unwrap()
+ .to_string_lossy()
+ .into_owned();
assert_eq!(sandbox.read_only, vec![granted]);
}
@@ -45,7 +49,13 @@ fn isolation_floor_is_required_except_for_the_macos_desktop() {
fn a_grant_that_contains_a_credential_store_is_not_admitted() {
let home = Path::new("/home/user");
assert!(exposes_credentials(Path::new("/home/user"), Some(home)));
- assert!(exposes_credentials(Path::new("/home/user/.ssh"), Some(home)));
- assert!(!exposes_credentials(Path::new("/home/user/tools"), Some(home)));
+ assert!(exposes_credentials(
+ Path::new("/home/user/.ssh"),
+ Some(home)
+ ));
+ assert!(!exposes_credentials(
+ Path::new("/home/user/tools"),
+ Some(home)
+ ));
assert!(!exposes_credentials(Path::new("/home/user"), None));
}
diff --git a/crates/openhuman-core/src/mcp/host_tests.rs b/crates/openhuman-core/src/mcp/host_tests.rs
index 0b2211ce2a..270e46d4e6 100644
--- a/crates/openhuman-core/src/mcp/host_tests.rs
+++ b/crates/openhuman-core/src/mcp/host_tests.rs
@@ -179,14 +179,21 @@ fn registry_stdio_servers_get_the_host_jail_and_are_never_operator_trusted() {
.expect("tinymcp refuses stdio servers without a stdio_sandbox");
assert!(std::path::Path::new(&sandbox.workspace).is_dir());
assert!(sandbox.workspace.starts_with(
- &tmp.path().canonicalize().unwrap().to_string_lossy().into_owned()
+ &tmp.path()
+ .canonicalize()
+ .unwrap()
+ .to_string_lossy()
+ .into_owned()
));
assert_eq!(
sandbox.require_process_isolation,
super::super::host_sandbox::require_process_isolation(false)
);
assert!(
- converted.servers.iter().all(|server| !server.operator_trusted),
+ converted
+ .servers
+ .iter()
+ .all(|server| !server.operator_trusted),
"the host must not vouch for servers it did not configure as trusted"
);
}
diff --git a/crates/openhuman-core/src/modules/schemas_tests.rs b/crates/openhuman-core/src/modules/schemas_tests.rs
index 6a9b634625..6da5b1b4ae 100644
--- a/crates/openhuman-core/src/modules/schemas_tests.rs
+++ b/crates/openhuman-core/src/modules/schemas_tests.rs
@@ -100,7 +100,11 @@ async fn forgetting_sites_reports_how_many_went() {
assert_eq!(one.unwrap()["forgotten"], 1);
assert_eq!(every.unwrap()["forgotten"], 1);
- assert_eq!(left.unwrap(), 0, "nothing may remain after forgetting every site");
+ assert_eq!(
+ left.unwrap(),
+ 0,
+ "nothing may remain after forgetting every site"
+ );
assert!(
sites.join("books.test.json").exists(),
"the imported legacy file is left untouched"
diff --git a/crates/openhuman-core/src/modules/storage_grant_schemas.rs b/crates/openhuman-core/src/modules/storage_grant_schemas.rs
index 0cc1eb83d4..f04de74a54 100644
--- a/crates/openhuman-core/src/modules/storage_grant_schemas.rs
+++ b/crates/openhuman-core/src/modules/storage_grant_schemas.rs
@@ -19,8 +19,8 @@
//! forward (`ensure_migrated` in `storage_host`).
use super::storage_grants::StorageGrant;
-use tinystoragedrivers::CollectionSpec;
use crate::storage::schema::module_items;
+use tinystoragedrivers::CollectionSpec;
/// One module's row: its registry id, the schema owner that declares its
/// storage, and secret prefixes the schema cannot name.
diff --git a/crates/openhuman-core/src/storage/fenced_backend_tests.rs b/crates/openhuman-core/src/storage/fenced_backend_tests.rs
index 84b2489d76..aaeb7452c8 100644
--- a/crates/openhuman-core/src/storage/fenced_backend_tests.rs
+++ b/crates/openhuman-core/src/storage/fenced_backend_tests.rs
@@ -518,4 +518,3 @@ async fn conditional_append_passes_through(inner: Arc<dyn StorageBackend>) {
async fn fenced_memory_backend_passes_conditional_appends_through() {
conditional_append_passes_through(shared()).await;
}
-
diff --git a/crates/openhuman-embed/tests/runtime_agents.rs b/crates/openhuman-embed/tests/runtime_agents.rs
index 402a3adf87..e3c9bf99d5 100644
--- a/crates/openhuman-embed/tests/runtime_agents.rs
+++ b/crates/openhuman-embed/tests/runtime_agents.rs
@@ -578,8 +578,7 @@ fn one_runtime_hosts_independently_configured_agents() {
// completes (see `Agent`), so wait for it rather than assuming the
// drop is synchronous.
common::eventually("dropped agents to release their ids", || {
- (runtime.agent_ids() == vec!["alpha".to_string(), "beta".to_string()])
- .then_some(())
+ (runtime.agent_ids() == vec!["alpha".to_string(), "beta".to_string()]).then_some(())
})
.await;
let _gamma_again = runtime
diff --git a/tests/agent_harness_e2e.rs b/tests/agent_harness_e2e.rs
index cc0f7d4494..69e34ef566 100644
--- a/tests/agent_harness_e2e.rs
+++ b/tests/agent_harness_e2e.rs
@@ -11,12 +11,12 @@
//! a false positive here — the lock IS the serialization mechanism.
#![allow(clippy::await_holding_lock)]
-#[path = "support/mcp_stub_trusted.rs"]
-mod mcp_stub_trusted;
#[path = "support/env_guard.rs"]
mod env_guard;
#[path = "support/linked_modules.rs"]
mod linked_modules;
+#[path = "support/mcp_stub_trusted.rs"]
+mod mcp_stub_trusted;
#[path = "support/scripted_stack.rs"]
mod scripted_stack;
#[path = "support/tinyhumans_boot.rs"]
diff --git a/tests/cli_storage_url_e2e.rs b/tests/cli_storage_url_e2e.rs
index 69ddc6de55..29a12796db 100644
--- a/tests/cli_storage_url_e2e.rs
+++ b/tests/cli_storage_url_e2e.rs
@@ -116,4 +116,3 @@ fn a_second_process_reads_what_a_one_shot_wrote_to_the_backend() {
"the job lives in the backend, not in files"
);
}
-
diff --git a/tests/mcp_registry_multi_server.rs b/tests/mcp_registry_multi_server.rs
index ef6e103ea8..665b15f8e4 100644
--- a/tests/mcp_registry_multi_server.rs
+++ b/tests/mcp_registry_multi_server.rs
@@ -6,7 +6,6 @@
#![cfg(feature = "mcp")]
-
use openhuman_core::config::{
schema::{ModuleOverride, ModulesConfig},
Config,
diff --git a/tests/storage_agent_scopes_e2e.rs b/tests/storage_agent_scopes_e2e.rs
index 0b44f82afe..85789ee2eb 100644
--- a/tests/storage_agent_scopes_e2e.rs
+++ b/tests/storage_agent_scopes_e2e.rs
@@ -284,4 +284,3 @@ async fn no_acting_agent_falls_back_to_the_local_scope() {
);
assert!(AgentContextRegistry::deregister("agent-gamma", &agent));
}
-
diff --git a/tests/storage_approvals_e2e.rs b/tests/storage_approvals_e2e.rs
index 63d597e0aa..2dd8ecdc90 100644
--- a/tests/storage_approvals_e2e.rs
+++ b/tests/storage_approvals_e2e.rs
@@ -63,4 +63,3 @@ fn a_configured_backend_holds_the_approvals_instead_of_approval_db() {
assert!(store::list_pending(&config).unwrap().is_empty());
assert!(workspace.path().join("storage").join("storage.db").exists());
}
-
diff --git a/tests/storage_delegation_e2e.rs b/tests/storage_delegation_e2e.rs
index 6c16e97ee9..faa1b683d6 100644
--- a/tests/storage_delegation_e2e.rs
+++ b/tests/storage_delegation_e2e.rs
@@ -163,4 +163,3 @@ async fn the_delegation_checkpointer_resumes_and_keeps_scopes_apart() {
assert!(AgentContextRegistry::deregister("agent-alpha", &alpha));
assert!(AgentContextRegistry::deregister("agent-beta", &beta));
}
-
diff --git a/tests/storage_desktop_upgrade_e2e.rs b/tests/storage_desktop_upgrade_e2e.rs
index 2b4a14a354..2773277779 100644
--- a/tests/storage_desktop_upgrade_e2e.rs
+++ b/tests/storage_desktop_upgrade_e2e.rs
@@ -583,4 +583,3 @@ async fn a_desktop_upgrade_is_lossless_and_leaves_the_legacy_files_untouched() {
// The user's files were only ever read.
assert_eq!(tree(workspace), before, "the legacy files changed");
}
-
diff --git a/tests/storage_domains_e2e.rs b/tests/storage_domains_e2e.rs
index 39cf20468b..c187b69043 100644
--- a/tests/storage_domains_e2e.rs
+++ b/tests/storage_domains_e2e.rs
@@ -99,4 +99,3 @@ fn a_configured_backend_holds_devices_notifications_and_task_sources() {
assert!(task_sources::list_sources(&config).unwrap().is_empty());
assert!(workspace.path().join("storage/storage.db").exists());
}
-
diff --git a/tests/storage_flows_e2e.rs b/tests/storage_flows_e2e.rs
index a96d919e0a..15ebf1058a 100644
--- a/tests/storage_flows_e2e.rs
+++ b/tests/storage_flows_e2e.rs
@@ -226,4 +226,3 @@ fn copy_tree(from: &std::path::Path, to: &std::path::Path) {
}
}
}
-
diff --git a/tests/storage_scope_e2e.rs b/tests/storage_scope_e2e.rs
index 60431976dc..be81de502d 100644
--- a/tests/storage_scope_e2e.rs
+++ b/tests/storage_scope_e2e.rs
@@ -130,4 +130,3 @@ async fn background_work_visits_every_agent_scope() {
);
assert!(recorded.contains(&(None, Vec::new())), "{recorded:?}");
}
-
diff --git a/tests/storage_secrets_e2e.rs b/tests/storage_secrets_e2e.rs
index 562baf74a0..28dc32d94d 100644
--- a/tests/storage_secrets_e2e.rs
+++ b/tests/storage_secrets_e2e.rs
@@ -127,4 +127,3 @@ fn a_configured_backend_holds_keyring_and_credential_secrets() {
assert!(http.get("legacy-http").unwrap().is_some());
assert_eq!(profiles.load().unwrap().profiles.len(), 1);
}
-