From 8374f4dc19fa36ad0547628f4889501be4ceaeed Mon Sep 17 00:00:00 2001 From: jochen Date: Thu, 17 Sep 2026 23:07:50 +0200 Subject: [PATCH] warm refuses a departed instance instead of crashing into it ready() asked a gone instance for its snapshots before judge could say 'no longer standing'; a stale warm.json from any earlier scenario made every warm run fail in milliseconds. The question is now asked only of an instance that still exists. https://claude.ai/code/session_01D6qtiYU3P9jk3pnAXyAFyx --- src/warm.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/warm.ts b/src/warm.ts index 902a243..020c8e5 100644 --- a/src/warm.ts +++ b/src/warm.ts @@ -141,7 +141,11 @@ export async function ready( ): Promise { const warm = remembered(); const standing = await standingNow(); - const has = warm ? (await snapshots(warm.instanceId)).includes(label) : false; + // Asked only of an instance that still exists: snapshots() throws for one that is gone, and + // judge already has the words for that refusal — a remembered instance another scenario (or + // another month) left behind must be refused, not crashed into. + const has = warm && standing.includes(warm.instanceId) + ? (await snapshots(warm.instanceId)).includes(label) : false; return judge(warm, scenario, standing, has, whatWasTested(env)); } -- 2.54.0