Skip to content

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

chore: files changed crates/openhuman-core/src/modules/runtime.rs,crates/openhuman-core/src/modules/

Steven Enamakel376cf8c3a515
diff --git a/crates/openhuman-core/src/modules/runtime.rs b/crates/openhuman-core/src/modules/runtime.rs
index a256e49453..1ef53c0771 100644
--- a/crates/openhuman-core/src/modules/runtime.rs
+++ b/crates/openhuman-core/src/modules/runtime.rs
@@ -117,11 +117,15 @@ pub fn is_started() -> bool {
/// module runtime. This is a read-only snapshot; it never starts the runtime.
#[must_use]
pub fn is_module_serving(id: &str) -> bool {
+ let Some(record) = crate::modules::registry::find(id) else {
+ return false;
+ };
let Some(Ok(runtime)) = RUNTIME.get() else {
return false;
};
runtime.host().list().into_iter().any(|module| {
- module.name == id
+ module.manifest.bus_name.as_str() == record.bus_name
+ && module.manifest.object_path.as_str() == record.object_path
&& module.enabled
&& matches!(
module.state,
diff --git a/crates/openhuman-core/src/modules/runtime_tests.rs b/crates/openhuman-core/src/modules/runtime_tests.rs
index e7681b075b..ae1f3e294b 100644
--- a/crates/openhuman-core/src/modules/runtime_tests.rs
+++ b/crates/openhuman-core/src/modules/runtime_tests.rs
@@ -27,6 +27,36 @@ async fn the_module_bus_is_a_singleton_and_serves_proxies() {
assert!(first.proxy("not a bus name", "/nope").is_err());
}
+#[cfg(feature = "flows")]
+#[tokio::test]
+async fn registry_id_matches_the_live_modules_bus_address_not_package_name() {
+ let config = crate::config::Config::default();
+ crate::modules::tinyflows::copilot_proxy(&config)
+ .await
+ .expect("linked TinyFlows module should be admitted and serving");
+
+ let record = crate::modules::registry::find(crate::modules::tinyflows::MODULE_ID)
+ .expect("TinyFlows registry record");
+ let runtime = runtime().await.expect("module runtime is already serving");
+ let loaded = runtime
+ .host()
+ .list()
+ .into_iter()
+ .find(|module| {
+ module.manifest.bus_name.as_str() == record.bus_name
+ && module.manifest.object_path.as_str() == record.object_path
+ })
+ .expect("the registry bus address identifies the loaded module");
+
+ assert_eq!(record.id, "tinyflows");
+ assert_eq!(loaded.name, "tinyflows-module");
+ assert_ne!(loaded.name, record.id);
+ assert!(
+ is_module_serving(record.id),
+ "the registry id must report the enabled, live module despite its package name"
+ );
+}
+
#[cfg(feature = "web3")]
#[tokio::test]
async fn wallet_host_callback_is_served_before_the_module_is_loaded() {
diff --git a/tests/tinyflows_published_prompt_e2e.rs b/tests/tinyflows_published_prompt_e2e.rs
index f129b12ada..985b29bc9b 100644
--- a/tests/tinyflows_published_prompt_e2e.rs
+++ b/tests/tinyflows_published_prompt_e2e.rs
@@ -68,6 +68,9 @@ async fn published_module_prompts_render_through_the_normal_host_path() {
.await
.expect("load the same scoped Config used by the prompt dump");
let ctx = openhuman_core::core::runtime::DispatchCtx::host_default();
+ assert!(openhuman_core::modules::runtime::is_module_serving(
+ "tinyflows"
+ ));
let discovered = openhuman_core::skills::load_workflow_metadata_for(&ctx, &config);
let flow = discovered
.iter()