Merge pull request 'warm refuses a departed instance instead of crashing into it' (#33) from fix/warm-refuses-the-departed into main

This commit was merged in pull request #33.
This commit is contained in:
2026-09-17 23:08:04 +02:00
+5 -1
View File
@@ -141,7 +141,11 @@ export async function ready(
): Promise<Verdict> { ): Promise<Verdict> {
const warm = remembered(); const warm = remembered();
const standing = await standingNow(); 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)); return judge(warm, scenario, standing, has, whatWasTested(env));
} }