Skip to content

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

test(security): add tenant approval gate tests

Steven Enamakel44ca4827e17a
diff --git a/crates/openhuman-core/src/security/approval/gate_tenant_tests.rs b/crates/openhuman-core/src/security/approval/gate_tenant_tests.rs
index e567fe23ab..d238561e30 100644
--- a/crates/openhuman-core/src/security/approval/gate_tenant_tests.rs
+++ b/crates/openhuman-core/src/security/approval/gate_tenant_tests.rs
@@ -82,12 +82,15 @@ async fn parked_for(gate: &ApprovalGate, tenant: &Tenant) -> String {
async fn two_profiles_default_agents_park_on_one_thread_id_apart() {
let (gate, _dir) = test_gate();
let gate = Arc::new(gate);
- let (alice, bob) = (profile_ctx("alice"), profile_ctx("bob"));
+ // Names no other suite uses: the process-wide lease-fence registry is keyed
+ // by profile, and a fence another test registered for "alice" would refuse
+ // this test's writes to that profile's scope.
+ let (alice, bob) = (profile_ctx("gate-alice"), profile_ctx("gate-bob"));
let alice_turn = park_as(&gate, Arc::clone(&alice));
let bob_turn = park_as(&gate, Arc::clone(&bob));
- let alice_request = parked_for(&gate, &tenant(Some("alice"), None)).await;
- let bob_request = parked_for(&gate, &tenant(Some("bob"), None)).await;
+ let alice_request = parked_for(&gate, &tenant(Some("gate-alice"), None)).await;
+ let bob_request = parked_for(&gate, &tenant(Some("gate-bob"), None)).await;
assert_ne!(alice_request, bob_request);
// Each profile's own lookup finds only its own request.