The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
chore(tests): remove obsolete inbound thread and client id tests
Steven Enamakel96ad431d9fd8
diff --git a/crates/openhuman-core/src/channels/bus_inbound_thread_id_tests_tests.rs b/crates/openhuman-core/src/channels/bus_inbound_thread_id_tests_tests.rsindex 2c5a288e2a..ec9e7f8e89 100644--- a/crates/openhuman-core/src/channels/bus_inbound_thread_id_tests_tests.rs+++ b/crates/openhuman-core/src/channels/bus_inbound_thread_id_tests_tests.rs@@ -1,6 +1,5 @@use super::delivery::channel_message_body_with_idempotency;use super::progressive_ui::channel_supports_progressive_ui;-use super::thread_id::{derive_inbound_client_id, derive_inbound_thread_id};use serde_json::json;#[test]@@ -48,111 +47,3 @@ fn channel_message_body_preserves_caller_idempotency_key() {assert_eq!(body["idempotencyKey"], "caller-key");}--#[test]-fn socket_inbound_client_id_keys_per_sender() {- // Distinct senders in the same shared channel must produce distinct- // client_id labels so downstream consumers that key on client_id- // (audit log, future session caches) stay segregated. The- // thread_id is already per-sender; this is the matching client_id- // half of the pair.- let alice = derive_inbound_client_id("discord", Some("alice"));- let bob = derive_inbound_client_id("discord", Some("bob"));- assert_ne!(alice, bob, "co-channel senders must not collapse");- assert!(alice.starts_with("inbound"));- assert!(bob.starts_with("inbound"));-}--#[test]-fn socket_inbound_client_id_legacy_fallback_keeps_bare_inbound() {- // Legacy publishers that don't fill `sender` keep the historical- // `"inbound"` literal so single-DM flows (where there's no- // co-channel surface) are unchanged.- assert_eq!(derive_inbound_client_id("discord", None), "inbound");- assert_eq!(derive_inbound_client_id("discord", Some("")), "inbound");- assert_eq!(derive_inbound_client_id("discord", Some(" ")), "inbound");-}--#[test]-fn socket_inbound_keys_per_sender_combined_with_thread_id() {- // Regression: in a shared Discord channel, two distinct senders- // sending into the same channel/reply_target produce a fully- // distinct (client_id, thread_id) pair. This is the surface the- // wallet preparer-binding and parked-approval routing both rely- // on for per-user isolation.- let alice_thread = derive_inbound_thread_id("discord", Some("alice"), Some("#general"), None);- let bob_thread = derive_inbound_thread_id("discord", Some("bob"), Some("#general"), None);- let alice_client = derive_inbound_client_id("discord", Some("alice"));- let bob_client = derive_inbound_client_id("discord", Some("bob"));-- assert_ne!(alice_thread, bob_thread);- assert_ne!(alice_client, bob_client);- assert_ne!(- (alice_client.as_str(), alice_thread.as_str()),- (bob_client.as_str(), bob_thread.as_str()),- );-}--#[test]-fn legacy_channel_only_keeps_old_shape() {- // Publishers that don't pass sender must still produce a stable- // key so existing single-DM flows are unchanged.- assert_eq!(- derive_inbound_thread_id("telegram", None, None, None),- "channel:telegram"- );-}--#[test]-fn distinct_senders_get_distinct_keys() {- let a = derive_inbound_thread_id("discord", Some("alice"), Some("#general"), None);- let b = derive_inbound_thread_id("discord", Some("bob"), Some("#general"), None);- assert_ne!(a, b, "two senders in same channel must not collapse");-}--#[test]-fn slack_thread_anchor_splits_subthreads() {- let parent = derive_inbound_thread_id("slack", Some("u1"), Some("C1"), None);- let thread = derive_inbound_thread_id("slack", Some("u1"), Some("C1"), Some("1700.001"));- assert_ne!(parent, thread);-}--#[test]-fn telegram_ignores_thread_ts() {- // Telegram uses thread_ts for transport routing only; memory key- // must stay stable across thread_ts updates inside the same DM.- let a = derive_inbound_thread_id("telegram", Some("u1"), Some("c1"), Some("100"));- let b = derive_inbound_thread_id("telegram", Some("u1"), Some("c1"), Some("200"));- assert_eq!(a, b);-}--#[test]-fn telegram_chat_id_shape_still_ignores_thread_ts() {- // Regression: in production the socket layer addresses Telegram- // with raw chat ids like `tg:123` and `telegram:123` (matching- // the `<provider>:message` event name shape). The thread_ts- // carve-out must recognise both, not only the literal slug.- for channel in ["tg:123", "telegram:123", "tg", "telegram"] {- let a = derive_inbound_thread_id(channel, Some("u1"), Some("c1"), Some("100"));- let b = derive_inbound_thread_id(channel, Some("u1"), Some("c1"), Some("200"));- assert_eq!(- a, b,- "channel '{channel}' should ignore thread_ts (telegram provider)"- );- }-}--#[test]-fn non_telegram_channel_id_shape_still_splits_on_thread_ts() {- // Inverse: a `slack:<workspace>` style channel must continue to- // honour thread_ts so Slack subthreads stay distinct.- let a = derive_inbound_thread_id("slack:T1", Some("u1"), Some("c1"), Some("100"));- let b = derive_inbound_thread_id("slack:T1", Some("u1"), Some("c1"), Some("200"));- assert_ne!(a, b);-}--#[test]-fn empty_optional_fields_are_skipped() {- let only_sender = derive_inbound_thread_id("discord", Some("alice"), Some(" "), None);- assert_eq!(only_sender, "channel:discord/alice");-}diff --git a/crates/openhuman-core/src/security/pairing_tests.rs b/crates/openhuman-core/src/security/pairing_tests.rsindex 9e8ab1515a..e544144c8b 100644--- a/crates/openhuman-core/src/security/pairing_tests.rs+++ b/crates/openhuman-core/src/security/pairing_tests.rs@@ -69,5 +69,3 @@ async fn public_bind_uses_nonempty_env_token_without_writing_file() {assert!(!tmp.join("core.token").exists());std::fs::remove_dir_all(&tmp).ok();}--// ── constant_time_eq ─────────────────────────────────────