import { describe, expect, it } from 'vitest' import { stateFingerprint, longRun } from './fingerprint.helper' /** * 金钟罩:固定种子长跑 560 月的状态指纹。 * 任何改动(重构日程/调平衡/加系统)若改变了确定性序列或结果,此测试立刻报红。 * 更新规则:仅当**有意**变更序列逻辑时,三枚 seed 指纹同版更新并注明原因。 */ // 0.1.6 基线:GameClock 重构(行为等价)+ 时节系统(有意变更乘子)后重新固化 const GOLDEN: Record = { 'bell-seed-1': '9af71ecb', 'bell-seed-2': '34f102fd', 'bell-seed-3': '753aca71' } describe('金钟罩 · 长跑确定性指纹', () => { for (const [seed, hash] of Object.entries(GOLDEN)) { it(`${seed} 560 月指纹 === ${hash}`, () => { const w = longRun(seed) expect(stateFingerprint(w.state)).toBe(hash) }) } it('同 seed 两次长跑指纹一致(无状态污染)', () => { const a = stateFingerprint(longRun('bell-seed-1').state) const b = stateFingerprint(longRun('bell-seed-1').state) expect(a).toBe(b) }) })