Skip to content

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

fix(tests): remove duplicated `tokio::sync::` in static env lock declarations

Steven Enamakel63b577a1bf49
diff --git a/tests/json_rpc_e2e.rs b/tests/json_rpc_e2e.rs
index bf77548325..22b972ca6d 100644
--- a/tests/json_rpc_e2e.rs
+++ b/tests/json_rpc_e2e.rs
@@ -53,7 +53,7 @@ fn json_rpc_e2e_env_lock() -> tokio::sync::MutexGuard<'static, ()> {
std::env::set_var("OPENHUMAN_KEYRING_BACKEND", "file");
});
let mutex = JSON_RPC_E2E_ENV_LOCK.get_or_init(|| tokio::sync::Mutex::new(()));
- // Recover from poison so that a panic in one test does not cascade to all others.
+ // A tokio mutex is never poisoned, so a panic in one test cannot cascade to the others.
mutex.blocking_lock()
}
@@ -62,7 +62,7 @@ async fn json_rpc_e2e_env_lock_async() -> tokio::sync::MutexGuard<'static, ()> {
std::env::set_var("OPENHUMAN_KEYRING_BACKEND", "file");
});
let mutex = JSON_RPC_E2E_ENV_LOCK.get_or_init(|| tokio::sync::Mutex::new(()));
- // Recover from poison so that a panic in one test does not cascade to all others.
+ // A tokio mutex is never poisoned, so a panic in one test cannot cascade to the others.
mutex.lock().await
}
diff --git a/tests/raw_coverage/agent_orchestration_e2e.rs b/tests/raw_coverage/agent_orchestration_e2e.rs
index 9bc29fbc37..dddcd43e1e 100644
--- a/tests/raw_coverage/agent_orchestration_e2e.rs
+++ b/tests/raw_coverage/agent_orchestration_e2e.rs
@@ -43,7 +43,7 @@ static MEMORY_SEAMS_INIT: OnceLock<()> = OnceLock::new();
/// The crate-wide env lock, not a private one. Every aggregated suite in
/// `raw_coverage_all` shares one process, so libtest runs them concurrently
/// and a lock local to this file would isolate nothing.
-static ENV_LOCK: &OnceLock<tokio::sync:: tokio::sync::Mutex<()>> = &crate::SHARED_ENV_LOCK;
+static ENV_LOCK: &OnceLock<tokio::sync::Mutex<()>> = &crate::SHARED_ENV_LOCK;
fn env_lock() -> tokio::sync::MutexGuard<'static, ()> {
ENV_LOCK
diff --git a/tests/raw_coverage/automation_scheduling_e2e.rs b/tests/raw_coverage/automation_scheduling_e2e.rs
index 4f48ded935..39291946a8 100644
--- a/tests/raw_coverage/automation_scheduling_e2e.rs
+++ b/tests/raw_coverage/automation_scheduling_e2e.rs
@@ -37,7 +37,7 @@ static AUTH_INIT: OnceLock<()> = OnceLock::new();
/// The crate-wide env lock, not a private one. Every aggregated suite in
/// `raw_coverage_all` shares one process, so libtest runs them concurrently
/// and a lock local to this file would isolate nothing.
-static ENV_LOCK: &OnceLock<tokio::sync:: tokio::sync::Mutex<()>> = &crate::SHARED_ENV_LOCK;
+static ENV_LOCK: &OnceLock<tokio::sync::Mutex<()>> = &crate::SHARED_ENV_LOCK;
fn env_lock() -> tokio::sync::MutexGuard<'static, ()> {
ENV_LOCK
diff --git a/tests/raw_coverage/composio_raw_coverage_e2e.rs b/tests/raw_coverage/composio_raw_coverage_e2e.rs
index 6553a653e9..c6889912f7 100644
--- a/tests/raw_coverage/composio_raw_coverage_e2e.rs
+++ b/tests/raw_coverage/composio_raw_coverage_e2e.rs
@@ -21,7 +21,7 @@ use openhuman_core::integrations::composio::{
use tinytools::Tool;
-static ENV_LOCK: &OnceLock<tokio::sync:: tokio::sync::Mutex<()>> = &crate::SHARED_ENV_LOCK;
+static ENV_LOCK: &OnceLock<tokio::sync::Mutex<()>> = &crate::SHARED_ENV_LOCK;
#[tokio::test]
async fn composio_connected_integrations_public_helpers_handle_empty_auth_and_identity_edges() {
diff --git a/tests/raw_coverage/connectivity_raw_coverage_e2e.rs b/tests/raw_coverage/connectivity_raw_coverage_e2e.rs
index 3be5a12542..f54304011f 100644
--- a/tests/raw_coverage/connectivity_raw_coverage_e2e.rs
+++ b/tests/raw_coverage/connectivity_raw_coverage_e2e.rs
@@ -22,7 +22,7 @@ use openhuman_rpc::server::build_core_http_router;
const TEST_RPC_TOKEN: &str = "connectivity-raw-coverage-e2e-token";
static AUTH_INIT: OnceLock<()> = OnceLock::new();
-static ENV_LOCK: &OnceLock<tokio::sync:: tokio::sync::Mutex<()>> = &crate::SHARED_ENV_LOCK;
+static ENV_LOCK: &OnceLock<tokio::sync::Mutex<()>> = &crate::SHARED_ENV_LOCK;
struct TestHarness {
_tmp: TempDir,
diff --git a/tests/raw_coverage/flows_lifecycle_e2e.rs b/tests/raw_coverage/flows_lifecycle_e2e.rs
index 3343d61fde..6099bca2ff 100644
--- a/tests/raw_coverage/flows_lifecycle_e2e.rs
+++ b/tests/raw_coverage/flows_lifecycle_e2e.rs
@@ -44,7 +44,7 @@ static AUTH_INIT: OnceLock<()> = OnceLock::new();
/// The crate-wide env lock, not a private one. Every aggregated suite in
/// `raw_coverage_all` shares one process, so libtest runs them concurrently
/// and a lock local to this file would isolate nothing.
-static ENV_LOCK: &OnceLock<tokio::sync:: tokio::sync::Mutex<()>> = &crate::SHARED_ENV_LOCK;
+static ENV_LOCK: &OnceLock<tokio::sync::Mutex<()>> = &crate::SHARED_ENV_LOCK;
/// Serializes every case in this binary: `HOME` and the backend-URL overrides
/// are process-global, so two cases running in parallel would resolve each
diff --git a/tests/raw_coverage/inference_local_controllers_rpc_raw_coverage_e2e.rs b/tests/raw_coverage/inference_local_controllers_rpc_raw_coverage_e2e.rs
index 057864ccad..62b0ea1cbf 100644
--- a/tests/raw_coverage/inference_local_controllers_rpc_raw_coverage_e2e.rs
+++ b/tests/raw_coverage/inference_local_controllers_rpc_raw_coverage_e2e.rs
@@ -55,7 +55,7 @@ use openhuman_core::inference::host_runtime::all_local_inference_registered_cont
use serde_json::{json, Value};
use tempfile::{tempdir, TempDir};
-static ENV_LOCK: &OnceLock<tokio::sync:: tokio::sync::Mutex<()>> = &crate::SHARED_ENV_LOCK;
+static ENV_LOCK: &OnceLock<tokio::sync::Mutex<()>> = &crate::SHARED_ENV_LOCK;
fn env_lock() -> tokio::sync::MutexGuard<'static, ()> {
ENV_LOCK
diff --git a/tests/raw_coverage/inference_provider_admin_round22_raw_coverage_e2e.rs b/tests/raw_coverage/inference_provider_admin_round22_raw_coverage_e2e.rs
index 878a235643..e67444bdea 100644
--- a/tests/raw_coverage/inference_provider_admin_round22_raw_coverage_e2e.rs
+++ b/tests/raw_coverage/inference_provider_admin_round22_raw_coverage_e2e.rs
@@ -54,7 +54,7 @@ struct SeenRequest {
/// as a flaky failure under `cargo llvm-cov` (the coverage job does not pass
/// `--test-threads=1`). Every test takes this guard up front so the suite is
/// effectively serialized regardless of the runner's thread count.
-static ENV_LOCK: &OnceLock<tokio::sync:: tokio::sync::Mutex<()>> = &crate::SHARED_ENV_LOCK;
+static ENV_LOCK: &OnceLock<tokio::sync::Mutex<()>> = &crate::SHARED_ENV_LOCK;
fn env_lock() -> tokio::sync::MutexGuard<'static, ()> {
ENV_LOCK
diff --git a/tests/raw_coverage/inference_provider_auth_e2e.rs b/tests/raw_coverage/inference_provider_auth_e2e.rs
index fddd174302..560411522d 100644
--- a/tests/raw_coverage/inference_provider_auth_e2e.rs
+++ b/tests/raw_coverage/inference_provider_auth_e2e.rs
@@ -49,7 +49,7 @@ static AUTH_INIT: OnceLock<()> = OnceLock::new();
/// Crate-wide, not file-local: all aggregated suites share one process, so a
/// private mutex would not mutually exclude with anyone else's env mutation.
-static ENV_LOCK: &OnceLock<tokio::sync:: tokio::sync::Mutex<()>> = &crate::SHARED_ENV_LOCK;
+static ENV_LOCK: &OnceLock<tokio::sync::Mutex<()>> = &crate::SHARED_ENV_LOCK;
fn env_lock() -> tokio::sync::MutexGuard<'static, ()> {
ENV_LOCK
diff --git a/tests/raw_coverage/inference_voice_http_round23_raw_coverage_e2e.rs b/tests/raw_coverage/inference_voice_http_round23_raw_coverage_e2e.rs
index 0f356aa796..9958a206cc 100644
--- a/tests/raw_coverage/inference_voice_http_round23_raw_coverage_e2e.rs
+++ b/tests/raw_coverage/inference_voice_http_round23_raw_coverage_e2e.rs
@@ -43,7 +43,7 @@ struct MockState {
/// by default. These tests mutate `OPENHUMAN_WORKSPACE`, `OPENHUMAN_OLLAMA_BASE_URL`,
/// and binary path env vars, so every test takes this guard before reading or
/// writing config that may be influenced by process env.
-static ENV_LOCK: &OnceLock<tokio::sync:: tokio::sync::Mutex<()>> = &crate::SHARED_ENV_LOCK;
+static ENV_LOCK: &OnceLock<tokio::sync::Mutex<()>> = &crate::SHARED_ENV_LOCK;
fn env_lock() -> tokio::sync::MutexGuard<'static, ()> {
ENV_LOCK
diff --git a/tests/raw_coverage/learning_facets_e2e.rs b/tests/raw_coverage/learning_facets_e2e.rs
index 4df5a4ad6a..f3321c3c66 100644
--- a/tests/raw_coverage/learning_facets_e2e.rs
+++ b/tests/raw_coverage/learning_facets_e2e.rs
@@ -60,7 +60,7 @@ static AUTH_INIT: OnceLock<()> = OnceLock::new();
static MEMORY_SEAMS_INIT: OnceLock<()> = OnceLock::new();
/// The crate-wide env lock — see the module docs.
-static ENV_LOCK: &OnceLock<tokio::sync:: tokio::sync::Mutex<()>> = &crate::SHARED_ENV_LOCK;
+static ENV_LOCK: &OnceLock<tokio::sync::Mutex<()>> = &crate::SHARED_ENV_LOCK;
fn env_lock() -> tokio::sync::MutexGuard<'static, ()> {
ENV_LOCK
diff --git a/tests/raw_coverage/memory_sync_round23_raw_coverage_e2e.rs b/tests/raw_coverage/memory_sync_round23_raw_coverage_e2e.rs
index 4d56d6834e..f567af3e13 100644
--- a/tests/raw_coverage/memory_sync_round23_raw_coverage_e2e.rs
+++ b/tests/raw_coverage/memory_sync_round23_raw_coverage_e2e.rs
@@ -62,7 +62,7 @@ use openhuman_core::security::credentials::{
AuthService, APP_SESSION_PROVIDER, DEFAULT_AUTH_PROFILE_NAME,
};
-static ENV_LOCK: &OnceLock<tokio::sync:: tokio::sync::Mutex<()>> = &crate::SHARED_ENV_LOCK;
+static ENV_LOCK: &OnceLock<tokio::sync::Mutex<()>> = &crate::SHARED_ENV_LOCK;
static MEMORY_SEAMS_INIT: OnceLock<()> = OnceLock::new();
fn ensure_memory_seams() {
diff --git a/tests/raw_coverage/notification_platform_e2e.rs b/tests/raw_coverage/notification_platform_e2e.rs
index d70fe0e5fd..7f058fbe47 100644
--- a/tests/raw_coverage/notification_platform_e2e.rs
+++ b/tests/raw_coverage/notification_platform_e2e.rs
@@ -40,7 +40,7 @@ use openhuman_rpc::server::build_core_http_router;
// ── env serialisation ────────────────────────────────────────────────────────
-static ENV_LOCK: &OnceLock<tokio::sync:: tokio::sync::Mutex<()>> = &crate::SHARED_ENV_LOCK;
+static ENV_LOCK: &OnceLock<tokio::sync::Mutex<()>> = &crate::SHARED_ENV_LOCK;
fn platform_e2e_env_lock() -> tokio::sync::MutexGuard<'static, ()> {
ENV_LOCK
diff --git a/tests/raw_coverage/session_store_e2e.rs b/tests/raw_coverage/session_store_e2e.rs
index a042ca72b3..db55f4a1d6 100644
--- a/tests/raw_coverage/session_store_e2e.rs
+++ b/tests/raw_coverage/session_store_e2e.rs
@@ -52,7 +52,7 @@ static AUTH_INIT: OnceLock<()> = OnceLock::new();
/// nothing: every `tests/raw_coverage/` suite is a module in the one
/// `raw_coverage_all` binary, so libtest runs them concurrently in one process
/// and only the shared mutex actually excludes another suite's `set_var`.
-static ENV_LOCK: &OnceLock<tokio::sync:: tokio::sync::Mutex<()>> = &crate::SHARED_ENV_LOCK;
+static ENV_LOCK: &OnceLock<tokio::sync::Mutex<()>> = &crate::SHARED_ENV_LOCK;
// ── Env isolation ─────────────────────────────────────────────────────────
diff --git a/tests/raw_coverage/tool_registry_approval_raw_coverage_e2e.rs b/tests/raw_coverage/tool_registry_approval_raw_coverage_e2e.rs
index 3548e3384d..37811bc2ee 100644
--- a/tests/raw_coverage/tool_registry_approval_raw_coverage_e2e.rs
+++ b/tests/raw_coverage/tool_registry_approval_raw_coverage_e2e.rs
@@ -35,7 +35,7 @@ use openhuman_rpc::server::build_core_http_router;
const TEST_RPC_TOKEN: &str = "tool-registry-approval-raw-e2e-token";
static AUTH_INIT: OnceLock<()> = OnceLock::new();
-static ENV_LOCK: &OnceLock<tokio::sync:: tokio::sync::Mutex<()>> = &crate::SHARED_ENV_LOCK;
+static ENV_LOCK: &OnceLock<tokio::sync::Mutex<()>> = &crate::SHARED_ENV_LOCK;
struct TestHarness {
_tmp: TempDir,
diff --git a/tests/raw_coverage/tools_composio_large_round25_raw_coverage_e2e.rs b/tests/raw_coverage/tools_composio_large_round25_raw_coverage_e2e.rs
index 5c696cd877..b5dd63e62a 100644
--- a/tests/raw_coverage/tools_composio_large_round25_raw_coverage_e2e.rs
+++ b/tests/raw_coverage/tools_composio_large_round25_raw_coverage_e2e.rs
@@ -27,7 +27,7 @@ use openhuman_core::integrations::composio::{
use openhuman_core::tools::ComposioListToolsTool;
use tinytools::{Tool, ToolCallOptions};
-static ENV_LOCK: &OnceLock<tokio::sync:: tokio::sync::Mutex<()>> = &crate::SHARED_ENV_LOCK;
+static ENV_LOCK: &OnceLock<tokio::sync::Mutex<()>> = &crate::SHARED_ENV_LOCK;
#[derive(Clone, Debug)]
struct RecordedRequest {
diff --git a/tests/raw_coverage/tools_composio_network_leftovers_raw_coverage_e2e.rs b/tests/raw_coverage/tools_composio_network_leftovers_raw_coverage_e2e.rs
index 24c2b69663..2011a7a4cd 100644
--- a/tests/raw_coverage/tools_composio_network_leftovers_raw_coverage_e2e.rs
+++ b/tests/raw_coverage/tools_composio_network_leftovers_raw_coverage_e2e.rs
@@ -24,7 +24,7 @@ use openhuman_core::tools::{
};
use tinytools::{Tool, ToolCallOptions};
-static ENV_LOCK: &OnceLock<tokio::sync:: tokio::sync::Mutex<()>> = &crate::SHARED_ENV_LOCK;
+static ENV_LOCK: &OnceLock<tokio::sync::Mutex<()>> = &crate::SHARED_ENV_LOCK;
#[derive(Clone, Debug)]
struct RecordedRequest {
diff --git a/tests/raw_coverage/w4_shared/mod.rs b/tests/raw_coverage/w4_shared/mod.rs
index 148a16d926..cefa830599 100644
--- a/tests/raw_coverage/w4_shared/mod.rs
+++ b/tests/raw_coverage/w4_shared/mod.rs
@@ -38,7 +38,7 @@ pub const SESSION_USER_ID: &str = "w4-user";
static AUTH_INIT: OnceLock<String> = OnceLock::new();
/// The crate-wide env mutex, not a private one — see the module note above.
-static ENV_LOCK: &OnceLock<tokio::sync:: tokio::sync::Mutex<()>> = &crate::SHARED_ENV_LOCK;
+static ENV_LOCK: &OnceLock<tokio::sync::Mutex<()>> = &crate::SHARED_ENV_LOCK;
static KEYRING_INIT: OnceLock<()> = OnceLock::new();
/// Serializes every case that touches process-global env (`HOME`,
diff --git a/tests/raw_coverage/worker_b_raw_coverage_e2e.rs b/tests/raw_coverage/worker_b_raw_coverage_e2e.rs
index f2b29dc999..c8da767705 100644
--- a/tests/raw_coverage/worker_b_raw_coverage_e2e.rs
+++ b/tests/raw_coverage/worker_b_raw_coverage_e2e.rs
@@ -36,7 +36,7 @@ use openhuman_rpc::server::build_core_http_router;
const TEST_RPC_TOKEN: &str = "worker-b-raw-coverage-e2e-token";
static AUTH_INIT: OnceLock<()> = OnceLock::new();
-static ENV_LOCK: &OnceLock<tokio::sync:: tokio::sync::Mutex<()>> = &crate::SHARED_ENV_LOCK;
+static ENV_LOCK: &OnceLock<tokio::sync::Mutex<()>> = &crate::SHARED_ENV_LOCK;
#[derive(Clone, Default)]
struct MockState {