Preserve health during empty-server monitoring handoff (Refs #148)

This commit is contained in:
2026-10-12 19:02:54 -04:00
parent 2f52dcb1ef
commit f91ec4d152
6 changed files with 224 additions and 6 deletions
+10
View File
@@ -142,6 +142,16 @@ describe('beta requirement evaluation', () => {
expect(m.values.r0).toBe(20);
});
it('keeps health continuous through the freshness boundary but resets beyond it', () => {
const plan = planWith('healthy-minutes');
const m = emptyMetrics();
applySample(plan, m, 0, true);
applySample(plan, m, 90_000, true);
expect(m.values.r0).toBe(1.5);
applySample(plan, m, 180_001, true);
expect(m.values.r0).toBe(0);
});
it('excludes monitoring gaps from healthy time and requires explicit manual sign-off', () => {
const plan = planWith('healthy-minutes', 'failure-budget', 'manual');
const m = emptyMetrics();