Skip to content

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

test(session_host): add juice runtime session tests

Steven Enamakel5937472fc8e9
diff --git a/crates/openhuman-core/src/agent/session_host/runtime_session_juice_tests.rs b/crates/openhuman-core/src/agent/session_host/runtime_session_juice_tests.rs
index ed6cc23a0b..6f25d7a17e 100644
--- a/crates/openhuman-core/src/agent/session_host/runtime_session_juice_tests.rs
+++ b/crates/openhuman-core/src/agent/session_host/runtime_session_juice_tests.rs
@@ -127,11 +127,13 @@ async fn a_resumed_thread_keeps_recorded_juice_specs_and_executors_when_repl_is_
);
}
let unavailable = {
- let surface = prelude.tool_surface.lock().expect("tool surface");
- let tool = surface
- .tools
+ let (tools, synthesized_tools) = {
+ let surface = prelude.tool_surface.lock().expect("tool surface");
+ (Arc::clone(&surface.tools), Arc::clone(&surface.synthesized_tools))
+ };
+ let tool = tools
.iter()
- .chain(surface.synthesized_tools.iter())
+ .chain(synthesized_tools.iter())
.find(|tool| tool.name() == "juice_find")
.expect("recorded executor remains registered");
tool.execute(serde_json::json!({"handle":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}))