From 51b8e9c30f81be064281c1879ebdd926f479bbbe Mon Sep 17 00:00:00 2001 From: seiler Date: Wed, 21 Oct 2026 22:45:14 +0000 Subject: [PATCH] Disarm timeout fixture guards through their mutable receiver Replace both direct field assignments with a FixtureTree method so guard state mutation is explicit and avoids the captured-field unused-assignment warning under warnings-as-errors Clippy. Preserve disarming before result delivery and after the descendant-death assertion. Signed-off-by: seiler Co-authored-by: Codex Signed-off-by: Brad Seiler --- .../src/managed_agents/discovery/bounded_command.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/desktop/src-tauri/src/managed_agents/discovery/bounded_command.rs b/desktop/src-tauri/src/managed_agents/discovery/bounded_command.rs index 593ff5dc60..70297885bb 100644 --- a/desktop/src-tauri/src/managed_agents/discovery/bounded_command.rs +++ b/desktop/src-tauri/src/managed_agents/discovery/bounded_command.rs @@ -594,6 +594,11 @@ mod tests { child: Option, armed: bool, } + impl FixtureTree { + fn disarm(&mut self) { + self.armed = false; + } + } impl Drop for FixtureTree { fn drop(&mut self) { if self.armed { @@ -677,7 +682,7 @@ mod tests { worker.child.as_mut().expect("owned fixture"), Duration::from_millis(300), ); - worker.armed = false; + worker.disarm(); let _ = tx.send((descendant_pid, result)); }); let (descendant_pid, result) = rx @@ -694,7 +699,7 @@ mod tests { !pid_alive(descendant_pid), "backgrounded descendant {descendant_pid} must be group-killed on timeout, but it survived" ); - fixture.armed = false; + fixture.disarm(); } // Deterministic seam regression (Thufir's finding): a drain fed a reader