Skip to content

fix(oauth): accept weekly-only official usage responses - #847

Open
Zrzzzz wants to merge 1 commit into
dofastted:mainfrom
Zrzzzz:fix/weekly-only-oauth-usage
Open

Zrzzzz wants to merge 1 commit into
dofastted:mainfrom
Zrzzzz:fix/weekly-only-oauth-usage

Conversation

@Zrzzzz

@Zrzzzz Zrzzzz commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Official OAuth usage can return HTTP 200 with five_hour: null, a valid seven_day window, and a weekly-only limits catalog. isCompleteOAuthUsage currently rejects this response, so callers receive limits_present: false even though official weekly usage is available.

Allow an absent or null session window while still requiring a readable weekly window and the existing usage metadata checks. A supplied but unreadable session window remains invalid. Missing session usage stays null; no usage value or reset time is fabricated.

Regression coverage includes null and omitted session windows, the existing two-window response, malformed session data, missing weekly usage, and empty responses.

Validation: 35 tests passed across crs-usage-probe, usage-interpret, and usage-probe-monitor; Biome formatting and git diff --check passed.

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.

1 participant