Skip to content

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

test(orchestration): assert driver scope query sees owner-indexed job

Steven Enamakelbcc9d4cf2a3d
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_driver_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_driver_tests.rs
index 35b65b769d..4bf1f6d3ff 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_driver_tests.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_driver_tests.rs
@@ -462,6 +462,23 @@ async fn deleting_parent_thread_cancels_driver_child_before_discarding_completio
1,
"owner index selects the job in its exact profile/workspace/thread scope"
);
+ let scoped_jobs = jobs
+ .list_for_parent_scope(
+ &crate::agent::tinyagents::tool_registration::subagent_owner_key(
+ &owner.workspace_dir,
+ &owner.parent_session,
+ owner.parent_thread_id.as_deref(),
+ ),
+ &tinyagents_orchestration::subagent::ParentJobScope::new(
+ owner.workspace.clone(),
+ thread_id,
+ ),
+ )
+ .expect("list exact parent scope");
+ assert!(
+ scoped_jobs.iter().any(|scoped| scoped.id == job.id),
+ "the driver's own scope query sees the job selected by the owner index"
+ );
background_completions::record_outcome(
&dispatch,
&workspace,