Sync / Editing server data

What each call does, and does not

  • ProductEdits.edited and .Edit are schemas: the Message's fields and a cell's stored edit. They describe; they hold nothing.
  • merge is pure: the edits with the changes laid over them, each cell's latest kept. It does no I/O and sends nothing; Sync.fact in update is what makes the Message durable and sends it.
  • The stamp runs on the server at commit, inside the journal. A client never sends at or by; the journal's validate refuses one that does, since its sender would show the edit as committed when it was not.
  • RemoteEdits.reconcile is pure: it brings Remote's overlays in line with the slice and returns the Model; Remote's reads, the grid's and any other view's, then draw each edit over its row. It sends nothing. It runs in afterUpdate, not in update: a durable Message is replayed through update on the server and in the replica, where it may change the slice alone.
  • settle is I/O: it runs apply for each committed change as a recovery intent. The effect ledger and the table are separate databases, so an intent may run twice after a crash; apply never moving a row back is what makes that harmless. applyEdits(binding) is that apply: one update setting the member's column (the binding's, never a name from the change) and the revision to the sequence, where the row's revision is at or below it.
  • None of this is a Remote mutation. Remote only reads the table.