Skip to content

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

chore(web_chat): add debug logging to surface event publishing

Steven Enamakelaca2210026c9
diff --git a/crates/openhuman-core/src/web_chat/progress_tests.rs b/crates/openhuman-core/src/web_chat/progress_tests.rs
index d6117a094a..e079f1e966 100644
--- a/crates/openhuman-core/src/web_chat/progress_tests.rs
+++ b/crates/openhuman-core/src/web_chat/progress_tests.rs
@@ -175,7 +175,7 @@ async fn recv_for_thread(
loop {
match rx.recv().await {
Ok(ev) if ev.context().thread_id == thread_id => return ev,
- Ok(_) => continue,
+ Ok(ev) => eprintln!("receiver skipped {} thread={}", ev.event_name(), ev.context().thread_id),
Err(err) => panic!("web-channel bus closed before event: {err}"),
}
}
diff --git a/crates/openhuman-core/src/web_chat/surface.rs b/crates/openhuman-core/src/web_chat/surface.rs
index f1eef6d75d..06fb4f66cf 100644
--- a/crates/openhuman-core/src/web_chat/surface.rs
+++ b/crates/openhuman-core/src/web_chat/surface.rs
@@ -180,6 +180,7 @@ impl Surface {
*round = interim_round.filter(|round| *round > 0);
}
}
+ eprintln!("surface publish: {} thread={} projected={projected}", event.event_name(), event.context().thread_id);
publish_web_channel_event_in(&self.ctx, event);
}
@@ -234,6 +235,7 @@ impl Surface {
}
};
let terminal = projected.events.iter().any(is_terminal);
+ eprintln!("surface module returned {} events", projected.events.len());
for event in projected.events {
self.publish(event, interim_round, true);
}