Skip to content

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

test(voice): cover voice fact lookup by runner request id

Steven Enamakelc2da8700a1ae
diff --git a/crates/openhuman-core/src/channels/host/voice_tests.rs b/crates/openhuman-core/src/channels/host/voice_tests.rs
index b3ba444dbc..dd65584879 100644
--- a/crates/openhuman-core/src/channels/host/voice_tests.rs
+++ b/crates/openhuman-core/src/channels/host/voice_tests.rs
@@ -56,6 +56,24 @@ fn mirror_policy_reports_inbound_voice_from_recorded_envelope() {
assert!(!text.inbound_has_voice);
}
+#[test]
+fn voice_facts_are_correlated_with_the_runner_request_id() {
+ let tenant = crate::core::runtime::Tenant::default();
+ let inbound = envelope("voice-conversation", "provider-message-id", true);
+ record_inbound_envelope(&inbound, &tenant);
+
+ let policy = resolve_policy(
+ &ChannelVoiceConfig::default(),
+ &scope("telegram", "voice-conversation", "telegram:provider-message-id:runner-uuid"),
+ &tenant,
+ );
+
+ assert!(
+ policy.inbound_has_voice,
+ "reply policy is queried with the runner request ID, not the provider message ID"
+ );
+}
+
#[test]
fn same_conversation_and_turn_ids_do_not_cross_voice_facts_between_accounts() {
let mut voice = envelope("shared-conversation", "shared-turn", true);