From 6578d5a16cd452ade71e26f61943fe015f24df38 Mon Sep 17 00:00:00 2001 From: clover caruso Date: Sat, 10 Oct 2026 21:34:25 -0700 Subject: [PATCH] test: keep history restoration coverage focused on chronology Remove a standalone mutex that did not reach State.perform. This unit regression proves exact Undo/Redo stack restoration before newer edits on another page; real preflight contention remains an application runtime check. Assisted-by: gpt-6.1-sol --- crates/snowbound/src/undo.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/crates/snowbound/src/undo.rs b/crates/snowbound/src/undo.rs index 2c5b5e82b7e185e049a38c733304ff660980b370..b98f10b2ce8e0fdae59cdb2926d31fea5a78e2ac 100644 --- a/crates/snowbound/src/undo.rs +++ b/crates/snowbound/src/undo.rs @@ -1338,7 +1338,7 @@ mod tests { } #[test] - fn contended_page_actions_keep_their_position_in_undo_and_redo() { + fn refused_page_actions_keep_their_position_in_undo_and_redo() { for redo in [false, true] { let mut timeline = Timeline::default(); let action = Action { @@ -1360,9 +1360,6 @@ mod tests { else { panic!("the current page has a pending action"); }; - let structure = Arc::new(async_lock::Mutex::new(())); - let changing = structure.try_lock_arc().unwrap(); - assert!(structure.try_lock_arc().is_none()); timeline.put_back((redo, at), action); let depth = if redo { [0, 1] } else { [1, 0] }; assert!( @@ -1370,8 +1367,6 @@ mod tests { "newer edit stays first" ); timeline.stepped(page(3), redo); - drop(changing); - let _changing = structure.try_lock_arc().unwrap(); let Some(Next::Action(action, at)) = timeline.next(redo, page(1), [0, 0], &here()) else { panic!("the refused action must remain in its original stack"); -- 2.54.0