refactor(v026): #8 telemetryStats.aggregateStats exhaustiveness check

if/else if 체인 끝에 const _exhaustive: never = ev — 새 telemetry kind
추가 시 본 함수 분기 누락을 컴파일 단계에서 catch.

silent fall-through 방지 — kind 추가 → typecheck 실패 → 강제 분기 추가.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
altair823
2026-05-05 01:35:04 +09:00
parent 983306e004
commit 9230ebff9d

View File

@@ -129,6 +129,10 @@ export function aggregateStats(events: TelemetryEvent[], generatedAt: Date): Sta
} else if (ev.kind === 'recall_snoozed') {
row.recall_snoozed += 1;
recallSnoozedCount += 1;
} else {
// v0.2.6 #8 — 새 telemetry kind 추가 시 본 함수 분기 누락을 컴파일 단계에서 catch.
const _exhaustive: never = ev;
void _exhaustive;
}
}
const days = Array.from(byDay.values()).sort((a, b) => a.date.localeCompare(b.date));