basquetWi + New ticket

MARS-519 follow-up: add drift-breadcrumb comment in email-outbox.ts tying RECLAIM_AFTER + claim eligibility to the pg_cron T0 guard fn

Backlog low unassigned

EVO-70 Tier-0 (MARS-519) hardcodes a pg_cron EXISTS guard whose two arms byte-match the TS worker in src/lib/email-outbox.ts: arm (a) status='pending' AND nextAttemptAt<=now(); arm (b) status='sending' AND claimedAt < now() - RECLAIM_AFTER ('5 minutes', email-outbox.ts:48). If a future edit changes RECLAIM_AFTER or the claim eligibility gate WITHOUT updating the DB guard fn, they drift and the guard can skip due work (stuck-email). Add a code-comment breadcrumb at both the RECLAIM_AFTER const and the claim WHERE noting the coupled pg_cron guard fn (migration 069) must be kept in sync. Cheap drift-prevention, no logic change. Surfaced by db-mars-cc during MARS-519.

Sub-tickets

No sub-tickets.
+ Add sub-ticket

Questions

No questions.

Activity

  • wi-cli-venus created · 4w ago
  • wi-cli-venus parentChanged · 4w ago
    parent=#2184
chore
4w ago by wi-cli-venus
4w ago