From 1bd95784894358d7be54961ce7f618ac2363a0ed Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Wed, 2 Dec 2026 22:14:10 +0100 Subject: [PATCH] Live seeded-Begin check: count only authored places, report who stands where Co-Authored-By: Claude Sonnet 5.5 --- crates/ghostlight-dungeon/src/runtime.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/crates/ghostlight-dungeon/src/runtime.rs b/crates/ghostlight-dungeon/src/runtime.rs index cd1d5fd..b4c1a40 100644 --- a/crates/ghostlight-dungeon/src/runtime.rs +++ b/crates/ghostlight-dungeon/src/runtime.rs @@ -672,10 +672,16 @@ mod tests { let (calls, usage) = (counting.calls.load(std::sync::atomic::Ordering::SeqCst), *counting.usage.lock().unwrap()); println!("LIVE ready after {ready:?}; calls={calls} prompt_tokens={} completion_tokens={}", usage.0, usage.1); let host = timelines.host(&begun.timeline).await.unwrap(); + // A position is not public on the snapshot; the Debug text names it by + // the same entity id a place carries. + let standing = |world: &ghostlight::WorldSnapshot, place: &ghostlight::PlaceSnapshot| -> Vec { + let at = format!("position: Some({:?})", place.id); + world.subjects.iter().filter(|subject| format!("{subject:?}").contains(&at)).map(|subject| subject.label.clone()).collect() + }; let report = |label: &str, world: &ghostlight::WorldSnapshot| { println!("LIVE {label}: phase={:?}", world.phase); for place in &world.places { - println!("LIVE place {}", place.label); + println!("LIVE place {} <- {:?}", place.label, standing(world, place)); } for subject in &world.subjects { println!("LIVE subject {:?} {} qualified={}", subject.kind, subject.label, subject.qualified); @@ -687,7 +693,8 @@ mod tests { let world = host.world.snapshot().await.unwrap(); report("after seed", &world); assert_eq!(world.phase, ghostlight::WorldPhase::Active); - assert!(world.places.len() >= 2, "the root and at least one place under it"); + let authored = world.places.iter().filter(|place| place.label != "The Commons" && place.label != "Ghostlight Live").count(); + assert!(authored >= 2, "the seed authored places beyond the root and The Commons, got {authored}"); let person = world.scale_deficit.iter().find(|row| row.kind == ghostlight::SubjectKind::Person).unwrap(); assert!(person.qualified >= 2, "at least two qualifying people");