Skip to content

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

style(web_chat): reformat event bus tests and drop stray blank line

Steven Enamakel8cde8bcc7b76
diff --git a/crates/openhuman-core/src/web_chat/event_bus.rs b/crates/openhuman-core/src/web_chat/event_bus.rs
index da9451346a..6004d6b3f1 100644
--- a/crates/openhuman-core/src/web_chat/event_bus.rs
+++ b/crates/openhuman-core/src/web_chat/event_bus.rs
@@ -36,7 +36,6 @@ pub fn publish_web_channel_event(mut event: WebChannelEvent) {
let _ = EVENT_BUS.send(event);
}
-
static APPROVAL_SURFACE_HANDLE: OnceLock<SubscriptionHandle> = OnceLock::new();
pub fn register_approval_surface_subscriber() {
diff --git a/crates/openhuman-core/src/web_chat/event_bus_tests.rs b/crates/openhuman-core/src/web_chat/event_bus_tests.rs
index 3f92e2a7bf..db165ab3fe 100644
--- a/crates/openhuman-core/src/web_chat/event_bus_tests.rs
+++ b/crates/openhuman-core/src/web_chat/event_bus_tests.rs
@@ -582,8 +582,12 @@ async fn published_events_carry_the_publishing_agent() {
let mut rx = subscribe_web_channel_events();
let marker = format!("agent-stamp-{}", uuid::Uuid::new_v4());
let ctx = CoreContext::for_test(DomainSet::full(), None).derive_with(
- ContextOverlay::new(crate::config::Config::default(), DomainSet::full(), Default::default())
- .session_agent("u-alice"),
+ ContextOverlay::new(
+ crate::config::Config::default(),
+ DomainSet::full(),
+ Default::default(),
+ )
+ .session_agent("u-alice"),
);
CoreContext::scope(ctx, async {
publish_web_channel_event(WebChannelEvent {
@@ -610,7 +614,10 @@ async fn published_events_carry_the_publishing_agent() {
assert!(scoped.belongs_to("u-alice"));
assert!(!scoped.belongs_to("u-bob"));
let unscoped = seen.iter().find(|e| e.thread_id != marker).unwrap();
- assert!(!unscoped.belongs_to("u-alice"), "unstamped events belong to no user");
+ assert!(
+ !unscoped.belongs_to("u-alice"),
+ "unstamped events belong to no user"
+ );
assert!(
!serde_json::to_string(scoped).unwrap().contains("u-alice"),
"the stamp is not serialized"