Skip to content

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

test(thread-delete): assert parent closes when driver scope unresolved

Steven Enamakel81e5e34bccb4
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_thread_delete_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_thread_delete_tests.rs
index 1fb1188fcd..e431306c94 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_thread_delete_tests.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_thread_delete_tests.rs
@@ -267,7 +267,7 @@ async fn deleting_parent_thread_cancels_driver_child_before_discarding_completio
}
#[tokio::test]
-async fn thread_delete_keeps_completions_when_driver_task_scope_cannot_be_resolved() {
+async fn thread_delete_closes_parent_when_driver_task_scope_cannot_be_resolved() {
use crate::agent::orchestration::background_completions::{self, BackgroundAgentOutcome};
use crate::agent::tinyagents::host::OpenHumanRunContext;
use crate::core::runtime::{ContextOverlay, CoreContext, DomainSet};
@@ -355,10 +355,9 @@ async fn thread_delete_keeps_completions_when_driver_task_scope_cannot_be_resolv
assert!(result
.expect_err("an indexed task without its driver job must fail closed")
.contains("no live driver job or terminal durable session"));
- assert_eq!(
- background_completions::pending_for(&workspace, thread_id).len(),
- 1,
- "thread deletion retains queued completions when a selected child cannot be settled"
+ assert!(
+ background_completions::pending_for(&workspace, thread_id).is_empty(),
+ "failed child settlement still durably closes a deleted parent and withdraws its queue"
);
let terminal_legacy_row = serde_json::from_value(serde_json::json!({