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 <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
This commit is contained in:
npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7
2026-08-05 02:22:56 -04:00
co-authored by Will Pfleger
parent 7c455d9759
commit 27ea607243
@@ -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;