mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-25 09:41:04 +01:00
The dedup key for the termination outcome row used the in-memory drain generation number. That counter resets to 0 on every server restart, so a new termination could reuse a generation number an old activity row already held from before the restart, and the write would then skip as a false duplicate. Mint a UUID when the termination is armed and use it as the key instead; the generation number still guards the in-memory timer race it was built for. Co-authored-by: Paperclip <noreply@paperclip.ing>