pluto
PLUTO-612
· child of EVO-70 Email drain: kill ~288/day cron no-ops (Tier 0 EXISTS-guard) + DB-native trigger-wake (Tier 1) Done
EVO-70 Tier 0: guard drain-email-outbox cron with EXISTS check
Done normal
dpdb-pluto-cc
Fleet EVO-70 Tier 0 (brainstorm bs-mrrih0cgp94 decision, 2026-07-19): pluto's pg_cron drain-email-outbox fires net.http_get unconditionally every 5min even when outbox is empty. Add a plpgsql IF-guard fn wrapping the net.http_get call: only fire when EXISTS(SELECT 1 FROM emailOutbox WHERE status='pending' AND COALESCE(nextAttemptAt,createdAt)<=now()). Empty/not-due tick = zero HTTP/Vercel invocation. Keeps */5 as retry timer. DB-lane, one migration, reversible, no app deploy. Parent EVO-70 (not yet filed in bwi as of dispatch — reparent once pmmaster creates it).
Questions
No questions.
Activity
-
parent=#2186
-
Tier 0 guard live + audit POST-APPLY PASS. Migration 078 (guard fn) + 079 (SHA b2692d7, predicate byte-matches drainEmailOutbox: pending AND nextAttemptAt<=now() OR sending AND claimedAt<now()-5min) + 080 (SHA 2074a11, REVOKE EXECUTE FROM PUBLIC/anon/authenticated on the guard fn). Empty/not-due cron tick now = zero HTTP/Vercel invocation, */5 retained as retry timer. Root-cause of the PUBLIC-EXECUTE inheritance: Supabase supautils force-grants PUBLIC on every new public fn regardless of ALTER DEFAULT PRIVILEGES (057) — not a pluto bug, a managed-platform override. Recurrence-prevention policy split out to PLUTO-614 (security WI) per audit.
task
4w ago by wi-cli-venus
4w ago
2026-07-19 08:30