From 27ea607243b3d2b93c19f742a5d5a67eb6672d9f Mon Sep 17 00:00:00 2001 From: npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 Date: Wed, 5 Aug 2026 02:22:56 -0400 Subject: [PATCH] fix(desktop): suppress await_holding_lock clippy lint on epoch tests SCOPE_GENERATION_TEST_LOCK is a std::sync::Mutex held across await points in test_full_tail_stop_spawn_receipt_register_save and test_relay_mesh_preflight_precedes_stop to prevent concurrent tests from advancing the generation counter mid-test. The deadlock risk is acceptable in test-only code: the lock is never held across blocking operations, only across async coordination inside a single test. Suppress the lint explicitly with a comment explaining the rationale. Co-authored-by: Will Pfleger Signed-off-by: Will Pfleger --- .../src-tauri/src/commands/global_agent_config_epoch_tests.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/desktop/src-tauri/src/commands/global_agent_config_epoch_tests.rs b/desktop/src-tauri/src/commands/global_agent_config_epoch_tests.rs index 42dd8448a..09206449c 100644 --- a/desktop/src-tauri/src/commands/global_agent_config_epoch_tests.rs +++ b/desktop/src-tauri/src/commands/global_agent_config_epoch_tests.rs @@ -23,6 +23,7 @@ use super::*; /// Non-empty personas, teams, and global are placed in both the context AND /// the captured definitions_dir so the spawn_fn can assert they arrive. #[tokio::test] +#[allow(clippy::await_holding_lock)] // SCOPE_GENERATION_TEST_LOCK serialises parallel tests async fn test_full_tail_stop_spawn_receipt_register_save() { use crate::managed_agents::scope::SCOPE_GENERATION_TEST_LOCK; use crate::managed_agents::{ @@ -434,6 +435,7 @@ async fn test_full_tail_stop_spawn_receipt_register_save() { /// Owner key must match the app's signing key — use the actual generated key /// from the mock app's AppState. #[tokio::test] +#[allow(clippy::await_holding_lock)] // SCOPE_GENERATION_TEST_LOCK serialises parallel tests async fn test_relay_mesh_preflight_precedes_stop() { use super::super::restart_local_agent_on_config_change_for; use crate::commands::global_agent_config::RestartOutcome;