Skip to content

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

test(embed): add diagnostics when telegram reply assertion fails

Steven Enamakelb837a69173aa
diff --git a/crates/openhuman-embed/tests/channel_agents.rs b/crates/openhuman-embed/tests/channel_agents.rs
index e774acb4a7..9d2495847a 100644
--- a/crates/openhuman-embed/tests/channel_agents.rs
+++ b/crates/openhuman-embed/tests/channel_agents.rs
@@ -232,6 +232,13 @@ fn a_telegram_message_is_answered_by_the_bound_runtime_agent() {
}
tokio::time::sleep(Duration::from_millis(250)).await;
}
+ if !sent.iter().any(|text| text.contains("teeny says hi")) {
+ eprintln!(
+ "Telegram diagnostics: sent={sent:?}; Bot API requests={:#?}; model requests={:#?}",
+ bot_api.received_requests().await.unwrap_or_default(),
+ chat_requests(&provider).await
+ );
+ }
assert!(
sent.iter().any(|text| text.contains("teeny says hi")),
"the agent's reply was posted to the chat: {sent:?}; Bot API requests: {:#?}; model requests: {:#?}",