You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(billing): address review feedback on BillingUsage model
- Validate organizationId in increment(), sanitize counter key against injection
- Handle E11000 duplicate key race on concurrent upserts (retry once)
- Add runValidators to reset() for consistency with increment()
- Tighten month regex to reject invalid months (00, 13)
- Use UTC for currentMonth() to avoid timezone-dependent boundaries
- Capture month once in get() to prevent cross-boundary inconsistency
- Remove redundant individual index on organizationId (compound covers it)
- Add missing Jest globals imports in test file
- Add tests for semantically invalid month values
0 commit comments