From 2291e90355faa06d6ff3f6d22451779e62bc7056 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 8 Nov 2026 12:13:57 +0100 Subject: [PATCH] mind-body: the once-per-window test frees her unit and moves the clock, so only last_sleep spends the window --- crates/mind-body/src/heartbeat/tests.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/mind-body/src/heartbeat/tests.rs b/crates/mind-body/src/heartbeat/tests.rs index b65f0e3..1eb5cd7 100644 --- a/crates/mind-body/src/heartbeat/tests.rs +++ b/crates/mind-body/src/heartbeat/tests.rs @@ -1499,6 +1499,8 @@ fn a_listed_idle_mind_sleeps_once_per_window_and_a_missed_night_is_not_made_up() end_launched(&rig, ANN); // Her unit is gone as well, so she is idle and only her last Sleep run says the window is spent. rig.launcher.kill_as(&Slug("ann".into()), RunTurn::Sleep); + rig.advance(60); + rig.store.save(&HeartbeatState { last_beat_at: rig.now(), handled_mentions: vec![] }).unwrap(); assert_eq!(rig.poll(), Outcome::Polled { launched: vec![] }, "one night per window, whatever became of it"); assert_eq!(started_turns(&rig).len(), 1); // The next window opens a day later and she sleeps again.