tests: the surface carries the reply's vote key; a withdrawn vote is read on a later beat; an urgency in her turn's second is consumed

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-31 09:19:37 +01:00
commit 98e30de3fb
2 changed files with 13 additions and 1 deletions

View file

@ -677,8 +677,20 @@ fn a_null_vote_withdraws_the_standing_one_and_an_urgency_only_pulse_leaves_it()
urgency_permille: None,
note: "test".into(),
})]);
rig.advance(5000);
rig.poll();
let withdrawn = rig.store.traces.borrow().last().cloned().unwrap();
assert_eq!(withdrawn.instances[ANN].vote_beat_s, None, "an explicit null withdraws it");
assert_eq!(withdrawn.tempo_s, 900, "she counts as silent again");
}
#[test]
fn an_urgency_declared_in_the_second_of_her_turn_is_already_consumed() {
let rig = Rig::new();
rig.turn(ANN, 3000);
rig.turn(BOB, 3000);
rig.pulse(ANN, 3000, None, Some(900));
rig.poll();
let trace = rig.store.traces.borrow().last().cloned().unwrap();
assert_eq!(trace.instances[ANN].urgency_permille, 0, "a declaration is pending only when admitted after her turn");
}