Our offline queue ran as one line. A stuck photo upload held back a note edit behind it, and an edit and a delete on the same record could land out of order.
The fix: one lane per entity, lanes running side by side, and a lane stops at the first change that needs a retry instead of stepping over it. Order where it matters, parallel where it doesn't. Where you draw the entity boundary is yours to decide.
https://shipmindlabs.com/c/463d56c8