Tests: an abandoned row cut short of the repair limit is not a valid ending

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-12-03 00:14:11 +01:00
commit 2f6cc52412

View file

@ -14490,6 +14490,11 @@ mod tests {
};
assert_eq!(refusals.len(), crate::elaboration::MAX_REFUSALS + 1);
assert!(row.integrity_is_valid());
let mut cut = row.clone();
if let SeedCheckpoint::NoPatch { refusals, .. } = &mut cut {
refusals.remove(0);
}
assert!(!cut.integrity_is_valid(), "a seed session cut short of its limit read as ended");
drop(stored);
assert_eq!(runner.step().await.unwrap(), SeedOutcome::NoPatch);
assert_eq!(script.seen.lock().unwrap().len(), seen, "an abandoned seed session ran inference again");
@ -14543,6 +14548,10 @@ mod tests {
refusals.pop();
}));
assert!(!tamper(&|refusals| refusals.last_mut().unwrap().after_round = 1));
// At exactly the repair limit the session was still repairable.
assert!(!tamper(&|refusals| {
refusals.remove(0);
}));
let calls = port.calls();
let after = runner.sweep(pool(1), 1).await.unwrap();
assert_eq!((after.claimed, after.started), (0, 0), "{after:?}");