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(mcp): load staged tinymcp module in dispatch tests
Steven Enamakel71cac8f42432
diff --git a/crates/openhuman-core/src/mcp/audit/schemas_tests.rs b/crates/openhuman-core/src/mcp/audit/schemas_tests.rsindex 358823b303..0994ace50c 100644--- a/crates/openhuman-core/src/mcp/audit/schemas_tests.rs+++ b/crates/openhuman-core/src/mcp/audit/schemas_tests.rs@@ -34,7 +34,9 @@ async fn handle_list_returns_persisted_audit_records() {let config = config_rpc::load_config_with_timeout().await.expect("config");- crate::modules::boot::load_declared_modules(&config).await;+ crate::modules::ops::ensure_loaded(&config, "tinymcp")+ .await+ .expect("load the staged TinyMCP test module");crate::mcp::audit::record_write(&config,crate::mcp::audit::NewMcpWriteRecord {diff --git a/crates/openhuman-core/src/mcp/server/tools_tests_dispatch_tests.rs b/crates/openhuman-core/src/mcp/server/tools_tests_dispatch_tests.rsindex 2d989d9e97..744db4304f 100644--- a/crates/openhuman-core/src/mcp/server/tools_tests_dispatch_tests.rs+++ b/crates/openhuman-core/src/mcp/server/tools_tests_dispatch_tests.rs@@ -10,7 +10,9 @@ async fn call_tool_records_write_argument_rejection() {let config = config_rpc::load_config_with_timeout().await.expect("config");- crate::modules::boot::load_declared_modules(&config).await;+ crate::modules::ops::ensure_loaded(&config, "tinymcp")+ .await+ .expect("load the staged TinyMCP test module");let err = call_tool(&crate::core::runtime::DispatchCtx::ambient(),@@ -85,7 +87,9 @@ async fn call_tool_validates_memory_arguments_before_dispatch() {let config = config_rpc::load_config_with_timeout().await.expect("config");- crate::modules::boot::load_declared_modules(&config).await;+ crate::modules::ops::ensure_loaded(&config, "tinymcp")+ .await+ .expect("load the staged TinyMCP test module");let err = call_tool(&crate::core::runtime::DispatchCtx::ambient(),"memory.forget",@@ -128,7 +132,9 @@ async fn call_tool_judges_the_policy_of_the_explicit_context_across_scopes() {let mut allowing = crate::config::Config::default();allowing.workspace_dir = tmp_allow.path().to_path_buf();allowing.action_dir = tmp_allow.path().to_path_buf();- crate::modules::boot::load_declared_modules(&allowing).await;+ crate::modules::ops::ensure_loaded(&allowing, "tinymcp")+ .await+ .expect("load the staged TinyMCP test module");let deny_core = CoreContext::for_test_with_config(DomainSet::full(), denying);let allow_core = CoreContext::for_test_with_config(DomainSet::full(), allowing);diff --git a/crates/openhuman-core/src/mcp/server/write_dispatch_tests.rs b/crates/openhuman-core/src/mcp/server/write_dispatch_tests.rsindex c5df67770f..63e86c4703 100644--- a/crates/openhuman-core/src/mcp/server/write_dispatch_tests.rs+++ b/crates/openhuman-core/src/mcp/server/write_dispatch_tests.rs@@ -59,7 +59,9 @@ async fn audit_write_rejection_records_failure_row() {let mut config = Config::default();config.workspace_dir = tmp.path().join("workspace");std::fs::create_dir_all(&config.workspace_dir).unwrap();- crate::modules::boot::load_declared_modules(&config).await;+ crate::modules::ops::ensure_loaded(&config, "tinymcp")+ .await+ .expect("load the staged TinyMCP test module");let err = ToolCallError::InvalidParams("bad write request".into());audit_write_rejection(@@ -160,7 +162,9 @@ async fn test_dispatch_write_tool_rpc_error_records_audit_and_returns_tool_errorlet mut config = Config::default();config.workspace_dir = tmp.path().join("workspace");std::fs::create_dir_all(&config.workspace_dir).unwrap();- crate::modules::boot::load_declared_modules(&config).await;+ crate::modules::ops::ensure_loaded(&config, "tinymcp")+ .await+ .expect("load the staged TinyMCP test module");// Omit the required `text` so the handler (or the missing registration)// yields a failure instead of a stored item.@@ -209,7 +213,9 @@ async fn test_audit_write_success_path() {let mut config = Config::default();config.workspace_dir = tmp.path().join("workspace");std::fs::create_dir_all(&config.workspace_dir).unwrap();- crate::modules::boot::load_declared_modules(&config).await;+ crate::modules::ops::ensure_loaded(&config, "tinymcp")+ .await+ .expect("load the staged TinyMCP test module");audit_write(&config,