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 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-12-02 21:59:43 +01:00
commit 91cfe7af92
2 changed files with 15 additions and 1 deletions

View file

@ -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);

View file

@ -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,