Skip to content

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

test(session_host): fix host-only policy assertions

Steven Enamakel62e3aaeaf50e
diff --git a/crates/openhuman-core/src/agent/session_host/builder/builder_tests_host_only_tests.rs b/crates/openhuman-core/src/agent/session_host/builder/builder_tests_host_only_tests.rs
index 8275695291..fb5e1f4f90 100644
--- a/crates/openhuman-core/src/agent/session_host/builder/builder_tests_host_only_tests.rs
+++ b/crates/openhuman-core/src/agent/session_host/builder/builder_tests_host_only_tests.rs
@@ -232,13 +232,19 @@ async fn a_host_only_session_enforces_the_deny_by_default_gate() {
assert_eq!(agent.tool_policy.name(), "host_only");
assert_eq!(
- agent.tool_{ let (ctx, call) = request("read_file"); policy.check(&ctx, &call).await },
+ {
+ let (ctx, call) = request("read_file");
+ agent.tool_policy.check(&ctx, &call).await
+ },
PolicyDecision::Allow
);
for built_in in ["shell", "write_file", "spawn_subagent", "tool_search"] {
assert!(
matches!(
- agent.tool_{ let (ctx, call) = request(built_in); policy.check(&ctx, &call).await },
+ {
+ let (ctx, call) = request(built_in);
+ agent.tool_policy.check(&ctx, &call).await
+ },
PolicyDecision::Deny { .. }
),
"{built_in} must be refused by the session's gate"