From 06a8373fbd655d427e7430218a4b983db35262cd Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 11 Oct 2026 10:08:52 +0200 Subject: [PATCH] Verse run test: a resumed tick reports only the acts the resuming run committed Pins the operator-log cut at the tick's start revision against the act the interrupted run left at that very revision. Builds; the mutation pass named it. Co-Authored-By: Claude Opus 5.5 --- crates/ghostlight/src/verse/run/tests.rs | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/crates/ghostlight/src/verse/run/tests.rs b/crates/ghostlight/src/verse/run/tests.rs index 8b98e88..d4e378c 100644 --- a/crates/ghostlight/src/verse/run/tests.rs +++ b/crates/ghostlight/src/verse/run/tests.rs @@ -429,10 +429,16 @@ async fn budget_exhausted_stops_before_the_clock_and_resumes() { vec![ended.record.clone()] ); - // A later run, under its own cap, finishes the tick: the first faction's - // act is answered from the kernel's ledger and costs no call. + // A later run, under its own cap, finishes the tick and costs no call for + // the act already committed. let second = ScriptedPort::speaking(); - let resumed = verse.run_quietly(second.clone(), u64::MAX, 2).await; + let mut resumed_reports = Vec::new(); + let resumed = verse + .run(second.clone(), u64::MAX, 2, |report| { + resumed_reports.push(report.clone()); + ControlFlow::Continue(()) + }) + .await; assert_eq!(resumed.record.status, RunStatus::Completed); assert_eq!(resumed.record.sequence, 2); let ticks: Vec = resumed.record.checkpoints.iter().map(|c| c.tick).collect(); @@ -452,6 +458,13 @@ async fn budget_exhausted_stops_before_the_clock_and_resumes() { assert_eq!(closing.refusals.len(), 1); assert_eq!(closing.refusals[0].reason, RefusalReason::ScopeMoved); assert_eq!(resumed.record.ticks_closed(), 2); + // The tick reports the act this run committed and not the one it found. + assert_eq!(resumed_reports[0].acts.len(), 1); + assert!(resumed_reports[0].acts[0].revision > reports[0].acts[0].revision); + assert_ne!( + resumed_reports[0].acts[0].speaker_label, + reports[0].acts[0].speaker_label + ); assert_eq!(resumed.record.checkpoints[1].committed.len(), 2); }