I built a PTO tracker in February. Single HTML file, deployed to Netlify, no backend. It showed my accrual balance, projected what I’d have at the end of the year, let me book time off and see the running total. I deployed it and it looked right.
I came back in October to add features, a batch I’d been meaning to get to: semi-monthly pay periods, a holiday checklist I could edit myself, booking lock that counts future earnings before you commit days off. While I was in there, I asked for a full assessment.
The “no cap” setting was stored as 9999 instead of null. Cap-aware math was running against a 9,999-day ceiling instead of no ceiling at all. Nothing would visibly fail because nobody accrues 9,999 PTO days, but every cap-aware calculation was wrong by design.
The next pay period start was computed by adding a month to the last end date. If your last period ended on the 31st, the app would try to land on the following month’s 31st. February doesn’t have one. Silently wrong reference point, skewed projections from there on out.
Day boundaries were calculated at midnight UTC. That’s 5 PM Pacific. Any date entered near that window resolves to the wrong day. The What-If forecast, which I used the most, was committing bookings at the wrong dates.
None of this produced an error. The numbers looked plausible. The app never crashed. The way to find them was to trace every calculation path and test the conditions I had never brought to it myself.
I added 79 Playwright tests after the fixes, locking the corrected behavior. I should have written them before I decided I could trust the math.
If I could go back to February, I’d build the tests alongside the first feature, not eight months later after eight defects proved they were needed.