A read-then-write counter on an eventually consistent store is not a rate limit
# against YOUR staging site,never someone else'sseq 1 50 | xargs -P 50 -I{} curl -s -o / dev/ null -w "%{http_code}\n" -X POST https: / / staging. yoursite. com/ api/ subscribe \ -H "Content-Type: application/ json" -H "Origin: https: / / staging. yoursite.com" \ -d '{"email": "x{}@example. com", "website": ""}' | sort | uniq -c
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
Watch the episode
The same idea in a short video. It plays here, and nothing loads until you press play
What is going on
Cloudflare KV, and most edge key-value stores, take up to about 60 seconds to propagate a write. A limiter that reads the count, compares, then writes the count back has a race the width of that window. Two hundred requests in the same second all read zero and all pass. The green "rate limited" badge is true only for a polite visitor.
Where it bit
Our own email capture shipped with this exact limiter: five per hour, as get, compare, put on KV. Same shape as the rate-limit-on-the-button mistake, one layer down: the limit lived on the server and still did not hold. It now sits behind an atomic edge limit, with the KV count kept only as a backstop.
The practice
Limits need an atomic counter: a Durable Object, Redis INCR with expiry, or the platform's own rate-limiting rule at the edge. Coarse KV limits are fine as a second layer, never the only one.
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