Skip to content

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

fix: correct session state handling in channel route tests

Steven Enamakela1a5ee92008a
diff --git a/crates/openhuman-core/src/channels/routes_tests.rs b/crates/openhuman-core/src/channels/routes_tests.rs
index 001dcf1363..db8ad1cb11 100644
--- a/crates/openhuman-core/src/channels/routes_tests.rs
+++ b/crates/openhuman-core/src/channels/routes_tests.rs
@@ -3,7 +3,6 @@ use crate::channels::context::{ChannelRuntimeContext, RouteSelectionMap, TurnMod
use crate::channels::host::ChannelTurnStateSubscriber;
use crate::channels::traits::ChannelMessage;
use crate::core::events::DomainEvent;
-use crate::memory::{Memory, MemoryCategory, MemoryEntry};
use async_trait::async_trait;
use std::collections::HashMap;
use std::path::PathBuf;
@@ -12,64 +11,6 @@ use tinyagents_session::transcript::TranscriptMessage;
use tinybus::EventHandler;
use tinytools::{Tool, ToolResult};
-struct DummyMemory;
-
-#[async_trait]
-impl Memory for DummyMemory {
- fn name(&self) -> &str {
- "dummy"
- }
-
- async fn store(
- &self,
- _namespace: &str,
- _key: &str,
- _content: &str,
- _category: MemoryCategory,
- _session_id: Option<&str>,
- ) -> anyhow::Result<()> {
- Ok(())
- }
-
- async fn recall(
- &self,
- _query: &str,
- _limit: usize,
- _opts: crate::memory::RecallOpts<'_>,
- ) -> anyhow::Result<Vec<MemoryEntry>> {
- Ok(Vec::new())
- }
-
- async fn get(&self, _namespace: &str, _key: &str) -> anyhow::Result<Option<MemoryEntry>> {
- Ok(None)
- }
-
- async fn list(
- &self,
- _namespace: Option<&str>,
- _category: Option<&MemoryCategory>,
- _session_id: Option<&str>,
- ) -> anyhow::Result<Vec<MemoryEntry>> {
- Ok(Vec::new())
- }
-
- async fn forget(&self, _namespace: &str, _key: &str) -> anyhow::Result<bool> {
- Ok(false)
- }
-
- async fn namespace_summaries(&self) -> anyhow::Result<Vec<crate::memory::NamespaceSummary>> {
- Ok(Vec::new())
- }
-
- async fn count(&self) -> anyhow::Result<usize> {
- Ok(0)
- }
-
- async fn health_check(&self) -> bool {
- true
- }
-}
-
struct DummyTool;
#[async_trait]
diff --git a/crates/openhuman-core/src/channels/runtime/session_tests.rs b/crates/openhuman-core/src/channels/runtime/session_tests.rs
index fe3fa7439b..5cbe884b4d 100644
--- a/crates/openhuman-core/src/channels/runtime/session_tests.rs
+++ b/crates/openhuman-core/src/channels/runtime/session_tests.rs
@@ -86,12 +86,6 @@ async fn clear_session_invalidates_old_channels_and_opens_a_fresh_generation() {
config_path: tmp.path().join("config.toml"),
..Default::default()
};
- crate::memory::binding::install_diagnostics_for_test(
- &config.workspace_dir,
- &config.subsystems.memory,
- Default::default(),
- Default::default(),
- );
let _signed_out = crate::cron::scheduler_gate::SignedOutTestGuard::set(false);
let old_session = channel_session();
crate::security::credentials::ops::clear_session(&config)
diff --git a/crates/openhuman-core/src/channels/tests/discord_integration.rs b/crates/openhuman-core/src/channels/tests/discord_integration.rs
index caa10bd639..5cf440a3ed 100644
--- a/crates/openhuman-core/src/channels/tests/discord_integration.rs
+++ b/crates/openhuman-core/src/channels/tests/discord_integration.rs
@@ -3,9 +3,9 @@
//!
//! "Fully encapsulated" here means: the runtime dispatch pipeline can be
//! exercised end-to-end for `channel = "discord"` with every cross-module
-//! boundary (agent runtime, memory backend, LLM provider) substituted with a
-//! stub/noop. These tests do NOT spin up a real Discord gateway, a real LLM
-//! provider, or a real memory store — they only exercise the channels module
+//! boundary (agent runtime, LLM provider) substituted with a stub/noop. These
+//! tests do NOT spin up a real Discord gateway or a real LLM provider — they
+//! only exercise the channels module
//! itself.
//!
//! Coverage:
@@ -131,7 +131,7 @@ fn make_discord_ctx(
// ── 1. Full-pipeline smoke test ─────────────────────────────────────────────
/// A Discord inbound message must flow through the full runtime dispatch
-/// pipeline — memory lookup, history update, `agent.run_turn` bus call,
+/// pipeline — history update, `agent.run_turn` bus call,
/// channel send — without requiring any external services. The response text
/// from the stubbed provider must reach the channel's `send()` with the
/// recipient matching `reply_target`.