Skip to content

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

chore: files changed src/openhuman/agent/harness/session/builder/builder_tests.rs

Steven Enamakel16681380a98d
diff --git a/src/openhuman/agent/harness/session/builder/builder_tests.rs b/src/openhuman/agent/harness/session/builder/builder_tests.rs
index a568e6c0c7..4d75765f86 100644
--- a/src/openhuman/agent/harness/session/builder/builder_tests.rs
+++ b/src/openhuman/agent/harness/session/builder/builder_tests.rs
@@ -803,6 +803,11 @@ async fn an_empty_named_scope_advertises_no_tools_at_all() {
// `summarizer` is a shipped definition with `named = []`. Using the real
// one rather than a fixture is deliberate: the bug was in how a real
// declaration was read, and a fixture could drift away from it.
+ // Tolerant of an already-initialised singleton: this binary shares one
+ // `OnceLock` across every test, so whether we are first is a property of
+ // test ordering, not of this test.
+ let _ = crate::openhuman::agent::harness::definition::AgentDefinitionRegistry::init_global_builtins();
+
let tmp = tempfile::TempDir::new().unwrap();
let config = test_config(&tmp);
let agent = Agent::from_config_for_agent(&config, "summarizer")
@@ -832,6 +837,11 @@ async fn a_zero_tool_agent_does_not_gain_the_compaction_recovery_tool() {
use crate::openhuman::agent::harness::session::types::Agent;
use crate::openhuman::inference::tokenjuice::RETRIEVE_TOOL_NAME;
+ // Tolerant of an already-initialised singleton: this binary shares one
+ // `OnceLock` across every test, so whether we are first is a property of
+ // test ordering, not of this test.
+ let _ = crate::openhuman::agent::harness::definition::AgentDefinitionRegistry::init_global_builtins();
+
let tmp = tempfile::TempDir::new().unwrap();
let config = test_config(&tmp);
let agent = Agent::from_config_for_agent(&config, "trigger_triage")