check-lethality: an unmeasured creature is a failure, not a note
A creature with no entry in the baseline was printed as a note and then counted in the success line, which read "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 a note is the part a green build does not get read for. It is the same shape this guard was already on the wrong side of once: before the seam fix it measured 47 creatures and printed OK 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. Proved by planting a creature with no baseline: it now stops the build and names it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
533f2d8093
commit
869dc748a8
@@ -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`);
|
||||
|
||||
Reference in New Issue
Block a user