From 4f7f26dbfabf3c6d632de44a619768296f80a7fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Thu, 24 Sep 2026 14:34:58 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20test(timeline):=20cut=20the=20sp?= =?UTF-8?q?lit=20guard=20at=20the=20then-branch=20it=20means?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The guard's positive half read everything after `if cut {`, which the shape the fix replaced also satisfies -- the clear sat below the whole if/else, so a revert of the fix shipped green (verifier finding H1). The branch is now cut apart at its `else`: the clear has to be inside the then-branch, exactly once, and nowhere above the gate. Revert-mutation proof: with the clear put back below the branch the test FAILS, and with it above the gate it FAILS. --- crates/app/src/tests/editing.rs | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/crates/app/src/tests/editing.rs b/crates/app/src/tests/editing.rs index d38aa98..1bda185 100644 --- a/crates/app/src/tests/editing.rs +++ b/crates/app/src/tests/editing.rs @@ -2722,15 +2722,26 @@ fn a_refused_split_keeps_the_clip_in_hand() { let (before, after) = body .split_once("if cut {") .expect("the split door no longer gates anything on its own answer"); + // The door's own branch, cut apart at its `else`: "runs after `if cut {`" is + // satisfied by the shape this fix replaced as well, because the clear sat + // below the whole if/else and so inside everything that followed the gate -- + // a revert of the fix would have shipped green. What the arm has to be is + // inside the then-branch, and nothing that follows the branch may hold one. + let then = after + .split_once("} else {") + .expect("the split door no longer branches on what the cut answered") + .0; + let cleared_twice = after.split("self.selected.clear()").count() > 1; assert!( !before.contains("self.selected.clear()"), "the split drops the selection before it knows the cut happened, so a \ refused split leaves the user with nothing picked and nothing told" ); assert!( - after.contains("self.selected.clear()"), - "a split that happened no longer drops the selection, so the mark names \ - a different clip on the far side of the seam" + then.contains("self.selected.clear()") && !cleared_twice, + "the clear does not ride the split's own success branch: a split that \ + happened leaves the mark naming a different clip across the seam, and a \ + refused one must leave it naming the clip it named" ); }