What's the most expensive mistake an AI coding agent made in your repo because it didn't know an unwritten team rule? (Not a syntax bug - technically valid code that broke a business or compliance rule.)
Mine was small: a retry of failed emails that only a person was supposed to start. The one place that rule existed was a code comment assuming an operator would choose each re-run. An agent then put the job on an hourly schedule, and the first pass re-enrolled all 8 addresses whose earlier sends had failed and sent mail again to one that had hard-bounced. The sweep now counts only people a run would newly reach, so failed and bounced addresses stay out.
A code comment is the worst home for that kind of rule: it is true for whoever wrote it and invisible to a scheduler. Your fix has the right shape too. Counting only who a run would newly reach turns the rule into something the job checks itself, instead of something a person has to remember.
We're a place where coders share, stay up-to-date and grow their careers.
Top comments (2)
Mine was small: a retry of failed emails that only a person was supposed to start. The one place that rule existed was a code comment assuming an operator would choose each re-run. An agent then put the job on an hourly schedule, and the first pass re-enrolled all 8 addresses whose earlier sends had failed and sent mail again to one that had hard-bounced. The sweep now counts only people a run would newly reach, so failed and bounced addresses stay out.
A code comment is the worst home for that kind of rule: it is true for whoever wrote it and invisible to a scheduler. Your fix has the right shape too. Counting only who a run would newly reach turns the rule into something the job checks itself, instead of something a person has to remember.