Every write that can be retried must be idempotent
stripe trigger payment_intent.succeeded # then resend the same event from the dashboard# expect one row, not two; expect 400 for a forged signature
Get the free fixes for code AI gets wrong
Each one shows what the AI wrote, what it should have written, and how to check your own app
What is going on
Platforms retry on your behalf: Stripe redelivers a webhook for up to three days, Slack resends if you do not answer in three seconds, Vercel can fire the same cron twice or start a second instance while the first runs. A handler that charges, sends, or deploys once per delivery will do it twice.
Where it bit
The lead-gen cron ran wrangler pages deploy unconditionally on every tick, with the wrangler account cache committed to the repo. Fixed with a token guard and by untracking the cache. In the research: two PaymentIntents four seconds apart for the same customer is the canonical receipt.
The practice
Acknowledge fast, queue the work, and put a UNIQUE constraint on the event id (evt_, update_id, the Slack event id). Send an Idempotency-Key per order on every Stripe POST. Deploys and jobs take a lock (flock -n, Redis SET NX, pg_advisory_lock).
Get this check as a script you can run tonight

Make your coding agent prove it didn't cheat
Coding agents special-case, skip or edit tests so the check goes green. A five-sentence prompt Anthropic tested took Claude Opus 4 from cheating in 47% of runs to 5%- 3 min read
How to pick who fixes your vibe-coded app
Your app was built fast with AI and now something is wrong. Here is who can fix it, what they should do before they quote, the questions to ask and the red flags to walk away from - 3 min read
What an app check covers
An app check is an engineer reading the app your AI tools wrote, ranking what will break and writing the fix for each problem. Here is every area it covers, how the five days run and what you keep at the end
If this check came back with more than you expected, that is worth a conversation