Skip to content

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

test(orchestration): add tenant isolation tests for background completions and delivery

Steven Enamakelcf8af32d0c26
diff --git a/crates/openhuman-core/src/agent/orchestration/background_completions_tenant_tests.rs b/crates/openhuman-core/src/agent/orchestration/background_completions_tenant_tests.rs
index a845acc79f..3be4492269 100644
--- a/crates/openhuman-core/src/agent/orchestration/background_completions_tenant_tests.rs
+++ b/crates/openhuman-core/src/agent/orchestration/background_completions_tenant_tests.rs
@@ -25,7 +25,7 @@ async fn record(ctx: &Arc<CoreContext>, ws: &std::path::Path, task: &str) {
CoreContext::scope(
Arc::clone(ctx),
record_completion(
- &DispatchCtx::ambient(),
+ &DispatchCtx::new(Arc::clone(ctx)),
ws,
"sess-1",
task,
diff --git a/crates/openhuman-core/src/agent/orchestration/background_delivery_tenant_tests.rs b/crates/openhuman-core/src/agent/orchestration/background_delivery_tenant_tests.rs
index 1965094559..90dfe78db6 100644
--- a/crates/openhuman-core/src/agent/orchestration/background_delivery_tenant_tests.rs
+++ b/crates/openhuman-core/src/agent/orchestration/background_delivery_tenant_tests.rs
@@ -72,7 +72,7 @@ async fn an_off_task_completion_drains_only_its_owners_thread() {
CoreContext::scope(
Arc::clone(ctx),
record_completion(
- &DispatchCtx::ambient(),
+ &DispatchCtx::new(Arc::clone(ctx)),
ws.path(),
&session,
task.as_str(),