Skip to content

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

refactor(tests): remove unused remote session scope tests

Steven Enamakel160b196e6f73
diff --git a/crates/openhuman-core/src/channels/routes_tests.rs b/crates/openhuman-core/src/channels/routes_tests.rs
index 032907be02..0626696e17 100644
--- a/crates/openhuman-core/src/channels/routes_tests.rs
+++ b/crates/openhuman-core/src/channels/routes_tests.rs
@@ -90,22 +90,6 @@ pub(super) fn runtime_context(workspace_dir: PathBuf) -> ChannelRuntimeContext {
}
}
-pub(super) fn remote_session_scope() -> tinychannels_bus::module_remote::RemoteSessionScope {
- tinychannels_bus::module_remote::RemoteSessionScope {
- channel: tinychannels_bus::ChannelRef {
- id: "telegram".into(),
- account_id: Some("telegram:bot-a".into()),
- },
- conversation: tinychannels_bus::ConversationRef {
- kind: tinychannels_bus::ConversationKind::Group,
- id: "room-1".into(),
- topic_id: Some("topic-3".into()),
- ..Default::default()
- },
- session_key: "prepared-session".into(),
- }
-}
-
#[cfg(feature = "modules")]
async fn module_route_help_response(
workspace_dir: &Path,
@@ -418,65 +402,6 @@ async fn clear_history_command_uses_reset_callback_and_persists_route_override()
assert!(sent[0].content.contains("Model switched to `gpt-5-mini`"));
}
-#[cfg(feature = "modules")]
-#[tokio::test]
-async fn remote_clear_without_captured_scope_fails_closed() {
- let ctx = runtime_context(std::env::temp_dir().join("remote-clear-scope"));
- let dispatch = ctx.dispatch_ctx();
- let cancellation = tokio_util::sync::CancellationToken::new();
-
- let result = crate::channels::host::remote_control::dispatch_callback(
- &dispatch,
- &ctx,
- &crate::core::runtime::Tenant::default(),
- &cancellation,
- None,
- tinychannels_bus::module_remote::RemoteHostRequest::ClearHistory {
- session_scope: remote_session_scope(),
- },
- )
- .await;
-
- assert!(
- result.is_err(),
- "an unscoped reset must never report success"
- );
-}
-
-#[cfg(feature = "modules")]
-#[tokio::test]
-async fn remote_clear_rejects_an_unconfigured_captured_account() {
- let ctx = runtime_context(std::env::temp_dir().join("remote-clear-account"));
- let dispatch = ctx.dispatch_ctx();
- let cancellation = tokio_util::sync::CancellationToken::new();
- let scope = remote_session_scope();
- let reset_context = crate::channels::host::remote_control::RemoteResetContext {
- scope: scope.clone(),
- durable_session_key: "tenant:session:telegram:bot-a:group:room-1".into(),
- message: ChannelMessage {
- channel: "telegram:bot-a".into(),
- reply_target: "room-1".into(),
- content: "/new".into(),
- ..Default::default()
- },
- history_key: "legacy-history-key-is-not-used-as-identity".into(),
- };
-
- let result = crate::channels::host::remote_control::dispatch_callback(
- &dispatch,
- &ctx,
- &crate::core::runtime::Tenant::default(),
- &cancellation,
- Some(&reset_context),
- tinychannels_bus::module_remote::RemoteHostRequest::ClearHistory {
- session_scope: scope,
- },
- )
- .await;
-
- assert!(result.is_err(), "unknown provider account must fail closed");
-}
-
#[tokio::test]
async fn handle_runtime_command_telegram_status_replies_without_agent() {
let ctx = runtime_context(PathBuf::from("/tmp"));