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
test(schemas): tighten legacy catalogue contract assertions
Steven Enamakelc9e304c751c3
diff --git a/crates/openhuman-core/src/core/all_bound_controller_tests.rs b/crates/openhuman-core/src/core/all_bound_controller_tests.rsindex 614cb9b178..7eafa7bc16 100644--- a/crates/openhuman-core/src/core/all_bound_controller_tests.rs+++ b/crates/openhuman-core/src/core/all_bound_controller_tests.rs@@ -303,8 +303,6 @@ fn production_registry_binds_threads_upsert_to_its_declared_parser() {#[test]#[cfg(feature = "mcp")]fn production_registry_binds_mcp_registry_get_to_its_declared_parser() {- use serde_json::json;-let entries: Vec<_> = registry().iter().filter(|grouped| grouped.controller.schema.method_name() == "mcp_clients.registry_get")@@ -375,11 +373,6 @@ fn production_registry_binds_computer_status_to_its_declared_parser() {"computer_status must bind at production registration");assert_eq!(entry.rpc_method_name(), "openhuman.modules_computer_status");- required_input_contract(&entry.schema, &[]).expect("computer_status has no required inputs");- assert_eq!(entry.schema.inputs.len(), 1);- assert_eq!(entry.schema.inputs[0].name, "load");- assert!(!entry.schema.inputs[0].required);-let contract = crate::modules::schemas::computer_status_parameter_contract();crate::core::all::verify_parameter_contracts(std::slice::from_ref(entry),std::slice::from_ref(&contract))diff --git a/crates/openhuman-core/src/mcp/registry/schemas_tests.rs b/crates/openhuman-core/src/mcp/registry/schemas_tests.rsindex 5fff216bda..e55ee1b44f 100644--- a/crates/openhuman-core/src/mcp/registry/schemas_tests.rs+++ b/crates/openhuman-core/src/mcp/registry/schemas_tests.rs@@ -129,9 +129,14 @@ fn registry_get_legacy_catalog_keeps_its_handler_and_fixture_contract() {.into_iter().filter(|controller| controller.schema.method_name() == "mcp_clients.registry_get").collect::<Vec<_>>();- crate::core::all::verify_parameter_contracts(- &controllers,- &[super::registry_get_parameter_contract()],+ assert_eq!(controllers.len(), 1);+ assert!(std::ptr::fn_addr_eq(+ controllers[0].handler,+ super::handlers::handle_registry_get+ ));+ crate::core::all::verify_parameter_schema(+ &controllers[0].schema,+ &super::registry_get_parameter_contract(),)- .expect("legacy catalogue keeps its public handler and authored parser example");+ .expect("legacy catalogue keeps its authored schema example");}diff --git a/crates/openhuman-core/src/modules/schemas_tests.rs b/crates/openhuman-core/src/modules/schemas_tests.rsindex 7052291ad0..7fa2ff9f54 100644--- a/crates/openhuman-core/src/modules/schemas_tests.rs+++ b/crates/openhuman-core/src/modules/schemas_tests.rs@@ -150,9 +150,14 @@ fn computer_status_legacy_catalog_keeps_its_handler_and_fixture_contract() {.into_iter().filter(|controller| controller.schema.method_name() == "modules.computer_status").collect::<Vec<_>>();- crate::core::all::verify_parameter_contracts(- &controllers,- &[super::computer_status_parameter_contract()],+ assert_eq!(controllers.len(), 1);+ assert!(std::ptr::fn_addr_eq(+ controllers[0].handler,+ super::handle_computer_status+ ));+ crate::core::all::verify_parameter_schema(+ &controllers[0].schema,+ &super::computer_status_parameter_contract(),)- .expect("legacy catalogue keeps its public handler and authored parser examples");+ .expect("legacy catalogue keeps its authored schema examples");}