Skip to content

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

fix(progress_bridge): handle missing progress sender gracefully

Steven Enamakelb2562a0d25bd
diff --git a/crates/openhuman-core/src/web_chat/progress_bridge.rs b/crates/openhuman-core/src/web_chat/progress_bridge.rs
index 49b6e644f7..0b7b76ca56 100644
--- a/crates/openhuman-core/src/web_chat/progress_bridge.rs
+++ b/crates/openhuman-core/src/web_chat/progress_bridge.rs
@@ -129,7 +129,11 @@ fn interim_narration_text(buffer: &str) -> Option<String> {
/// Current wall-clock time as Unix-epoch milliseconds, used to stamp tracing
/// spans (issue #3886). Saturates to `0` if the clock is before the epoch.
-fn unix_epoch_ms() -> u64 {
+///
+/// `pub(crate)` so `web_chat::event_bus` and `core::socketio` can stamp
+/// `WebChannelEvent.ts` with the same clock instead of keeping a second
+/// epoch-ms helper in step by hand.
+pub(crate) fn unix_epoch_ms() -> u64 {
std::time::SystemTime::now()
.duration_since(std::time::UNIX_EPOCH)
.map(|d| d.as_millis() as u64)