Live seeded-Begin check: count only authored places, report who stands where

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-12-02 22:14:10 +01:00
commit 1bd9578489

View file

@ -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<String> {
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");