From ffb42936ca762036ebe15f3d3922c5513bd39603 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Mon, 19 Oct 2026 02:21:22 +0200 Subject: [PATCH] Continuity tests: admitted_at that does not make the fixture a sustained run The clock-step test anchored a target at admitted_at 0, which the sustained-first rule rightly reads as a sustained run; the unobserved-run test logged restarts after its generation's admission. Both now describe the cases they name. Co-Authored-By: Claude Opus 5.5 --- src/control_plane.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/control_plane.rs b/src/control_plane.rs index b4dcd86..e077373 100644 --- a/src/control_plane.rs +++ b/src/control_plane.rs @@ -16561,7 +16561,7 @@ mod tests { admit_incumbent(&world)?; age_incumbent(&world, 100_000)?; workload.kill(); - let mut meters = restarted_ago(&[1_000_000, 900_000, 800_000])?; + let mut meters = restarted_ago(&[1_500_000, 1_400_000, 1_300_000])?; meters.continuity_attempt_streak = 3; set_meters(&world, &meters)?; world.engine.supervise_one_admitted_generation()?; @@ -17217,10 +17217,10 @@ mod tests { let mut anchored = TargetSupervision::new("service"); anchored.continuity_attempt_streak = 7; anchored.continuity_backoff_from_unix_millis = Some(t); - assert_eq!(anchored.continuity_backoff(now, 0), ContinuityBackoff::Due { streak: 7 }); + assert_eq!(anchored.continuity_backoff(now, now), ContinuityBackoff::Due { streak: 7 }); anchored.continuity_attempt_streak = 1; anchored.continuity_backoff_from_unix_millis = Some(now + 10_000); - assert_eq!(anchored.continuity_backoff(now, 0), ContinuityBackoff::Waiting); + assert_eq!(anchored.continuity_backoff(now, now), ContinuityBackoff::Waiting); let route = RouteSupervisionState { next_challenge_at_unix_millis: Some(t), ..RouteSupervisionState::default()