Skip to content

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

test(web_chat): assert explicit null args on host-authored events

Steven Enamakel3cc65abb9966
diff --git a/crates/openhuman-core/src/web_chat/surface_tests.rs b/crates/openhuman-core/src/web_chat/surface_tests.rs
index 42e66e9877..af7ea9e462 100644
--- a/crates/openhuman-core/src/web_chat/surface_tests.rs
+++ b/crates/openhuman-core/src/web_chat/surface_tests.rs
@@ -132,7 +132,11 @@ async fn direct_and_projected_events_keep_their_historical_wire_normalization()
let direct_event = next_for(&mut rx, "surface-direct-null").await;
let direct_wire = wire(&direct_event);
assert_eq!(direct_wire["tool_name"], "");
- assert_eq!(direct_wire["args"], serde_json::Value::Null);
+ assert_eq!(
+ direct_wire.get("args"),
+ Some(&serde_json::Value::Null),
+ "host-authored events retain an explicit null args payload"
+ );
let projected = Surface::new(
&DispatchCtx::ambient(),