Developer's database optimization silently broke the core feature of his fitness app

A developer building WhyRep, a strength-training analysis app, introduced a database read limit to improve performance and shipped it with five passing tests and detailed code documentation. The optimization was based on careful reasoning about the app's plateau-detection rules, which track consecutive missed progression sessions rather than calendar time. However, the bound failed to account for 'no-verdict' sessions — workouts that neither confirm progress nor a miss — which the streak counter silently skips without resetting. As a result, lifters who correctly deloaded during a stall fell outside the data window, causing the app to stop detecting their plateaus entirely with no crash, error, or log entry. The bug highlighted how a logically documented, well-tested optimization can still be wrong in ways that only surface through specific real-world usage patterns.
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