import { describe, expect, it } from 'vitest' import { stateFingerprint, longRun } from './fingerprint.helper' /** * 金钟罩:固定种子长跑 560 月的状态指纹。 * 任何改动(重构日程/调平衡/加系统)若改变了确定性序列或结果,此测试立刻报红。 * 更新规则:仅当**有意**变更序列逻辑时,三枚 seed 指纹同版更新并注明原因。 */ // 0.1.8 基线:特征加成(自律/精研/急躁/云游生效)+ 飞升窗口永续 + market 利己折扣后重新固化 // (0.1.6 时 GreenClock 重构行为等价;0.1.7 插件门面化零漂移) const GOLDEN: Record = { 'bell-seed-1': '9af71ecb', 'bell-seed-2': '63cede89', 'bell-seed-3': 'ebfec4a4' } 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) }) })