fix(storage): treat an empty OPFS receipt as none and keep reconcile going past a failed row (05-02)

A first receipt write that hit the quota left a zero-byte receipt.json that
cleanup and orphan GC could not parse, so reconcile and GC for the whole
authority stopped for good. An empty receipt now counts as no receipt, and
reconcile counts a failed row, observes it and moves on to the rest and GC.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
DongHyeonka
2026-09-25 22:12:33 +09:00
co-authored by Claude Opus 5.5
parent 8fc816ee25
commit 47cf040586
5 changed files with 210 additions and 13 deletions
@@ -105,6 +105,12 @@ export type OpfsReconciliationReport = Readonly<{
* a live put or delete, not debris, and are left for a later reconcile.
*/
skippedLiveTransactions: number;
/**
* 05-02. Rows that failed to reconcile this time. Each stays in the journal
* for a later run and is observed as a `FAILED` reconcile; it no longer
* stops the rest of the page or orphan GC.
*/
failedTransactions: number;
}>;
export type OpfsPolicyMaintenanceReport = Readonly<{