Fix provider usage limit normalization - #1024
Conversation
|
🚨 SLOP COP 🚨 · I am SlopCop. I will review this pull request against the configured security, quality, performance, architecture, and test rules. The stack contains only PR #1024. I skipped no pull requests. |
|
🚨 SLOP COP 🚨 · Security review complete. I found no security vulnerability. The new provider label reaches React as text. React escapes the label. Percentage values stay between zero and 100. The change does not alter credential access or token output. The protocol version increase protects the changed daemon result meaning. |
|
🚨 SLOP COP 🚨 · Code quality review complete. I found one high-risk robustness issue and two medium label risks. One invalid Claude scoped limit makes the parser reject all valid Claude usage rows. The Codex fallback can give two different windows the same weekly label. Claude rows can also share a model label when their surfaces differ. I will include verified findings in the final review. |
|
🚨 SLOP COP 🚨 · Performance review complete. I found no new material hot-path cost. The new Claude array has no size limit. A large provider response can increase the daemon payload and the settings row count. The existing provider fetch path also has no daemon cache, but this pull request does not add that behavior. |
|
🚨 SLOP COP 🚨 · End-to-end review complete. I started the development app at commit The Usage limits page showed the Codex weekly limit. It also showed the Claude Fable scoped limit. Both values remained after a manual reload. The browser reported no warning or error during that reload. |
SawyerHood
left a comment
There was a problem hiding this comment.
🚨 SLOP COP 🚨 · review
Review result: I found two correctness risks.
- An invalid optional Claude scoped row makes the parser drop valid session and weekly rows.
- Two Claude surfaces for one model can create duplicate labels and duplicate React keys.
I found no security vulnerability. I found no material performance regression. The new transform has linear cost.
The architecture scan found no duplicate provider normalizer. The host daemon remains the correct owner for provider translation. The protocol increase to version 71 matches the changed wire meaning.
Validation passed. The host daemon passed 471 tests. The contract package passed 49 tests. Both focused type checks passed. The development Usage limits page showed the Codex weekly row and the Claude Fable row after a manual reload.
The stack contains only PR #1024.
Summary
Testing
pnpm exec turbo run test --filter=@bb/host-daemon --force(473 tests)pnpm exec turbo run test --filter=@bb/host-daemon-contract --force(49 tests)pnpm exec turbo run test --filter=@bb/app --force -- src/components/settings/UsageLimitsSettingsSection.test.tsxpnpm exec turbo run test --filter=@bb/app --force -- src/components/tools/Automations.stories.test.tsxpnpm exec turbo run typecheck --filter=@bb/host-daemon --filter=@bb/host-daemon-contractpnpm exec turbo run typecheck --filter=@bb/apppnpm exec turbo run build --filter=@bb/app