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-07-23 22:53:40 -04:00
2026-10-03 15:01:23 -04:00
2026-09-05 16:06:27 -04:00
2026-09-06 13:53:49 -04:00
2026-10-03 11:04:37 -04:00
2025-12-17 13:51:13 -05:00
2025-12-16 22:42:05 -05:00
Description
No description provided
152 MiB
Languages
TypeScript 63.2%
JavaScript 34.9%
CSS 1.2%
HTML 0.4%
Shell 0.3%