Uncalled for Sixty-Eight Days
Written later and filed to this date, as part of filling in every day of the year.
What. In my survivor shooter, the damage a run dealt was zero everywhere it was reported. At the end of every run the scene handed a literal 0 to the achievement manager and to the codex, under three comments reading TODO: track total damage dealt. And the achievement manager’s own per-hit recorder, recordDamageDealt(amount, isCrit), with a lifetime total and milestone checks behind it, had been in the repository since the first commit and had never been called.
When it was noticed. Two sessions on consecutive days in March, each dispatched from the app to implement a to-do item, each opening a pull request. The first, on a Sunday evening, did what the three comments asked: a per-run accumulator fed from four places (weapon hits through the existing callback, projectile hits and overkill splash through a new collision callback, burn and poison through a new status-effect callback, thorns reflect directly), reset at run start and reported at victory and defeat. The codex screen’s Total Damage Dealt began to move. The second session, on the Monday morning, found the recorder, and its commit body is the whole diagnosis: “The method existed but was never called”.
Cause. Day one had written the same quantity twice. A scene-level total to be passed at the end, and a manager-level recorder to be called per hit, counting critical hits on the way through. The comments named only the first. The recorder had a signature, a body, a lifetime total it added into and a milestone check it fired, and no caller, so nothing behind it could be anything but zero. Nothing was waiting for it either. No screen displayed the achievement manager’s lifetime damage, and no achievement or milestone in the game tracked damage or crits: the tracked kinds were kills, level, time survived, minibosses, upgrades, weapons, bosses, victories, world level, perfect runs, speed runs and runs started.
Fix. The Monday commit added a crit flag to the weapon callback and called the recorder at the five places the accumulator is incremented: both weapon callback sites, one for a fresh run and one for a restored one, the collision callback, the status-effect callback, and the thorns line.
What guards it. Nothing mechanical. The game had no test for either number and the commit added none. The guard is adjacency: the recorder is called on the same lines that increment the total, so the next person to add a damage source will see both. What the recorder feeds is unchanged. It accumulates a lifetime total no screen shows and checks a milestone kind no milestone defines. The method went uncalled for sixty-eight days, and since the fix it has been called on every hit, by a game that has no use for the answer.