Files
freno-dev/src/routes
Michael Freno 0b128f6639 nook: claim lifecycle sends so concurrent runs cannot double-mail
The lifecycle job marked rows with an unconditional UPDATE before
sending, so two overlapping invocations (cron tick + manual hit, or
retry) both passed the SELECT, both ran the UPDATE — re-writing the
same value — and both sent the same email. Real duplicates went out to
licensees. Rows are now claimed with a conditional UPDATE (... AND
asked_at IS NULL), and the send happens only when the claim reports
rowsAffected 1; a racing invocation claims nothing and sends nothing.

Tests: lifecycle suite gains a lost-claim case; 36 nook API tests pass.

Issue: FRE-11
2026-10-05 09:38:48 -04:00
..
2026-01-21 01:56:54 -05:00
2026-07-23 21:54:52 -04:00
2026-09-22 16:38:43 -04:00
2026-09-22 16:38:43 -04:00
2026-09-22 16:38:43 -04:00
2026-07-23 21:54:52 -04:00
2026-10-03 15:01:23 -04:00
2026-09-22 16:38:43 -04:00
2026-09-22 16:38:43 -04:00
2026-01-06 19:59:44 -05:00
2026-07-13 13:26:08 -04:00
2026-08-27 13:06:41 -04:00
2026-09-22 16:38:43 -04:00
2026-09-22 16:38:43 -04:00
2026-01-04 11:14:54 -05:00
2026-09-22 16:38:43 -04:00
2026-08-28 13:16:28 -04:00
2026-09-22 16:38:43 -04:00
2026-07-23 21:54:52 -04:00
2026-08-27 13:06:41 -04:00
2026-07-23 22:53:40 -04:00