docs(snapshot): drop-check-semantik dokumentiert

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jörg Lohrer 2026-04-28 08:20:01 +02:00
parent 715c1f5e1e
commit 1827817ad5
1 changed files with 7 additions and 0 deletions

View File

@ -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