Andrew Fribush

fig. 2.19.1: the shipped zero-loss sync in 7,567 lines beside the estimated 400 to 700 for a design that accepts overwrites

fig. 2.19.1 · the shipped zero-loss sync in 7,567 lines beside the estimated 400 to 700 for a design that accepts overwrites.
7,567-LINE SYNC PRESERVES ANSWER COUNTS; THE ESTIMATED 400-700-LINEALTERNATIVE ACCEPTS OVERWRITESONE BAR IS ONE DESIGN IN LINES; ACCENT IS THE STUDY’S ESTIMATE FOR THE DESIGNTHAT ACCEPTS THE LOSS.0 LINES2,0004,0006,0008,000OP-QUEUE, WEB LOCKS, EPOCH, QUARANTINE, LOSS LOG · SHIPPED · 7,567 LINES3,214 PRODUCTION4,353 TESTSLAST-WRITE-WINS + TOMBSTONE · 400 TO 700 LINESA PER-ITEM MERGE FUNCTION, ITS TESTS, A THIN HANDLER

The op-queue bar, file by file, in the order drawn: production, then tests.

  • 685 lib/ledger-sync.ts · fingerprints, apply, seal, reconcile
  • 134 lib/ledger-ops.ts · queue-entry shapes
  • 1,070 lib/ledger-client-sync.ts · writer record, Web Locks, push chain
  • 887 lib/ledger-runtime.ts · identity, adoption, re-mint, orphan drain, GC
  • 438 lib/ledger-client-gc.ts · orphan and GC scanning
  • 849 tests/ledger-sync.test.ts
  • 1,175 tests/ledger-client-sync.test.tsx
  • 926 tests/ledger-runtime.test.tsx
  • 595 tests/ledger-client-gc.test.tsx
  • 349 tests/providers-ledger.test.tsx
  • 459 tests/ledger-store.test.ts

Line counts are the persistence study’s own; the op-queue total leaves out the ledger-specific slices of the store and route files the study counts separately. The 400 to 700 is the study’s estimate for the merge function, its tests and a thin handler.

source: vocabinator research/2026-08-19-persistence-upgrade.md lines 42-63, 76-77, 331-366, 451-453 · syncCost.data.ts

View in context: Ten review rounds for a flashcard strength map → · All figures

Andrew Fribush, software and computer engineer in Austin. I build consequential systems where software meets institutions: finance, healthcare, commerce, government data, and the mechanisms that govern AI agents. Taking new engagements: hello@andrewfribush.com.