From 91cfe7af92d7c3948d10298084f0fe54361e881f Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Wed, 2 Dec 2026 21:59:43 +0100 Subject: [PATCH] Turn log file is named from its play store so two tables in one directory do not share it; probe gains a long mode of forty turns Co-Authored-By: Claude Sonnet 5.5 --- crates/ghostlight-dungeon/src/api.rs | 13 +++++++++++++ crates/ghostlight-dungeon/src/play.rs | 3 ++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/crates/ghostlight-dungeon/src/api.rs b/crates/ghostlight-dungeon/src/api.rs index 7134a98..fe74f27 100644 --- a/crates/ghostlight-dungeon/src/api.rs +++ b/crates/ghostlight-dungeon/src/api.rs @@ -1915,6 +1915,19 @@ Smoke leans from the chimneys of the low town beyond it. A woman at the toll hut output("r2", vec![call_event("c2", END_TURN_TOOL, json!({}))]), output("proj-1", vec![text_event("You take the lower road, and the dogs do not bark.")]), ]; + // "long": forty closed turns, enough to page the scrollback past one page. + let script = if std::env::var("GHOSTLIGHT_PROBE_MODE").as_deref() == Ok("long") { + (0..40) + .flat_map(|n| { + [ + output(&format!("r{n}"), vec![call_event(&format!("c{n}"), END_TURN_TOOL, json!({}))]), + output(&format!("p{n}"), vec![text_event(&format!("Narration {n}: the road goes on, and so do you."))]), + ] + }) + .collect() + } else { + script + }; let mut app = if seeding { app_over(deferred_rig(), &["alice"]).await } else { app(script, &["alice"]).await }; if !seeding { app.state.vaults = Arc::new(NoVaults); diff --git a/crates/ghostlight-dungeon/src/play.rs b/crates/ghostlight-dungeon/src/play.rs index 61a6e64..86c2a54 100644 --- a/crates/ghostlight-dungeon/src/play.rs +++ b/crates/ghostlight-dungeon/src/play.rs @@ -1368,7 +1368,8 @@ impl PlayTable { let play = PlayPort::new(world.clone()); let store_path = store_path.as_ref().to_path_buf(); let store = PlayTurnStore::open(&store_path)?; - let log = TurnLog::open(store_path.with_file_name("turn-log-v1.cc"))?; + // Beside the play row, named from it: one log per play store. + let log = TurnLog::open(store_path.with_extension("turn-log.cc"))?; Ok(Self { play, world,