Skip to content

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

test(orchestration): attach workspace to detached child in cancel test

Steven Enamakeldef6ba15bc5e
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_profile_cancel_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_profile_cancel_tests.rs
index 5f9ee915ae..b0adf479ca 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_profile_cancel_tests.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_profile_cancel_tests.rs
@@ -110,7 +110,8 @@ async fn profile_scope_cannot_cancel_another_profiles_driver_child() {
detached_data.clone(),
)
.expect("detached child context")
- .with_cancellation(detached_data.cancellation.clone());
+ .with_cancellation(detached_data.cancellation.clone())
+ .with_workspace(tinytools::WorkspaceDescriptor::new(workspace.clone()));
let accepted = CoreContext::scope(
Arc::clone(&alice),
crate::agent::orchestration::tools::SpawnSubagentTool::new()
@@ -273,13 +274,6 @@ async fn profile_scope_cannot_cancel_another_profiles_driver_child() {
&owner_scope.parent_session,
owner_scope.parent_thread_id.as_deref(),
);
- let job_snapshot = alice_jobs
- .tasks()
- .snapshot(
- &tinyagents_tasks::TaskId::new(alice_job.id.as_str()),
- &job_owner,
- )
- .expect("Alice's detached task metadata");
let registered = alice_jobs
.list_for_parent_scope(
&job_owner,
@@ -296,11 +290,10 @@ async fn profile_scope_cannot_cancel_another_profiles_driver_child() {
.and_then(serde_json::Value::as_str)
== Some(task_id.as_str())
}),
- "Alice's owner/workspace/thread must list the driver task: session={:?}, cached workspace={:?}, thread={:?}, job metadata={:?}, job ids={:?}",
+ "Alice's owner/workspace/thread must list the driver task: session={:?}, cached workspace={:?}, thread={:?}, job ids={:?}",
owner_scope.parent_session,
owner_scope.workspace,
owner_scope.parent_thread_id,
- job_snapshot.metadata,
registered
.iter()
.map(|job| job.id.as_str())