Skip to content

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

fix(core, desktop): replace event bus check and remove stale session guard

Steven Enamakeld5e0affee571
diff --git a/src/core/jsonrpc.rs b/src/core/jsonrpc.rs
index 2df27b67bb..32b55c68b3 100644
--- a/src/core/jsonrpc.rs
+++ b/src/core/jsonrpc.rs
@@ -1965,7 +1965,7 @@ fn group_first_time(group: crate::core::all::DomainGroup) -> bool {
group_first_time_when_bus_ready(
DONE.get_or_init(|| Mutex::new(HashSet::new())),
group,
- crate::core::event_bus::global().is_some(),
+ crate::core::bus::BUS.get().is_some(),
)
}
@@ -1995,7 +1995,7 @@ 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::event_bus::global().is_some(),
+ crate::core::bus::BUS.get().is_some(),
)
}
diff --git a/src/openhuman/desktop/app_state/ops_part_02.rs b/src/openhuman/desktop/app_state/ops_part_02.rs
index 7affa86624..e6ba68c237 100644
--- a/src/openhuman/desktop/app_state/ops_part_02.rs
+++ b/src/openhuman/desktop/app_state/ops_part_02.rs
@@ -62,12 +62,7 @@ async fn persist_revalidated_session_user(
token: &str,
base_metadata: BTreeMap<String, String>,
user: Value,
- generation: u64,
) -> Result<Box<Config>, String> {
- let _session_mutation_lock = CURRENT_USER_SESSION_MUTATION_LOCK.lock().await;
- if current_user_generation() != generation {
- return Err("pending session persistence became stale after sign-out".to_string());
- }
let user_id = user_id_from_profile_payload(&user)
.ok_or_else(|| "backend user id required before clearing pending validation".to_string())?;
let workspace_env_scoped = config_is_workspace_env_scoped(config);