'use strict'; /** * Which stats serve a calibrated number in the live pipeline. * * The rule this locks: a stat that cannot survive dropping a single settled date * was never calibrated — it was fitted to that date. hits WAS served calibrated * and is not any more, which is the honest consequence of measuring it. */ const snapshotService = require('../../src/services/snapshotService'); describe('the deployed set is LODO-gated', () => { it('serves total_bases — it passed at every held-size threshold', () => { expect(snapshotService.CALIBRATION_DEPLOYED).toContain('total_bases'); }); it('does NOT serve hits, rbi or runs — each fails LODO', () => { // hits reverses when 2026-07-22 or 2026-07-26 is dropped; rbi on 2026-08-01; // runs on 2026-08-01 and 2026-08-05. for (const stat of ['hits', 'rbi', 'runs']) { expect(snapshotService.CALIBRATION_DEPLOYED).not.toContain(stat); } }); it('is frozen, so a stat cannot be added at runtime without a code change', () => { expect(Object.isFrozen(snapshotService.CALIBRATION_DEPLOYED)).toBe(true); expect(() => { snapshotService.CALIBRATION_DEPLOYED.push('hits'); }).toThrow(); }); });