0.6.0Release

Sync engine

Sync engine — 0.6.0

This release ships the core sync infrastructure.

What's new

  • 4-phase write invariant: validate → optimistic UI → atomic persist → push
  • Dead-letter queue for mutations that fail more than 3 times
  • Offline queue — writes while offline push automatically on reconnect
  • Idempotent push via UUIDv7 mutation keys

Improvements

  • Automatic rollback on push failure with pre-write snapshot

The 4-phase write invariant

Every write goes through four phases. If any phase fails, previous phases roll back automatically:

  1. Validate — Zod schema validation before touching storage
  2. Optimistic update — Zustand update for instant UI
  3. Atomic persist — IndexedDB transaction (entity + mutation record together)
  4. Push — Queue the mutation for server sync