All 236 Tests Passed Locally, Yet the Release Was Broken — Here's Why
A developer maintaining a Claude Code notification tool fixed a timezone bug, saw all 236 local tests pass, but discovered the release was broken only after pushing to CI. The root cause was that both the code and the tests silently assumed the host machine's local timezone — Asia/Hong_Kong — which matched the embedded timezone in the data, making errors invisible locally. When CI ran on a UTC-based Ubuntu runner, the symmetry broke and exposed not just the original bug but two additional hidden flaws in the test logic itself. The tests had effectively been verifying that a value equalled itself, not that the timezone logic was correct, meaning they could never fail regardless of the underlying bug. The incident highlights how a fully green local test suite can be misleading when tests share the same flawed assumption as the code they are meant to validate.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in