diff --git a/tools/check-lethality.mjs b/tools/check-lethality.mjs index ad87df5..3eb0afe 100644 --- a/tools/check-lethality.mjs +++ b/tools/check-lethality.mjs @@ -174,9 +174,27 @@ if (VERBOSE) { } } -if (added.length) console.log(` note: ${added.length} new creature(s) not in the baseline — ${added.join(", ")}`); if (removed.length) console.log(` note: ${removed.length} creature(s) gone from content — ${removed.join(", ")}`); +/* A creature with no entry in the baseline is UNMEASURED, and it used to be a note. + The success line underneath said "every one fighting exactly as recorded" while N of + them had no record to fight differently from — the claim was false by exactly the + number in the note above it, and the note is the part a green build does not get read + for. It is the same shape as the seam defect this guard was on the wrong side of + earlier: 47 creatures measured, OK printed for 184. + + Recording a new creature is one `--update` in the commit that adds it, which this + guard's own failure message has always instructed. That is a cheap price for a + success line that means what it says. */ +if (added.length) { + console.error(`check-lethality: FAILED — ${added.length} creature(s) have no recorded fight, ` + + `so nothing here says how they behave:`); + for (const k of added) console.error(` ${k}`); + console.error(`\n Run with --update in the same commit that adds them, and say in the message ` + + `what they are. A creature nobody has measured is not a creature this guard covers.`); + process.exit(1); +} + if (problems.length) { console.error(`check-lethality: FAILED — ${problems.length} of ${Object.keys(current).length} ` + `creature(s) fight differently than recorded`); @@ -187,5 +205,4 @@ if (problems.length) { } console.log(`check-lethality: OK — ${Object.keys(current).length} creatures, every one fighting ` - + `exactly as recorded against the frozen party` - + `${added.length ? `, ${added.length} new` : ""}`); + + `exactly as recorded against the frozen party`);