Stop leaking exact quota numbers from GET /api/account #1

Closed
opened 2026-03-10 14:40:53 +03:00 by sirily · 1 comment
Owner

Problem
GET /api/account currently returns usedSuccessfulRequests and monthlyRequestLimit to normal users via packages/db/src/account-store.ts and apps/web/src/main.ts.

Why this matters
The product contract is explicit: normal users should only see approximate quota buckets (100/80/60/40/20/0). Exact usage should stay admin-only.

Acceptance criteria

  • Normal user account responses expose only the approximate bucket.
  • Exact usage remains available only on admin surfaces.
  • Add regression coverage for the approximate quota display contract.
Problem `GET /api/account` currently returns `usedSuccessfulRequests` and `monthlyRequestLimit` to normal users via `packages/db/src/account-store.ts` and `apps/web/src/main.ts`. Why this matters The product contract is explicit: normal users should only see approximate quota buckets (`100/80/60/40/20/0`). Exact usage should stay admin-only. Acceptance criteria - Normal user account responses expose only the approximate bucket. - Exact usage remains available only on admin surfaces. - Add regression coverage for the approximate quota display contract.
Author
Owner

Linked implementation PR: #16 (#16). This issue will be closed automatically on merge via Closes #1 in PR body.

Linked implementation PR: #16 (http://git.shararam.party/sirily/nroxy/pulls/16). This issue will be closed automatically on merge via `Closes #1` in PR body.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sirily/nroxy#1