A real-world example of AI-generated code that looks correct locally but fails at the system level. A cleanup job to close old Slack group DMs was generated by AI without accounting for Slack's global rate limit of 1 request/second on the conversations.close endpoint. When run against hundreds of conversations, it hit the rate limit and took down the entire app. The AI's attempted fix made things worse by using a blocking sleep() in an async fiber context. The actual solution required human architectural judgment: moving the task to a 30-minute cron, gating it behind a default-off setting, writing a slow-drain script for existing customers, and capping the number of DMs closed per run.

2m read timeFrom code.dblock.org
Post cover image
Table of contents
Daniel Doubrovkine

Sort: