diff --git a/crates/ghostlight/src/controllers.rs b/crates/ghostlight/src/controllers.rs index a5d5ce1..577ff70 100644 --- a/crates/ghostlight/src/controllers.rs +++ b/crates/ghostlight/src/controllers.rs @@ -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:?}");