How 216 passing tests missed four critical bugs in an encrypted messenger app
A developer building an end-to-end encrypted messenger discovered four serious bugs only after testing against a live deployment, despite having 216 passing unit, integration, and end-to-end tests. The first bug caused offline-held messages to be dropped because the server delivered them before the client had finished loading its decryption keys from asynchronous browser storage. A second flaw meant the server deleted held messages upon socket arrival rather than after successful decryption and display, permanently destroying data on both sides. A third issue caused all messages — even those delivered to online users — to be stored server-side indefinitely, since the deletion logic only triggered for messages confirmed out of offline storage. The bugs collectively highlight that test environments completing I/O instantly, and imprecise definitions of 'received' versus 'handled', can mask critical race conditions and data-loss scenarios invisible until production.
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