feedback5 WA: golden-result safety net before the 0.2.0 refactor — tools/golden.mjs runs a seeded corpus (49 roster battles: every chess record × skill × module, every stage and enemy kind; 46 bond battles; 22 leader / 联防 fields; 16 bot-only matches) and test/golden.test.js compares its digests with test/golden/*.json field by field (fast subset by default, GOLDEN_FULL=1 for all; npm run golden / golden:update; test/golden/README.md)

This commit is contained in:
sganggs committed 2026-10-05 15:49:24 +08:00
1 parent 305b524df2
commit 0fa0f958b1
10 files changed
+8808

No files matched your search

+5
View File
@@ -1240,6 +1240,11 @@ prints a per-unit damage/DPS/kills/heal table (+ ASCII frames: letters = operato
`^` = flyers, `■` = crates). `--wave <template>`, `--seed`, `--content generic`, `--hpMul/--atkMul/--speedMul`,
`--time`, `--bossHp`, `--json`, `--events`, or a scenario JSON file (see the file header).
Golden results (`tools/golden.mjs`, `test/golden/README.md`): a fixed corpus of seeded battles — every chess record ×
skill × module, every bond at its threshold and at 999 layers, every leader field, 联防 — and bot-only matches,
reduced to digests in `test/golden/*.json`; `test/golden.test.js` fails, naming the scenario and the field, when a
digest moves. A refactor must leave them unchanged; `npm run golden:update` records an intended gameplay change.
## 12. Data notes (simdata.js)
Defs are normalised from data/*.json (DATA.md) with research JSON as a fallback. Chess: `stats {maxHp, atk, def, res, aspd,