Background
On restart mid-batch the indexer can double-insert or skip events. Ingest should be exactly-once via idempotent writes + durable checkpoints.
What to build
Wrap each batch in a transaction that upserts events by unique eventId and advances a persisted cursor atomically, so a crash/restart resumes exactly where it left off.
Key files
src/indexer.ts
src/indexer/checkpoint.ts (new)
Acceptance criteria
Drips Wave · Complexity: Advanced · 200 points
Background
On restart mid-batch the indexer can double-insert or skip events. Ingest should be exactly-once via idempotent writes + durable checkpoints.
What to build
Wrap each batch in a transaction that upserts events by unique
eventIdand advances a persisted cursor atomically, so a crash/restart resumes exactly where it left off.Key files
src/indexer.tssrc/indexer/checkpoint.ts(new)Acceptance criteria