From 5c49646b81e563a5242f7697704f71b3ffc7aa75 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Tue, 29 Sep 2026 19:39:55 +0200 Subject: [PATCH] B3 follow-up: find the cancelled redeploy by id, not by history order Co-Authored-By: Claude Opus 5.5 --- src/control_plane.rs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/control_plane.rs b/src/control_plane.rs index 26934fd..7943698 100644 --- a/src/control_plane.rs +++ b/src/control_plane.rs @@ -13997,13 +13997,15 @@ mod tests { assert!(cancelling.post_fencing_abort.is_none()); drive(&world, |transaction| transaction.completion.is_some())?; - let finished = latest(&world)?; - assert!( - matches!(finished.completion, Some(TransactionCompletion::FailedBeforeFencing { .. })), - "{:?} / {:?}", + // History also holds the incumbent's own admission: find ours by id. + let finished = every_transaction(&world)? + .into_iter() + .find(|transaction| transaction.transaction_id == held.transaction_id) + .context("the cancelled redeploy is nowhere")?; + assert!(matches!( finished.completion, - finished.pre_fencing_abort - ); + Some(TransactionCompletion::FailedBeforeFencing { .. }) + )); assert!(finished.is_terminal()); // The target is released and nothing of the incumbent was touched. assert!(!finished.blocks_new_target_mutation());