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: resolve module artifacts via local_artifact instead of env vars
Steven Enamakel396ae7f3b852
diff --git a/crates/openhuman-core/src/modules/README.md b/crates/openhuman-core/src/modules/README.mdindex d50f54683c..967b4cb172 100644--- a/crates/openhuman-core/src/modules/README.md+++ b/crates/openhuman-core/src/modules/README.md@@ -157,8 +157,7 @@ honoured (no factory registered, no built artifact), the module is served from`release`, one `warn` line names the id and both modes, and`ModuleStatus.detail` carries the reason. `modules.list` reports the servingsource in `source` (`release`, `linked`, `source`, `local_file`); it never-carries a path. The former `TINYSEARCH_TEST_MODULE` / `TINYJUICE_TEST_MODULE` /-`TINYCONNECTORS_TEST_MODULE` variables are no longer read by the loader.+carries a path. No per-module artifact environment variable is read any more.Inside the release cache, tinybus looks for the archive in the bundleddirectory first, then in `install_dir/<id>/<version>/<host_key>`, anddiff --git a/crates/openhuman-embed/tests/profile_direct_providers.rs b/crates/openhuman-embed/tests/profile_direct_providers.rsindex 16800001c7..47babbde84 100644--- a/crates/openhuman-embed/tests/profile_direct_providers.rs+++ b/crates/openhuman-embed/tests/profile_direct_providers.rs@@ -87,7 +87,7 @@ fn profile_uses_operator_direct_chat_and_search_with_no_managed_traffic() {}async fn scenario() {- let module = std::env::var_os("TINYSEARCH_TEST_MODULE").is_some();+ let module = openhuman_core::modules::local_artifact("tinysearch").is_some();let (managed, chat, exa, gemini) = (MockServer::start().await,MockServer::start().await,diff --git a/tests/mcp_registry_e2e.rs b/tests/mcp_registry_e2e.rsindex fcfc2568fb..3597611c2a 100644--- a/tests/mcp_registry_e2e.rs+++ b/tests/mcp_registry_e2e.rs@@ -1,8 +1,9 @@//! Native-module integration tests for the MCP registry host adapter.//!//! These tests use TinyBus' normal loader with a locally supplied TinyMCP-//! artifact. Set `OPENHUMAN_TINYMCP_TEST_MODULE` to the verified platform-//! library to run them with `--ignored`; no implementation crate is linked+//! artifact. Build one with `node scripts/modules/build.mjs tinymcp` and set+//! `OPENHUMAN_MODULE_SOURCE_DIR` (or put the verified platform library on+//! `OPENHUMAN_MODULE_PATH`) to run them with `--ignored`; no implementation crate is linked//! into this host test.#![cfg(feature = "mcp")]@@ -10,13 +11,10 @@use openhuman_core::config::{schema::ModuleOverride, Config};use serde_json::{json, Map, Value};-const MODULE_ARTIFACT_ENV: &str = "OPENHUMAN_TINYMCP_TEST_MODULE";-fn fresh_workspace_config() -> (tempfile::TempDir, Config) {let tmp = tempfile::tempdir().expect("tempdir");- let artifact = std::env::var_os(MODULE_ARTIFACT_ENV)- .map(std::path::PathBuf::from)- .expect("set OPENHUMAN_TINYMCP_TEST_MODULE to the verified TinyMCP artifact");+ let artifact = openhuman_core::modules::local_artifact("tinymcp")+ .expect("build tinymcp with scripts/modules/build.mjs and set OPENHUMAN_MODULE_SOURCE_DIR");let artifact = artifact.canonicalize().expect("TinyMCP artifact path must exist");@@ -69,7 +67,7 @@ fn http_server(url: &str) -> Value {}#[tokio::test]-#[ignore = "requires verified TinyMCP artifact in OPENHUMAN_TINYMCP_TEST_MODULE"]+#[ignore = "requires a TinyMCP library: node scripts/modules/build.mjs tinymcp"]async fn module_tool_call_reports_unknown_tool_as_error() {let (_tmp, config) = fresh_workspace_config();let server_id = install_server(&config, "@openhuman-test/echo", stdio_server()).await;@@ -96,7 +94,7 @@ async fn module_tool_call_reports_unknown_tool_as_error() {}#[tokio::test]-#[ignore = "requires verified TinyMCP artifact in OPENHUMAN_TINYMCP_TEST_MODULE"]+#[ignore = "requires a TinyMCP library: node scripts/modules/build.mjs tinymcp"]async fn disabling_server_drops_its_live_module_connection() {let (_tmp, config) = fresh_workspace_config();let server_id = install_server(&config, "@openhuman-test/echo", stdio_server()).await;@@ -122,7 +120,7 @@ async fn disabling_server_drops_its_live_module_connection() {}#[tokio::test]-#[ignore = "requires verified TinyMCP artifact in OPENHUMAN_TINYMCP_TEST_MODULE"]+#[ignore = "requires a TinyMCP library: node scripts/modules/build.mjs tinymcp"]async fn disabled_server_accepts_environment_update_without_reconnecting() {use std::collections::HashMap;@@ -144,7 +142,7 @@ async fn disabled_server_accepts_environment_update_without_reconnecting() {}#[tokio::test]-#[ignore = "requires verified TinyMCP artifact in OPENHUMAN_TINYMCP_TEST_MODULE"]+#[ignore = "requires a TinyMCP library: node scripts/modules/build.mjs tinymcp"]async fn per_config_lookups_are_isolated_by_workspace() {use openhuman_core::mcp::registry::{connections, ops};@@ -172,7 +170,7 @@ async fn per_config_lookups_are_isolated_by_workspace() {}#[tokio::test]-#[ignore = "requires verified TinyMCP artifact in OPENHUMAN_TINYMCP_TEST_MODULE"]+#[ignore = "requires a TinyMCP library: node scripts/modules/build.mjs tinymcp"]async fn disabled_install_is_not_dialed_during_startup() {use openhuman_core::mcp::registry::{connections, ops};@@ -198,7 +196,7 @@ async fn disabled_install_is_not_dialed_during_startup() {}#[tokio::test]-#[ignore = "requires verified TinyMCP artifact in OPENHUMAN_TINYMCP_TEST_MODULE"]+#[ignore = "requires a TinyMCP library: node scripts/modules/build.mjs tinymcp"]async fn per_config_auth_failure_surfaces_401_reason_without_cross_workspace_leak() {use openhuman_core::mcp::registry::{connections, ops};use wiremock::matchers::any;diff --git a/tests/raw_coverage/worker_b_raw_coverage_e2e.rs b/tests/raw_coverage/worker_b_raw_coverage_e2e.rsindex c8da767705..9147f79840 100644--- a/tests/raw_coverage/worker_b_raw_coverage_e2e.rs+++ b/tests/raw_coverage/worker_b_raw_coverage_e2e.rs@@ -434,10 +434,11 @@ async fn inference_provider_success_paths_use_mock_models_and_chat() {#[tokio::test]async fn tools_web_answer_uses_managed_gemini_grounding_and_returns_citations() {- if std::env::var_os("TINYSEARCH_TEST_MODULE").is_none() {+ if openhuman_core::modules::local_artifact("tinysearch").is_none() {eprintln!(- "SKIPPED (not run, not asserted): TINYSEARCH_TEST_MODULE is not set. Build vendor/tinysearch \- and export TINYSEARCH_TEST_MODULE=<path to libtinysearch>, or use scripts/test-rust-with-mock.sh"+ "SKIPPED (not run, not asserted): no tinysearch library. Run \+ `node scripts/modules/build.mjs tinysearch` and set OPENHUMAN_MODULE_SOURCE_DIR, \+ or use scripts/test-rust-with-mock.sh");return;}@@ -513,10 +514,11 @@ async fn tools_web_answer_uses_managed_gemini_grounding_and_returns_citations()async fn tools_web_search_success_path_uses_backend_session_and_shapes_results() {// The search RPC runs through the TinySearch module; CI and// scripts/test-rust-with-mock.sh build it and export its path.- if std::env::var_os("TINYSEARCH_TEST_MODULE").is_none() {+ if openhuman_core::modules::local_artifact("tinysearch").is_none() {eprintln!(- "SKIPPED (not run, not asserted): TINYSEARCH_TEST_MODULE is not set. Build vendor/tinysearch \- and export TINYSEARCH_TEST_MODULE=<path to libtinysearch>, or use scripts/test-rust-with-mock.sh"+ "SKIPPED (not run, not asserted): no tinysearch library. Run \+ `node scripts/modules/build.mjs tinysearch` and set OPENHUMAN_MODULE_SOURCE_DIR, \+ or use scripts/test-rust-with-mock.sh");return;}diff --git a/tests/search_pinned_keys_e2e.rs b/tests/search_pinned_keys_e2e.rsindex 9b771a79ce..cae015ead0 100644--- a/tests/search_pinned_keys_e2e.rs+++ b/tests/search_pinned_keys_e2e.rs@@ -113,10 +113,11 @@ fn files_under(dir: &Path) -> Vec<std::path::PathBuf> {#[tokio::test(flavor = "multi_thread", worker_threads = 4)]async fn each_agent_searches_with_its_own_in_memory_key() {- if std::env::var_os("TINYSEARCH_TEST_MODULE").is_none() {+ if openhuman_core::modules::local_artifact("tinysearch").is_none() {eprintln!(- "SKIPPED (not run, not asserted): TINYSEARCH_TEST_MODULE is not set. Build vendor/tinysearch \- and export TINYSEARCH_TEST_MODULE=<path to libtinysearch>, or use scripts/test-rust-with-mock.sh"+ "SKIPPED (not run, not asserted): no tinysearch library. Run \+ `node scripts/modules/build.mjs tinysearch` and set OPENHUMAN_MODULE_SOURCE_DIR, \+ or use scripts/test-rust-with-mock.sh");return;}diff --git a/tests/tinysearch_module_e2e.rs b/tests/tinysearch_module_e2e.rsindex c561e5f22a..f344c31581 100644--- a/tests/tinysearch_module_e2e.rs+++ b/tests/tinysearch_module_e2e.rs@@ -4,7 +4,8 @@ use tinysearch_bus::{names, ExecuteToolRequest, ExecuteToolResponse, ListToolsRe#[tokio::test]async fn pinned_search_module_serves_host_contract_and_rejects_disabled_execution() {use tinybus::{broker::Broker, module::ModuleHost, transport::memory::MemoryBus};- let file = std::env::var_os("TINYSEARCH_TEST_MODULE").expect("released artifact path");+ let file = openhuman_core::modules::local_artifact("tinysearch")+ .expect("build tinysearch with scripts/modules/build.mjs and set OPENHUMAN_MODULE_SOURCE_DIR");let bus = MemoryBus::new();let broker = Broker::new();let broker_task = broker.spawn(bus.clone());