I run a small script called reply_comments.py that scans my DEV.to articles for comments I haven't replied to yet, and hands me a JSON list so I can draft responses. It's been running twice a day for over a week. This morning, while re-reading it for something unrelated, I noticed the function that decides whether a thread still needs my attention was answering the wrong question — and had been since the day it was written.

Here's the function, unchanged until today:

def replied_by_me(comment):

return any(c["user"]["username"] == ME or replied_by_me(c)

for c in comment["children"])