Skip to content

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

test(schemas): annotate handler types in schema tests

Steven Enamakel27974bc066d5
diff --git a/crates/openhuman-core/src/mcp/registry/schemas_tests.rs b/crates/openhuman-core/src/mcp/registry/schemas_tests.rs
index e55ee1b44f..f2b40c1ac6 100644
--- a/crates/openhuman-core/src/mcp/registry/schemas_tests.rs
+++ b/crates/openhuman-core/src/mcp/registry/schemas_tests.rs
@@ -132,7 +132,7 @@ fn registry_get_legacy_catalog_keeps_its_handler_and_fixture_contract() {
assert_eq!(controllers.len(), 1);
assert!(std::ptr::fn_addr_eq(
controllers[0].handler,
- super::handlers::handle_registry_get
+ super::handlers::handle_registry_get as crate::core::all::ControllerHandler
));
crate::core::all::verify_parameter_schema(
&controllers[0].schema,
diff --git a/crates/openhuman-core/src/modules/schemas_tests.rs b/crates/openhuman-core/src/modules/schemas_tests.rs
index 7fa2ff9f54..680db26a8a 100644
--- a/crates/openhuman-core/src/modules/schemas_tests.rs
+++ b/crates/openhuman-core/src/modules/schemas_tests.rs
@@ -153,7 +153,7 @@ fn computer_status_legacy_catalog_keeps_its_handler_and_fixture_contract() {
assert_eq!(controllers.len(), 1);
assert!(std::ptr::fn_addr_eq(
controllers[0].handler,
- super::handle_computer_status
+ super::handle_computer_status as crate::core::all::ControllerHandler
));
crate::core::all::verify_parameter_schema(
&controllers[0].schema,
diff --git a/crates/openhuman-core/src/voice/live/schemas_tests.rs b/crates/openhuman-core/src/voice/live/schemas_tests.rs
index 398c2494d9..9ea18871eb 100644
--- a/crates/openhuman-core/src/voice/live/schemas_tests.rs
+++ b/crates/openhuman-core/src/voice/live/schemas_tests.rs
@@ -26,8 +26,10 @@ fn registers_four_live_controllers_in_the_voice_namespace() {
#[test]
fn live_legacy_catalog_keeps_private_handler_identities_and_schema_fixtures() {
+ use crate::core::all::ControllerHandler;
+
let controllers = live_registered_controllers();
- let expected = [
+ let expected: [(&str, ControllerHandler); 4] = [
("voice.live_providers", handle_live_providers),
("voice.live_settings_get", handle_live_settings_get),
("voice.live_settings_set", handle_live_settings_set),
diff --git a/crates/openhuman-core/src/voice/schemas_tests.rs b/crates/openhuman-core/src/voice/schemas_tests.rs
index 22479e307f..fabf5cc9bc 100644
--- a/crates/openhuman-core/src/voice/schemas_tests.rs
+++ b/crates/openhuman-core/src/voice/schemas_tests.rs
@@ -8,9 +8,13 @@ use serde_json::json;
#[test]
fn legacy_voice_catalog_keeps_its_handlers_and_schema_fixtures() {
use super::handlers::*;
+ use crate::core::all::ControllerHandler;
- let controllers = all_voice_registered_controllers();
- let expected = [
+ let controllers: Vec<_> = all_voice_registered_controllers()
+ .into_iter()
+ .filter(|controller| !controller.schema.method_name().contains(".live_"))
+ .collect();
+ let expected: [(&str, ControllerHandler); 11] = [
("voice.status", handle_voice_status),
("voice.transcribe", handle_voice_transcribe),
("voice.transcribe_bytes", handle_voice_transcribe_bytes),