two simultaneous requests with the same conversation_id both rehydrate the same item_ids snapshot, both infer, both persist. The second persist overwrites — first request's items get lost from the ordered list.
Not a bug today (single-user, low concurrency). Worth a TODO for when multi-user or high-concurrency scenarios arise. Options: optimistic locking (version column), or append-only with conflict detection.
Originally posted by @ashwing in #48 (comment)
two simultaneous requests with the same
conversation_idboth rehydrate the sameitem_idssnapshot, both infer, both persist. The secondpersistoverwrites — first request's items get lost from the ordered list.Not a bug today (single-user, low concurrency). Worth a TODO for when multi-user or high-concurrency scenarios arise. Options: optimistic locking (version column), or append-only with conflict detection.
Originally posted by @ashwing in #48 (comment)