Skip to content

fix(server): keep a failed usage probe marked when a sparse update lands - #4

Closed
macodev00 wants to merge 1 commit into
mainfrom
cursor/keep-probe-failed-usage-limits-fa82
Closed

macodev00 wants to merge 1 commit into
mainfrom
cursor/keep-probe-failed-usage-limits-fa82

Conversation

@macodev00

@macodev00 macodev00 commented Sep 20, 2026 •

Copy link
Copy Markdown
Owner

What Changed

Fixes pingdotgg#12170.

applyUsageLimitsUpdate now copies unavailable onto the rebuilt snapshot the same way it already copies resetCredits. A sparse rate_limit_event merged onto probeFailed or onto no previous snapshot stays marked incomplete instead of publishing as a one-window complete list. Unchanged updates keep the previous object (so a probeFailed no-op no longer rebuilds and strips the marker). unsupported is still rejected.

resolveUsageLimitsAfterProbe is unchanged: a snapshot that still has unavailable is not last-good, so a later failed probe does not keep weekly-only as complete. Cache hydration and a partial UI reason are out of scope.

Why

After a failed (or missing) usage probe, Claude's one-window rate_limit_event was upserted onto [] and rebuilt without unavailable. Clients treated that as a full read and drew only the weekly bar; the next failed probe kept it because the marker was gone.

pingdotgg#12294 landed the same merge fix and was closed against the V2 provider rewrite. The hole is still on main; this is the triage's small server bugfix, not a new limits protocol and not blocked on pingdotgg#10597.

UI Changes

No new UI. While the marker stays on, Limits keeps showing "Could not read limits." instead of a false weekly-only card. Screenshots/video not applicable.

Tests

vp test run src/provider/providerUsageLimits.test.ts src/provider/makeManagedServerProvider.test.ts in apps/server: 19 passed, including the new merge/probeFailed regressions and the existing "keeps live usage windows across a failed probe". Lint and format clean on the two files.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes
Open in Web Open in Cursor 

A rate_limit_event after a failed or missing probe was rebuilt as a complete
one-window list. Copy unavailable onto the merge the same way resetCredits is
copied so the snapshot stays incomplete until a successful probe replaces it.
@macodev00

Copy link
Copy Markdown
Owner Author

Superseded by upstream pingdotgg#12700

@macodev00 macodev00 closed this Sep 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Claude usage limits: a rate_limit_event after a failed probe is published as a complete window list

1 participant