Skip to content

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

test(agent): split env lock and workspace guard in thread delete test

Steven Enamakel2dc1de61e569
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 20b345bdbf..2eb6c9f861 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
@@ -274,9 +274,8 @@ async fn thread_creation_cannot_enter_the_snapshot_to_purge_window() {
let scratch = tempfile::tempdir().expect("isolated purge race fixture");
let workspace = scratch.path().join("workspace");
std::fs::create_dir_all(&workspace).expect("create workspace");
- let _env = EnvVarGuard::locked_async()
- .await
- .workspace_unlocked(&workspace);
+ let _env_lock = EnvVarGuard::locked_async().await;
+ let _workspace_env = EnvVarGuard::workspace_unlocked(&workspace);
let ctx = crate::core::runtime::DispatchCtx::ambient();
let make_thread = |id: &str| CreateConversationThread {
id: id.into(),