From 634d95f31d6a82b2187ed67f81ceacca16807ad4 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Thu, 3 Dec 2026 09:15:08 +0100 Subject: [PATCH] tests: a stopped wave lists only the nodes it entered --- crates/ghostlight/src/verse/run/tests.rs | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/crates/ghostlight/src/verse/run/tests.rs b/crates/ghostlight/src/verse/run/tests.rs index e4a97bf..e8a2a5f 100644 --- a/crates/ghostlight/src/verse/run/tests.rs +++ b/crates/ghostlight/src/verse/run/tests.rs @@ -3029,9 +3029,21 @@ async fn a_v1_tick_or_run_row_is_refused_by_name() { #[tokio::test] async fn a_wave_that_stops_reports_only_the_nodes_it_reached() { let (_dir, verse) = Harness::fresh().await; + let config = deep_config(1); + let mut tick = opened_tick(&verse, &config).await; + // A third node behind the two the fault will stop inside. + let gone = SubjectId::issue(); + tick.cells.push(FrozenCell { + id: tick.cells[0].id, + group: false, + members: vec![gone], + node: NodeId::of(tick.world_id, &NodeAnchor::Subject(gone)), + distance: 3, + }); + verse.runs.put_tick(&tick).unwrap(); let mut reports = Vec::new(); let ended = verse - .run_under(fault_at(1), u64::MAX, deep_config(1), |report| { + .run_under(fault_at(1), u64::MAX, config, |report| { reports.push(report.clone()); ControlFlow::Continue(()) }) @@ -3040,9 +3052,12 @@ async fn a_wave_that_stops_reports_only_the_nodes_it_reached() { let [report] = reports.as_slice() else { panic!("the open tick is reported") }; - assert_eq!(report.nodes.len(), 1, "the second node was never reached"); - assert_eq!(report.acts().count(), 1); + // The first node acted; the second was entered and its call faulted; the + // third was never reached and is not listed. + assert_eq!(report.nodes.len(), 2); assert_eq!(report.nodes[0].acts.len(), 1); + assert!(report.nodes[1].acts.is_empty()); + assert!(report.nodes[1].refusals.is_empty()); } #[tokio::test]