authorclover caruso <git@paperclover.net> 2026-10-10 21:34:25-07:00
committerclover caruso <git@paperclover.net> 2026-10-10 22:56:06-07:00
log6578d5a16cd452ade71e26f61943fe015f24df38
tree159618199cab1d8d65c300dc2072d5d86e68864b
parent96172e13a7a316a5fc038b61aa836d3f91d8a837
signature Signed by SSH key SHA256:52mNGHRsVFBDED9IAX5pe+LRWUefqTbxEReunq21QvU (~clover)

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

1 files changed, 1 insertions(+), 6 deletions(-)

crates/snowbound/src/undo.rs+1-6
......@@ -1338,7 +1338,7 @@ mod tests {
13381338 }
13391339
13401340 #[test]
1341 fn contended_page_actions_keep_their_position_in_undo_and_redo() {
1341 fn refused_page_actions_keep_their_position_in_undo_and_redo() {
13421342 for redo in [false, true] {
13431343 let mut timeline = Timeline::default();
13441344 let action = Action {
......@@ -1360,9 +1360,6 @@ mod tests {
13601360 else {
13611361 panic!("the current page has a pending action");
13621362 };
1363 let structure = Arc::new(async_lock::Mutex::new(()));
1364 let changing = structure.try_lock_arc().unwrap();
1365 assert!(structure.try_lock_arc().is_none());
13661363 timeline.put_back((redo, at), action);
13671364 let depth = if redo { [0, 1] } else { [1, 0] };
13681365 assert!(
......@@ -1370,8 +1367,6 @@ mod tests {
13701367 "newer edit stays first"
13711368 );
13721369 timeline.stepped(page(3), redo);
1373 drop(changing);
1374 let _changing = structure.try_lock_arc().unwrap();
13751370 let Some(Next::Action(action, at)) = timeline.next(redo, page(1), [0, 0], &here())
13761371 else {
13771372 panic!("the refused action must remain in its original stack");