Skip to content

bug(quota): free monthly resets skip limit warm-up #1548

Description

@HulianBuligon

What happened?

Free plans expose their long quota as a monthly window, but the background reset-confirmed warm-up path only received secondary usage rows. When usage refresh recorded an exhausted-to-reset monthly transition, the opted-in warm-up was therefore skipped.

Expected behavior

When long-window limit warm-up is enabled for a free-plan account, a confirmed monthly quota reset should send at most one warm-up request and persist the attempt with window="monthly".

Reproduction

  1. Enable limit warm-up globally and for a free-plan account.
  2. Select long-window warm-up.
  3. Record an exhausted monthly usage sample.
  4. Run background usage refresh so it records an available monthly sample with a later reset_at.
  5. Observe that no monthly warm-up attempt is created.

Safety constraint

If there is no previous monthly sample (for example, immediately after a paid-to-free plan transition), a stale secondary sample must not be compared with the first monthly sample as if one quota window reset.

Tracking

Fix proposed in #1504.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions