# fix\(usage\): preserve quotas with malformed provider names \(\#233\) · lucenx/codexbar-plasma

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

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

Visibility: public

Requested revision: 7520ef1616ba6328c2a64320f4419b54a9e46ee0

Requested commit: 7520ef1616ba6328c2a64320f4419b54a9e46ee0

Commit: 7520ef1616ba6328c2a64320f4419b54a9e46ee0

Tree: 12e81ac931389e1076179db7d423e7ddeb2c2af7

Author: Simone

Committer: GitHub

## Message

```
fix(usage): preserve quotas with malformed provider names (#233)

* test(usage): reproduce quota loss from malformed provider names

* fix(usage): preserve quotas with malformed provider names

Harden optional display-name handling against structured CLI values:
only truthy scalars win the display-name fallback chain, and only
scalars reach String() in providerTitle(). A malformed displayName or
title now degrades to the bundled provider name instead of throwing
inside ToPrimitive and discarding the whole provider snapshot.

Tests: test_provider_title_metadata (10 pass), make check OK.
```

## Parents

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

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