# fix\(usage\): preserve quotas with malformed reset metadata \(\#224\) · lucenx/codexbar-plasma

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

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

Visibility: public

Requested revision: a523643b8a89079886eb3494a85a09d1f85b5941

Requested commit: a523643b8a89079886eb3494a85a09d1f85b5941

Commit: a523643b8a89079886eb3494a85a09d1f85b5941

Tree: 0f5dbd476f83946af01a9ea05c0a9e5393b96a01

Author: Simone

Committer: GitHub

## Message

```
fix(usage): preserve quotas with malformed reset metadata (#224)

* test(usage): reproduce quota loss on malformed reset metadata

* fix(usage): preserve quotas with malformed reset metadata

Harden resetText against structured resetsAt values: only strings and
numbers reach the date parser, anything else degrades to no reset text
instead of throwing inside ToPrimitive and discarding the provider.

* test(usage): assert hardened reset wiring in UI regressions

The resetText static check now requires the structured-input guard ahead
of the date parse, keeping the countdown-from-timestamp intent while
locking the malformed-metadata hardening.
```

## Parents

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

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