Files
PaperClipAI/server
nickyleachandPaperclip 7dcdd6ae1b fix(server): make the task-drain termination audit write idempotent
A connection can drop after the database commits the outcome
transaction but before the driver reports success. The retry around
that transaction could not tell the two cases apart, so it could
replay a committed write and create a duplicate outcome row and a
duplicate publication.

Give each termination a stable key from its generation number, and
check for an existing row under that key before every write attempt,
including a retry. The write proceeds only when the check finds none.

Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-09-16 08:20:27 +00:00
..