diff --git a/snapshot/src/core/checks.ts b/snapshot/src/core/checks.ts index d2fc97b..59ecf49 100644 --- a/snapshot/src/core/checks.ts +++ b/snapshot/src/core/checks.ts @@ -21,6 +21,13 @@ export function runChecks(input: CheckInput): void { `Event-Count ${input.eventCount} unter min-events ${input.minEvents}`, ) } + // Drop-Check: hard-fail bei jedem unerklaerten Event-Verlust > 20%. + // Bedingung "drop > newDeletionsCount" heisst: ein einziges nicht durch + // kind:5 abgedecktes verschwundenes event reicht zum fail. Bewusst strikt, + // weil ein versehentlich verschwundener post schlimmer ist als ein + // false-positive-failure (override mit --allow-shrink). Wer das tunen + // will, sollte die bedingung auf "drop - newDeletionsCount > schwelle" + // umstellen. if (input.lastKnownGoodCount !== undefined && !input.allowShrink) { const drop = input.lastKnownGoodCount - input.eventCount const dropPct = drop / input.lastKnownGoodCount