Skip to content

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

style: apply rustfmt import ordering and assertion formatting

Steven Enamakel8b0931c67b01
diff --git a/crates/openhuman-core/src/core/all_bound_controller_tests.rs b/crates/openhuman-core/src/core/all_bound_controller_tests.rs
index 158ad76c82..3fbfbc4907 100644
--- a/crates/openhuman-core/src/core/all_bound_controller_tests.rs
+++ b/crates/openhuman-core/src/core/all_bound_controller_tests.rs
@@ -1,8 +1,8 @@
use super::*;
-use crate::core::{runtime::DispatchCtx, FieldSchema, TypeSchema};
+use crate::core::{FieldSchema, TypeSchema, runtime::DispatchCtx};
use std::sync::{
- atomic::{AtomicUsize, Ordering},
Mutex,
+ atomic::{AtomicUsize, Ordering},
};
static CALLS: AtomicUsize = AtomicUsize::new(0);
@@ -101,9 +101,11 @@ fn production_registry_binds_every_socket_controller_to_its_declared_parser() {
contracts.len(),
"complete raw socket inventory"
);
- assert!(entries
- .iter()
- .all(|entry| entry.schema.namespace == "socket"));
+ assert!(
+ entries
+ .iter()
+ .all(|entry| entry.schema.namespace == "socket")
+ );
assert_eq!(
entries
.iter()
@@ -439,9 +441,11 @@ fn production_registry_binds_mcp_registry_get_to_its_declared_parser() {
.filter(|grouped| grouped.controller.schema.method_name() == "mcp_clients.registry_get")
.collect();
assert_eq!(entries.len(), 1, "registry_get has one public raw entry");
- assert!(!internal_registry()
- .iter()
- .any(|grouped| grouped.controller.schema.method_name() == "mcp_clients.registry_get"));
+ assert!(
+ !internal_registry()
+ .iter()
+ .any(|grouped| grouped.controller.schema.method_name() == "mcp_clients.registry_get")
+ );
let grouped = entries[0];
assert_eq!(grouped.group, DomainGroup::Mcp);
let entry = &grouped.controller;
@@ -475,9 +479,11 @@ fn production_registry_binds_mcp_registry_get_to_its_declared_parser() {
.expect("positive contract includes its required input")
.required = false;
}
- assert!(required_input_contract(&broken, contract.required)
- .unwrap_err()
- .contains("required inputs mismatch"));
+ assert!(
+ required_input_contract(&broken, contract.required)
+ .unwrap_err()
+ .contains("required inputs mismatch")
+ );
}
}
@@ -495,9 +501,11 @@ fn production_registry_binds_computer_status_to_its_declared_parser() {
1,
"computer_status has one internal raw registry entry"
);
- assert!(!registry()
- .iter()
- .any(|grouped| grouped.controller.schema.method_name() == "modules.computer_status"));
+ assert!(
+ !registry()
+ .iter()
+ .any(|grouped| grouped.controller.schema.method_name() == "modules.computer_status")
+ );
let grouped = entries[0];
assert_eq!(grouped.group, DomainGroup::Modules);
let entry = &grouped.controller;
@@ -577,9 +585,11 @@ fn production_registry_binds_composio_execute_to_its_declared_parser() {
.expect("independent required-field contract matches production schema");
let mut missing_required = entry.schema.clone();
missing_required.inputs.retain(|field| field.name != "tool");
- assert!(required_input_contract(&missing_required, &["tool"])
- .unwrap_err()
- .contains("required inputs mismatch"));
+ assert!(
+ required_input_contract(&missing_required, &["tool"])
+ .unwrap_err()
+ .contains("required inputs mismatch")
+ );
let mut optional_required = entry.schema.clone();
optional_required
.inputs
@@ -587,9 +597,11 @@ fn production_registry_binds_composio_execute_to_its_declared_parser() {
.find(|field| field.name == "tool")
.expect("tool schema field")
.required = false;
- assert!(required_input_contract(&optional_required, &["tool"])
- .unwrap_err()
- .contains("required inputs mismatch"));
+ assert!(
+ required_input_contract(&optional_required, &["tool"])
+ .unwrap_err()
+ .contains("required inputs mismatch")
+ );
for example in [
json!({"tool":"GMAIL_SEND_EMAIL"}),
diff --git a/crates/openhuman-core/src/core/all_bound_registry_contract_tests.rs b/crates/openhuman-core/src/core/all_bound_registry_contract_tests.rs
index 06b6ac7299..fe1424283d 100644
--- a/crates/openhuman-core/src/core/all_bound_registry_contract_tests.rs
+++ b/crates/openhuman-core/src/core/all_bound_registry_contract_tests.rs
@@ -1,4 +1,4 @@
-use super::registry_test_support::{verify_family_contract, BoundFamilyWireContract};
+use super::registry_test_support::{BoundFamilyWireContract, verify_family_contract};
use super::*;
#[test]
@@ -55,14 +55,16 @@ fn family_verifier_rejects_group_visibility_and_inventory_mutations() {
.unwrap_err()
.contains("wrong domain group")
);
- assert!(verify_family_contract(
- std::slice::from_ref(&good),
- std::slice::from_ref(&good),
- &contract,
- &fixtures
- )
- .unwrap_err()
- .contains("internal registry"));
+ assert!(
+ verify_family_contract(
+ std::slice::from_ref(&good),
+ std::slice::from_ref(&good),
+ &contract,
+ &fixtures
+ )
+ .unwrap_err()
+ .contains("internal registry")
+ );
for (methods, message) in [
(
diff --git a/crates/openhuman-core/src/core/all_dispatch_ctx_tests.rs b/crates/openhuman-core/src/core/all_dispatch_ctx_tests.rs
index 16c958cdcb..981bc9cb19 100644
--- a/crates/openhuman-core/src/core/all_dispatch_ctx_tests.rs
+++ b/crates/openhuman-core/src/core/all_dispatch_ctx_tests.rs
@@ -1,6 +1,6 @@
//! The dispatch context reaches the handler as an argument, per call.
-use serde_json::{json, Map, Value};
+use serde_json::{Map, Value, json};
use super::*;
use crate::core::runtime::{CoreContext, DispatchCtx, DomainSet};
diff --git a/crates/openhuman-core/src/core/all_entry.rs b/crates/openhuman-core/src/core/all_entry.rs
index 6cacec652b..43cffeabc4 100644
--- a/crates/openhuman-core/src/core/all_entry.rs
+++ b/crates/openhuman-core/src/core/all_entry.rs
@@ -4,8 +4,8 @@ use std::{future::Future, pin::Pin, sync::Arc};
use serde_json::{Map, Value};
-use crate::core::runtime::DispatchCtx;
use crate::core::ControllerSchema;
+use crate::core::runtime::DispatchCtx;
/// A pinned, boxed future returned by a controller handler.
pub type ControllerFuture = Pin<Box<dyn Future<Output = Result<Value, String>> + Send + 'static>>;
diff --git a/crates/openhuman-core/src/core/all_extensions_tests.rs b/crates/openhuman-core/src/core/all_extensions_tests.rs
index b77961284f..7626dfc05b 100644
--- a/crates/openhuman-core/src/core/all_extensions_tests.rs
+++ b/crates/openhuman-core/src/core/all_extensions_tests.rs
@@ -31,9 +31,11 @@ async fn registry_extension_is_visible_to_every_lookup_and_dispatches() {
Some("openhuman.ext_probe_ping")
);
assert!(schema_for_rpc_method("openhuman.ext_probe_ping").is_some());
- assert!(all_controller_schemas()
- .iter()
- .any(|s| s.namespace == "ext_probe" && s.function == "ping"));
+ assert!(
+ all_controller_schemas()
+ .iter()
+ .any(|s| s.namespace == "ext_probe" && s.function == "ping")
+ );
assert_eq!(
namespace_description("ext_probe"),
Some("Registry extension probe.")
diff --git a/crates/openhuman-core/src/core/all_invoke.rs b/crates/openhuman-core/src/core/all_invoke.rs
index 6de319ac4a..8afacee0fa 100644
--- a/crates/openhuman-core/src/core/all_invoke.rs
+++ b/crates/openhuman-core/src/core/all_invoke.rs
@@ -5,7 +5,7 @@ use std::pin::Pin;
use serde_json::{Map, Value};
-use super::{internal_registry, registry_view, visible, ControllerFuture};
+use super::{ControllerFuture, internal_registry, registry_view, visible};
use crate::core::runtime::{CoreContext, DispatchCtx};
type Dispatched = Pin<Box<dyn Future<Output = Option<Result<Value, String>>> + Send + 'static>>;
diff --git a/crates/openhuman-core/src/core/all_keyring_consent_controller_tests.rs b/crates/openhuman-core/src/core/all_keyring_consent_controller_tests.rs
index 0ceda2b258..18713830e5 100644
--- a/crates/openhuman-core/src/core/all_keyring_consent_controller_tests.rs
+++ b/crates/openhuman-core/src/core/all_keyring_consent_controller_tests.rs
@@ -1,5 +1,5 @@
use super::*;
-use serde_json::{json, Map};
+use serde_json::{Map, json};
fn keyring_consent_entries() -> Vec<ControllerEntry> {
registry()
diff --git a/crates/openhuman-core/src/core/all_registry_tests.rs b/crates/openhuman-core/src/core/all_registry_tests.rs
index 8d24e9038f..eda36df7a1 100644
--- a/crates/openhuman-core/src/core/all_registry_tests.rs
+++ b/crates/openhuman-core/src/core/all_registry_tests.rs
@@ -2,7 +2,7 @@ use super::*;
#[tokio::test]
async fn doctor_report_is_in_both_scoped_saas_dispatch_and_schema_surfaces() {
- use crate::core::runtime::{mode, ContextOverlay, CoreContext, DomainSet, Mode};
+ use crate::core::runtime::{ContextOverlay, CoreContext, DomainSet, Mode, mode};
const CHILD: &str = "OPENHUMAN_SAAS_DOCTOR_SURFACE_CHILD";
let name = "doctor_report_is_in_both_scoped_saas_dispatch_and_schema_surfaces";
@@ -81,13 +81,17 @@ async fn doctor_report_is_in_both_scoped_saas_dispatch_and_schema_surfaces() {
assert!(operator_schemas.iter().any(|method| method == doctor));
assert!(user_methods.iter().any(|method| method == doctor));
assert!(user_schemas.iter().any(|method| method == doctor));
- assert!(!operator_methods
- .iter()
- .any(|method| method == doctor_models));
+ assert!(
+ !operator_methods
+ .iter()
+ .any(|method| method == doctor_models)
+ );
assert!(!user_methods.iter().any(|method| method == doctor_models));
- assert!(!user_methods
- .iter()
- .any(|method| method == "openhuman.config_get_config"));
+ assert!(
+ !user_methods
+ .iter()
+ .any(|method| method == "openhuman.config_get_config")
+ );
}
#[tokio::test]
diff --git a/crates/openhuman-core/src/core/all_schema_contract_tests.rs b/crates/openhuman-core/src/core/all_schema_contract_tests.rs
index 4f7df67f7d..5474cff300 100644
--- a/crates/openhuman-core/src/core/all_schema_contract_tests.rs
+++ b/crates/openhuman-core/src/core/all_schema_contract_tests.rs
@@ -40,9 +40,11 @@ fn registered_memory_contract_rejects_missing_or_optional_question() {
.expect("real recall schema declares question")
.required = false;
}
- assert!(independent_registered_schema_contract(&broken)
- .unwrap_err()
- .contains("memory.recall required inputs mismatch"));
+ assert!(
+ independent_registered_schema_contract(&broken)
+ .unwrap_err()
+ .contains("memory.recall required inputs mismatch")
+ );
}
}
@@ -140,9 +142,11 @@ fn registered_wallet_schema_contract_rejects_missing_encrypted_mnemonic() {
.inputs
.retain(|input| input.name != "encryptedMnemonic");
- assert!(independent_registered_schema_contract(&schema)
- .unwrap_err()
- .contains("is missing required input `encryptedMnemonic`"));
+ assert!(
+ independent_registered_schema_contract(&schema)
+ .unwrap_err()
+ .contains("is missing required input `encryptedMnemonic`")
+ );
}
/// Built-in/internal snapshots avoid ambient DomainSet filtering and global
@@ -162,10 +166,14 @@ fn optional_domain_controller_methods_are_absent_when_features_are_disabled() {
.into_iter()
.map(|controller| controller.schema.method_name())
.collect::<Vec<_>>();
- assert!(!methods
- .iter()
- .any(|method| method == "mcp_clients.registry_get"));
- assert!(!methods
- .iter()
- .any(|method| method == "modules.computer_status"));
+ assert!(
+ !methods
+ .iter()
+ .any(|method| method == "mcp_clients.registry_get")
+ );
+ assert!(
+ !methods
+ .iter()
+ .any(|method| method == "modules.computer_status")
+ );
}
diff --git a/crates/openhuman-core/src/core/all_tests.rs b/crates/openhuman-core/src/core/all_tests.rs
index c1cd50f25f..74822ffd29 100644
--- a/crates/openhuman-core/src/core/all_tests.rs
+++ b/crates/openhuman-core/src/core/all_tests.rs
@@ -856,8 +856,8 @@ fn every_registered_controller_has_matching_declared_schema() {
// --- DomainSet registration filter (#4796) ------------------------------
-use crate::core::runtime::context::CoreContext;
use crate::core::runtime::DomainSet;
+use crate::core::runtime::context::CoreContext;
/// The [`DomainGroup`] a registered controller (agent-facing OR internal) is
/// tagged with, looked up by its namespace. Test-only helper over the private
diff --git a/crates/openhuman-core/src/core/all_tool_registry_controller_tests.rs b/crates/openhuman-core/src/core/all_tool_registry_controller_tests.rs
index 3749e6e295..9ff8a6b7d6 100644
--- a/crates/openhuman-core/src/core/all_tool_registry_controller_tests.rs
+++ b/crates/openhuman-core/src/core/all_tool_registry_controller_tests.rs
@@ -1,5 +1,5 @@
use super::*;
-use serde_json::{json, Map};
+use serde_json::{Map, json};
fn tool_registry_entries() -> Vec<ControllerEntry> {
registry()
diff --git a/crates/openhuman-core/src/core/schema_test_support_tests.rs b/crates/openhuman-core/src/core/schema_test_support_tests.rs
index fbab7c2261..9eabe02008 100644
--- a/crates/openhuman-core/src/core/schema_test_support_tests.rs
+++ b/crates/openhuman-core/src/core/schema_test_support_tests.rs
@@ -78,9 +78,11 @@ fn contract_inventory_rejects_missing_extra_duplicate_and_empty_rows() {
.unwrap_err()
.contains("duplicate contract")
);
- assert!(verify_parameter_contracts(&[], &[])
- .unwrap_err()
- .contains("empty"));
+ assert!(
+ verify_parameter_contracts(&[], &[])
+ .unwrap_err()
+ .contains("empty")
+ );
}
#[test]
@@ -149,30 +151,38 @@ fn missing_examples_and_actual_parser_rejection_are_not_hidden() {
);
let mut broken = contract;
broken.examples = vec![serde_json::json!({"id":7})];
- assert!(verify_parameter_contracts(&[controller], &[broken])
- .unwrap_err()
- .contains("schema rejects example"));
+ assert!(
+ verify_parameter_contracts(&[controller], &[broken])
+ .unwrap_err()
+ .contains("schema rejects example")
+ );
}
#[test]
fn duplicate_controller_and_schema_identity_failures_are_rejected() {
let (controller, contract) = fixture();
- assert!(verify_parameter_contracts(
- &[controller.clone(), controller.clone()],
- std::slice::from_ref(&contract)
- )
- .unwrap_err()
- .contains("duplicate controller"));
+ assert!(
+ verify_parameter_contracts(
+ &[controller.clone(), controller.clone()],
+ std::slice::from_ref(&contract)
+ )
+ .unwrap_err()
+ .contains("duplicate controller")
+ );
let mut broken = controller.schema.clone();
broken.function = "other";
- assert!(verify_parameter_schema(&broken, &contract)
- .unwrap_err()
- .contains("method identity"));
+ assert!(
+ verify_parameter_schema(&broken, &contract)
+ .unwrap_err()
+ .contains("method identity")
+ );
let mut broken = controller.schema;
broken.description = " ";
- assert!(verify_parameter_schema(&broken, &contract)
- .unwrap_err()
- .contains("no description"));
+ assert!(
+ verify_parameter_schema(&broken, &contract)
+ .unwrap_err()
+ .contains("no description")
+ );
}
#[test]
@@ -182,22 +192,28 @@ fn legacy_entries_are_rejected_without_running_the_legacy_handler() {
schema: bound.schema,
handler: legacy_handler,
});
- assert!(verify_parameter_contracts(&[legacy], &[contract])
- .unwrap_err()
- .contains("registry entry is legacy"));
+ assert!(
+ verify_parameter_contracts(&[legacy], &[contract])
+ .unwrap_err()
+ .contains("registry entry is legacy")
+ );
}
#[test]
fn examples_must_be_objects_and_satisfy_schema_before_decoding() {
let (controller, mut contract) = fixture();
contract.examples = vec![Value::Null];
- assert!(verify_parameter_schema(&controller.schema, &contract)
- .unwrap_err()
- .contains("not an object"));
+ assert!(
+ verify_parameter_schema(&controller.schema, &contract)
+ .unwrap_err()
+ .contains("not an object")
+ );
contract.examples = vec![serde_json::json!({})];
- assert!(verify_parameter_schema(&controller.schema, &contract)
- .unwrap_err()
- .contains("schema rejects example"));
+ assert!(
+ verify_parameter_schema(&controller.schema, &contract)
+ .unwrap_err()
+ .contains("schema rejects example")
+ );
}
#[test]
@@ -256,9 +272,11 @@ fn wire_field_contract_pins_count_order_type_and_requiredness() {
.unwrap_err()
.contains("name mismatch")
);
- assert!(verify_wire_fields(std::slice::from_ref(&field), &[])
- .unwrap_err()
- .contains("count mismatch"));
+ assert!(
+ verify_wire_fields(std::slice::from_ref(&field), &[])
+ .unwrap_err()
+ .contains("count mismatch")
+ );
let wrong_required = [("items", expected[0].1.clone(), true)];
assert!(
verify_wire_fields(std::slice::from_ref(&field), &wrong_required)
@@ -296,7 +314,9 @@ fn wire_field_contract_pins_count_order_type_and_requiredness() {
("first", crate::core::TypeSchema::String, true),
("second", crate::core::TypeSchema::Bool, true),
];
- assert!(verify_wire_fields(&reversed, &ordered)
- .unwrap_err()
- .contains("name mismatch"));
+ assert!(
+ verify_wire_fields(&reversed, &ordered)
+ .unwrap_err()
+ .contains("name mismatch")
+ );
}
diff --git a/vendor/tinywallet b/vendor/tinywallet
index e4ee058b33..c779230db3 160000
--- a/vendor/tinywallet
+++ b/vendor/tinywallet
@@ -1 +1 @@
-Subproject commit e4ee058b3391f4f335028bd6a220d2fd109d48a7
+Subproject commit c779230db3008934f97a61f8bdd297351ce66685