The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
test: add approval gate core flow, origin intercept, and triage tests
Steven Enamakel8f72ceef08ef
diff --git a/crates/openhuman-core/src/security/approval/gate_core_flow_tests.rs b/crates/openhuman-core/src/security/approval/gate_core_flow_tests.rsindex 69586f24ff..616ebe345b 100644--- a/crates/openhuman-core/src/security/approval/gate_core_flow_tests.rs+++ b/crates/openhuman-core/src/security/approval/gate_core_flow_tests.rs@@ -434,7 +434,7 @@ async fn auto_approve_all_allows_a_remote_triage_dispatch_without_an_audit_row()#[tokio::test]async fn timeout_returns_deny() {- let (gate, _dir, env) = expiry_gate();+ let (gate, _dir, env) = expiry_gate().await;let gate = Arc::new(gate);let g = gate.clone();let handle = tokio::spawn(async move {@@ -472,7 +472,7 @@ async fn timeout_returns_deny() {/// unapproved, mirroring `timeout_returns_deny` above.#[tokio::test]async fn cancel_flow_run_parks_for_approval_when_a_gate_is_present() {- let (gate, _dir, env) = expiry_gate();+ let (gate, _dir, env) = expiry_gate().await;let gate = Arc::new(gate);let g = gate.clone();let handle = tokio::spawn(async move {diff --git a/crates/openhuman-core/src/security/approval/gate_origin_intercept_tests.rs b/crates/openhuman-core/src/security/approval/gate_origin_intercept_tests.rsindex 5ab8344865..111969d389 100644--- a/crates/openhuman-core/src/security/approval/gate_origin_intercept_tests.rs+++ b/crates/openhuman-core/src/security/approval/gate_origin_intercept_tests.rs@@ -113,7 +113,7 @@ async fn intercept_with_external_channel_origin_persists_and_ttl_denies() {// Non-web channel inbound (Telegram / Discord / Slack / etc.):// persist an audit row but TTL-deny — there is no channel-routed// approval surface yet, and the input is remote-attacker text.- let (gate, _dir, env) = expiry_gate();+ let (gate, _dir, env) = expiry_gate().await;let gate = Arc::new(gate);let origin = AgentTurnOrigin::ExternalChannel {channel: "telegram".into(),@@ -363,7 +363,7 @@ async fn flow_tool_trust_auto_allows_before_parking() {//// The second half of this test *does* wait a park out, so it needs the// short window even though it never inspects the "timed out" reason.- let (gate, _dir, env) = expiry_gate();+ let (gate, _dir, env) = expiry_gate().await;let gate = Arc::new(gate);store::insert_flow_trust(&gate.config, "flow-trusted", "composio").unwrap();diff --git a/crates/openhuman-core/src/security/approval/gate_triage_tests.rs b/crates/openhuman-core/src/security/approval/gate_triage_tests.rsindex f7728e1f06..28c4999334 100644--- a/crates/openhuman-core/src/security/approval/gate_triage_tests.rs+++ b/crates/openhuman-core/src/security/approval/gate_triage_tests.rs@@ -175,7 +175,7 @@ async fn intercept_with_workflow_require_approval_persists_and_ttl_denies() {// trust root — same conservative park-and-audit shape as// `ExternalChannel`, since there is no flow// review surface to route the prompt to yet (B3).- let (gate, _dir, env) = expiry_gate();+ let (gate, _dir, env) = expiry_gate().await;let gate = Arc::new(gate);let origin = AgentTurnOrigin::TrustedAutomation {job_id: "flow-2".into(),@@ -338,7 +338,7 @@ async fn timeout_publishes_approval_decided_with_expired_resolution() {.expect("event bus initialized above").receiver();- let (gate, _dir, env) = expiry_gate();+ let (gate, _dir, env) = expiry_gate().await;let gate = Arc::new(gate);let g = gate.clone();let handle = tokio::spawn(async move {