Nice write-up, especially the source: 'local' marker. Three things that tend to bite this exact design later, in case they're useful:
- Deletes. With an upsert-only sync RPC, a task deleted on one device comes back the next time another device pushes its local copy. A soft-delete column (deleted_at) that syncs like any other field, plus a cleanup job later, avoids the "zombie tasks" problem.
- Row-level last-write-wins. If I tick a task done on my phone and rename it on my laptop before they sync, one of those edits is lost, because the whole row wins or loses. Per-field updated_at (or at least a separate timestamp for completed) fixes the most common case cheaply.
- Client clocks. updated_at comes from the device, so a phone with a wrong clock can win every conflict. Setting the timestamp on the server inside the RPC, or using a simple logical counter per task, makes the comparison reliable.
For position, fractional indexing (a string key between its neighbours) means a drag only writes one row instead of renumbering the column.
Disclosure: I build Focus 100, which is also local-first (tasks on the device, sync optional and end-to-end encrypted), so I've been thinking about the same tradeoffs.