# fix\(insights\): omit overflowing weekly comparisons from the snapshot \(\#362\) · lucenx/codexbar-plasma

[View on GitCafe](https://git.cafe/lucenx/codexbar-plasma/commit/09ee7a6cdd9029dc448a93dbef212ef42496bb23)

Repository: [lucenx/codexbar-plasma](https://git.cafe/lucenx/codexbar-plasma)

Visibility: public

Requested revision: 09ee7a6cdd9029dc448a93dbef212ef42496bb23

Requested commit: 09ee7a6cdd9029dc448a93dbef212ef42496bb23

Commit: 09ee7a6cdd9029dc448a93dbef212ef42496bb23

Tree: 7bb7be4f0ee4dffd1aa5a27e4697f59814209c52

Author: Simone

Committer: GitHub

## Message

```
fix(insights): omit overflowing weekly comparisons from the snapshot (#362)

periods() summed unbounded finite daily costs, so 7x1e308 overflowed to Infinity and JSON.stringify emitted null amounts with sufficient:true. Check each accumulation step and the cent rounding for finiteness, returning null (no comparison) on overflow, following the QuotaWindowCost.js precedent; omit only an unrepresentable change while keeping honest finite sums.
```

## Parents

- [ff3d4789da8cb554d6757d7c11fa9ec727371c55](https://git.cafe/lucenx/codexbar-plasma/commit/ff3d4789da8cb554d6757d7c11fa9ec727371c55?format=markdown)

[Source at this commit](https://git.cafe/lucenx/codexbar-plasma/tree/09ee7a6cdd9029dc448a93dbef212ef42496bb23?format=markdown)
