from coderabbit on #235, deferred out of that pr as pre-existing.
`_pruneOldDecoded` builds `todoDays` by excluding `finalizedDayIds`, but `finalizedDayIds` does not exclude results that were SKIPPED or partial. `pruneDecodedBeforeRecTs` then deletes globally by rec_ts, so decoded rows backing a day that never actually derived cleanly can go.
that breaks the invariant that decoded rows are pruned only after the covering day is derived, and it is unrecoverable — raw_records is gone and raw_archive only holds frames we could not decode.
fix direction: require a complete, non-skipped result at kAlgoVersion for every day represented by rows below the cutoff before pruning anything.
not in #235 because it predates that branch and is a heavier change than the rest of that pr — but it is the same class of silent loss.
from coderabbit on #235, deferred out of that pr as pre-existing.
`_pruneOldDecoded` builds `todoDays` by excluding `finalizedDayIds`, but `finalizedDayIds` does not exclude results that were SKIPPED or partial. `pruneDecodedBeforeRecTs` then deletes globally by rec_ts, so decoded rows backing a day that never actually derived cleanly can go.
that breaks the invariant that decoded rows are pruned only after the covering day is derived, and it is unrecoverable — raw_records is gone and raw_archive only holds frames we could not decode.
fix direction: require a complete, non-skipped result at kAlgoVersion for every day represented by rows below the cutoff before pruning anything.
not in #235 because it predates that branch and is a heavier change than the rest of that pr — but it is the same class of silent loss.