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
chore: files changed crates/openhuman-core/src/core/runtime/subscribers.rs,crates/openhuman-core/src
Steven Enamakel8a08f91a2f55
diff --git a/crates/openhuman-core/src/core/runtime/subscribers.rs b/crates/openhuman-core/src/core/runtime/subscribers.rsindex 2c11a32583..21eb2800f1 100644--- a/crates/openhuman-core/src/core/runtime/subscribers.rs+++ b/crates/openhuman-core/src/core/runtime/subscribers.rs@@ -96,36 +96,6 @@ fn group_first_time(group: crate::core::all::DomainGroup) -> bool {)}-/// Consume the learning-subscriber token only when the global event bus is-/// ready. Learning has a separate token from the Agent group because both-/// registration blocks must run exactly once.-fn learning_first_time_when_bus_ready(completed: &std::sync::Mutex<bool>, bus_ready: bool) -> bool {- if !bus_ready {- log::warn!(- "[event_bus] deferred Agent learning subscriber registration - bus not initialized"- );- return false;- }-- let mut completed = completed- .lock()- .expect("learning-subscriber registry lock poisoned");- if *completed {- false- } else {- *completed = true;- true- }-}--fn learning_first_time() -> bool {- static DONE: std::sync::OnceLock<std::sync::Mutex<bool>> = std::sync::OnceLock::new();- learning_first_time_when_bus_ready(- DONE.get_or_init(|| std::sync::Mutex::new(false)),- crate::core::bus::BUS.get().is_some(),- )-}-/// Registers all long-lived domain event-bus subscribers, each group at most/// once per process.///diff --git a/crates/openhuman-core/src/core/runtime/subscribers_tests.rs b/crates/openhuman-core/src/core/runtime/subscribers_tests.rsindex 3b1a5e608f..9e858b3319 100644--- a/crates/openhuman-core/src/core/runtime/subscribers_tests.rs+++ b/crates/openhuman-core/src/core/runtime/subscribers_tests.rs@@ -1,5 +1,5 @@use super::{- group_first_time_when_bus_ready, learning_first_time_when_bus_ready, DomainSubscriberPlan,+ group_first_time_when_bus_ready, DomainSubscriberPlan,};use crate::config::test_env::EnvVarGuard;@@ -142,31 +142,6 @@ fn domain_subscriber_registration_is_idempotent_after_success() {);}-#[test]-fn learning_subscriber_registration_retries_after_bus_becomes_ready() {- let completed = std::sync::Mutex::new(false);-- assert!(!learning_first_time_when_bus_ready(&completed, false));- assert!(- !*completed.lock().expect("registry lock"),- "a deferred learning attempt must not consume its token"- );-- assert!(learning_first_time_when_bus_ready(&completed, true));- assert!(- *completed.lock().expect("registry lock"),- "the ready retry must consume the learning token"- );-}--#[test]-fn learning_subscriber_registration_is_idempotent_after_success() {- let completed = std::sync::Mutex::new(false);-- assert!(learning_first_time_when_bus_ready(&completed, true));- assert!(!learning_first_time_when_bus_ready(&completed, true));-}-#[test]fn domain_subscriber_registration_readiness_helper_is_idempotent() {use crate::core::all::DomainGroup;