B3 follow-up: find the cancelled redeploy by id, not by history order

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-09-29 19:39:55 +02:00
commit 5c49646b81

View file

@ -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());