Skip to content

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

test(agent): reach the new tests' memory through test_support, not the engine

Shanu2fdb60cdade4
diff --git a/src/openhuman/agent/harness/session/builder/builder_tests_part_01_tests.rs b/src/openhuman/agent/harness/session/builder/builder_tests_part_01_tests.rs
index eaf09b435c..31231e8249 100644
--- a/src/openhuman/agent/harness/session/builder/builder_tests_part_01_tests.rs
+++ b/src/openhuman/agent/harness/session/builder/builder_tests_part_01_tests.rs
@@ -638,7 +638,6 @@ async fn from_config_for_agent_synthesizes_custom_registry_entry_with_named_scop
/// only kept off the dispatch path by set ordering.
#[test]
fn from_config_keeps_build_time_delegation_tools_out_of_the_durable_registry() {
- crate::openhuman::memory::host_impls::install_for_tests();
crate::openhuman::agent::harness::AgentDefinitionRegistry::init_global_builtins().unwrap();
let tmp = tempfile::TempDir::new().unwrap();
let config = test_config(&tmp);
diff --git a/src/openhuman/agent/orchestration/tools/agent_prepare_context_tests.rs b/src/openhuman/agent/orchestration/tools/agent_prepare_context_tests.rs
index f628dfef37..b14af61cb2 100644
--- a/src/openhuman/agent/orchestration/tools/agent_prepare_context_tests.rs
+++ b/src/openhuman/agent/orchestration/tools/agent_prepare_context_tests.rs
@@ -342,17 +342,13 @@ fn parent_context_with_specs(
visible_tool_specs: Vec<crate::openhuman::tools::ToolSpec>,
) -> crate::openhuman::agent::harness::fork_context::ParentExecutionContext {
use std::sync::Arc;
- // The embedding seam fails loudly when unwired; `create_memory` reaches it.
- crate::openhuman::memory::host_impls::install_for_tests();
let workspace = tempfile::TempDir::new().expect("temp workspace");
let workspace_dir = workspace.path().to_path_buf();
std::mem::forget(workspace);
- let memory_cfg = crate::openhuman::config::MemoryConfig {
- backend: "none".into(),
- ..crate::openhuman::config::MemoryConfig::default()
- };
+ // The context needs *a* memory to be constructed with and never reads one
+ // back, which is exactly what `noop_memory` is for.
let memory: Arc<dyn crate::openhuman::memory::Memory> =
- Arc::from(tinymemory_core::store::create_memory(&memory_cfg, &workspace_dir).unwrap());
+ crate::openhuman::memory::test_support::noop_memory();
let model: Arc<dyn tinyinference::model::ChatModel<()>> =
Arc::new(tinyagents_harness::testkit::ScriptedModel::new(Vec::new()));
crate::openhuman::agent::harness::fork_context::ParentExecutionContext {