Implement SyncOutbox repository #17

Open
opened 2026-10-30 21:00:21 -06:00 by west · 0 comments
Owner

📋 CRUD operations for the client-side sync outbox.

🎯 Acceptance Criteria:

  • append(action) adds a new action to the outbox
  • queryUnsynced() returns all actions where server_synced_at is NULL
  • markSynced(sequenceNumber) updates server_synced_at for an action
  • markAllSyncedUpTo(cursor) marks all actions up to a cursor position
  • purgeOldSynced(maxAge?) removes old synced actions (optional, for space)
  • nextSequenceNumber() returns the next monotonic sequence number

📝 Notes: This is the bridge between local mutations and the sync system. Every repo that makes a mutation should call append() after its DB write.

📋 **CRUD operations for the client-side sync outbox.** 🎯 **Acceptance Criteria:** - [ ] append(action) adds a new action to the outbox - [ ] queryUnsynced() returns all actions where server_synced_at is NULL - [ ] markSynced(sequenceNumber) updates server_synced_at for an action - [ ] markAllSyncedUpTo(cursor) marks all actions up to a cursor position - [ ] purgeOldSynced(maxAge?) removes old synced actions (optional, for space) - [ ] nextSequenceNumber() returns the next monotonic sequence number 📝 **Notes:** This is the bridge between local mutations and the sync system. Every repo that makes a mutation should call append() after its DB write.
Sign in to join this conversation.
No description provided.