Why a write-ahead log instead of last-write-wins on the row?
Last-write-wins needs a server present at write time to decide who won. There is no server present: No internet at the field. Sync only at office, home or town. A technician walks a whole Club, then uploads hours later, and the batch that arrives second is not the walk that happened second.
More to the point, the thing in dispute is an area that money settles on. Overwriting one of two disagreeing measurements is not conflict resolution, it is data loss with a timestamp for an excuse. So the log appends, the database keeps one accepted capture per plot and stage, and the second one is stored with status 'conflicted' rather than discarded. Both sides stay on the record and a person decides.
Try itForce the two-technician case below, then read what each resolution does to the losing capture.
outbox.ts enqueue / drain, and the partial unique index captures_active_stage_uq