From ed07241f34de3f9ef56b988994b7b7d453706aa6 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Wed, 30 Sep 2026 06:33:56 +0200 Subject: [PATCH] B2 final: drop the merged history-ceiling test that counts in its own closure continuity_gives_up_on_a_release_that_will_not_start came from main with the old rule (three failed restarts per generation, counted from history). The branch owns the ceiling in TargetSupervision meters now (six per window), and the test exercised no production code: it filtered transactions in a local closure and compared to the constant, which the meters changed. Co-Authored-By: Claude Sonnet 5.5 --- src/control_plane.rs | 51 -------------------------------------------- 1 file changed, 51 deletions(-) diff --git a/src/control_plane.rs b/src/control_plane.rs index fe8e6c2..da57968 100644 --- a/src/control_plane.rs +++ b/src/control_plane.rs @@ -10533,57 +10533,6 @@ mod tests { assert!(transaction.validate().is_err()); Ok(()) } - - #[test] - fn continuity_gives_up_on_a_release_that_will_not_start() -> Result<()> { - let command = DeploymentCommand { - schema_version: DEPLOYMENT_COMMAND_SCHEMA.into(), - command_id: "continuity-1".into(), - kind: CommandKind::Continuity, - selector: "odin".into(), - requested_by: "idunn-continuity".into(), - requested_at_unix_millis: 100, - }; - let failed_restart = |generation: &str, ordinal: u32| -> Result { - let mut transaction = - DeploymentTransaction::new(&command, "odin".into(), ordinal, None, 100)?; - transaction.incumbent_generation_id = Some(generation.into()); - transaction.completion = Some(TransactionCompletion::FailedBeforeFencing { - error: "systemd unit is not running".into(), - }); - Ok(transaction) - }; - - let refused = |transactions: &[DeploymentTransaction], generation: &str| -> usize { - transactions - .iter() - .filter(|value| { - value.target == "odin" - && value.command_kind == CommandKind::Continuity - && value.incumbent_generation_id.as_deref() == Some(generation) - && matches!( - value.completion, - Some(TransactionCompletion::FailedBeforeFencing { .. }) - | Some(TransactionCompletion::FailedAfterFencing { .. }) - ) - }) - .count() - }; - - let attempts = vec![ - failed_restart("generation-1", 0)?, - failed_restart("generation-1", 1)?, - failed_restart("generation-1", 2)?, - ]; - assert!(refused(&attempts, "generation-1") >= CONTINUITY_RESTART_ATTEMPTS); - - // A restart that succeeds admits a new generation, and the count is - // kept against the generation id, so the next release is not condemned - // by the failures of the one it replaced. - assert_eq!(refused(&attempts, "generation-2"), 0); - Ok(()) - } - #[test] fn candidate_cleanup_is_owed_when_an_activation_or_a_workload_exists() -> Result<()> { // (activation issued, workload observed, expected cleanup)