๐—›๐—ถ๐˜€ ๐—ง๐—ผ๐—ฑ๐—ฎ๐˜† ๐—ช๐—ฎ๐˜€ ๐—ฌ๐—ฒ๐˜€๐˜๐—ฒ๐—ฟ๐—ฑ๐—ฎ๐˜†

A timezone bug recently broke our booking platform.

A venue in Australia saw its activity list disappear when users clicked a card. I could not reproduce the bug from the US. This suggested a date or timezone issue.

I used Claude to help. It identified that the venue was in Australia. It guessed the timezone caused the error. It was right.

The problem was our logic for past days. A US user looking at an Australian venue was looking at the venue's yesterday. Our code excluded all activities from past days. This caused the UI to crash or disappear.

I had to fix this without changing how past days behave. I could not risk a large blast radius.

My solution:

I used unit tests to confirm the fix. I forced the AI to create a failing test first, then a passing one.

Two lessons from this:

  1. AI needs limits. Claude found the cause, but it did not see the architectural flaw. AI does not understand how different layers of your system interact unless you tell it.

  2. Control your blast radius. Never make a change that affects more than you can reason about. Small, specific fixes help you sleep at night.

I also noticed our code for fetching availability is messy. I should refactor it to be more efficient. However, I will not refactor just because the code looks bad. I will wait until a new bug or a product requirement forces the change. Refactoring based on emotion alone causes outages.

Source: https://dev.to/maxymlyskov/his-today-was-yesterday-a-timezone-bug-a-blast-radius-and-what-ai-missed-2c3i

Optional learning community: https://t.me/GyaanSetuAi