General editorial guide prepared with AI assistance. Examples are hypothetical; implementation depends on project requirements and qualified review.
Decision and problem
Offline work can save a change before server confirmation. Without a durable queue, or by removing an entry before acknowledgment, the change may be lost. Retrying without a stable operation ID may duplicate it.
Designing the solution
Persist the record and its outbox event in one local transaction. Send the operation ID and base version; enforce atomic deduplication on the server. Pull through a stable cursor and pages, and flag sensitive conflicts instead of blindly using last-write-wins.
Practical acceptance test
Test two offline devices editing the same record, disconnect after server persistence before acknowledgment, and deletion on another device. Replicas should converge under a documented policy without loss or duplication.
