Skip to content

Fix OpenAI dashboard reset-line parser for Wednesday and Saturday#1080

Merged
steipete merged 2 commits into
steipete:mainfrom
m1qaweb:fix/openai-dashboard-weekday-regex
May 21, 2026
Merged

Fix OpenAI dashboard reset-line parser for Wednesday and Saturday#1080
steipete merged 2 commits into
steipete:mainfrom
m1qaweb:fix/openai-dashboard-weekday-regex

Conversation

@m1qaweb
Copy link
Copy Markdown
Contributor

@m1qaweb m1qaweb commented May 21, 2026

OpenAIDashboardParser.weekdayMatch used the regex
"\b(mon|tue|tues|wed|thu|thur|thurs|fri|sat|sun)(day)?\b" which relies on + optional "day" reproducing the full weekday name. That holds for monday/tuesday/thursday/friday/sunday (the layered "tue|tues" and "thu|thur|thurs" alternatives cover the longer ones), but "wed"+"day"="wedday" and "sat"+"day"="satday" — so "Wednesday" and "Saturday" in reset strings produced no match. parseResetDate then fell through to format-string parsing which can't recover bare weekday text either, dropping the reset time silently on 2 of every 7 days.

Add "wednes" and "satur" alongside the existing alternatives, mirroring the same progressive-abbreviation pattern. New TestsLinux suite sweeps all seven full weekday names plus dedicated lowercase Wed/Sat regressions through the public parseRateLimits API; the parameterized test surfaces both regressions on master and goes green with the fix.

m1qaweb and others added 2 commits May 21, 2026 17:26
OpenAIDashboardParser.weekdayMatch used the regex
"\b(mon|tue|tues|wed|thu|thur|thurs|fri|sat|sun)(day)?\b" which relies on
<abbrev> + optional "day" reproducing the full weekday name. That holds for
monday/tuesday/thursday/friday/sunday (the layered "tue|tues" and
"thu|thur|thurs" alternatives cover the longer ones), but "wed"+"day"="wedday"
and "sat"+"day"="satday" — so "Wednesday" and "Saturday" in reset strings
produced no match. parseResetDate then fell through to format-string parsing
which can't recover bare weekday text either, dropping the reset time
silently on 2 of every 7 days.

Add "wednes" and "satur" alongside the existing alternatives, mirroring
the same progressive-abbreviation pattern. New TestsLinux suite sweeps all
seven full weekday names plus dedicated lowercase Wed/Sat regressions through
the public parseRateLimits API; the parameterized test surfaces both
regressions on master and goes green with the fix.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@steipete steipete force-pushed the fix/openai-dashboard-weekday-regex branch from 74719ef to 807982f Compare May 21, 2026 16:29
@steipete steipete merged commit 95dabbd into steipete:main May 21, 2026
4 checks 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.

2 participants