fix(costs): avoid overflow in daily averages (#576)

* fix(costs): avoid overflow in daily averages

Use an incremental nonnegative mean so finite daily amounts cannot overflow their intermediate sum. Add a direct regression for cost and token averages, missing days and zero days. Update usage, cost-history and Unreleased documentation; TODO parity work is unaffected. Verified with make check, with local optional KDE module skips and partial Plasma type coverage.

* fix(costs): preserve ordinary average rounding

Keep the original sum/count result whenever the sum is finite, using the incremental mean only on overflow. Reproduced the review case where [803, 136, 8, 19] displayed 241 instead of 242; both input orders now have a direct regression. Update the cost-history guide. The existing changelog entry and TODO scope remain accurate. All 186 focused QtTests and make check pass, with the same optional KDE coverage limits.
8826e05cc6Simone committed on 10/21/2026, 12:35:32 AM· committed by GitHubparentccd6793

Checks

All checks passed
5 files changedLine totals unavailable