GeezerVison is showing github.com — fix(quota): reject out-of-range reset times by dezren39 · Pull Request #9033 · developing-today/code
Conversation
dezren39
commented
Nov 12, 2026
•
edited by coderabbitai
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Summary
- Reject invalid hour/minute components before Date.UTC normalizes provider reset times.
- Cover minute 60/99 and hour 24 failures plus valid 23:59 across Codex, OpenCode Go, and Command Code extractors.
- Preserve percentage windows and existing date roll-forward behavior.
Fixes #9003
Verification
bun test test/quota.test.ts (pm-stack/aggregator): 31 pass.
git diff --check: pass.
- Full aggregator suite attempted; environment lacks
web-push in this worktree and unrelated tests failed/timed out.
![Autofix with [code]smith](/api/image?u=https%3A%2F%2Fcamo.githubusercontent.com%2F33b6f70f3541c4e93f4503d29cbfec051fa1b040d8e0ae9313a51c4ece44a627%2F68747470733a2f2f70722d636f6d6d656e74732d6173736574732e626c61636b736d6974682e73682f636f6465736d6974682f6175746f6669782d776974682d636f6465736d6974682d6461726b2d33782e706e67)
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Summary by CodeRabbit
- Bug Fixes
- Invalid quota reset times are now rejected, including hours above 23 and minutes above 59. Valid reset times, including 23:59, continue to produce the expected UTC reset timestamp.
- Month-based quota resets now handle month names regardless of capitalization and reject invalid month names or dates.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
chatgpt-codex-connector[bot] reacted with thumbs up emoji
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
| Review |
Status |
Commit |
Review trigger |
| 📝 Code Review |
✅ Completed 2026-11-12T21:11:39.772859Z |
9b9c5cb |
PR opened |
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review" or "@codex security review".
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Nov 12, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

No actionable comments were generated in the recent review.
Walkthrough
-
The monthly quota reset parser now rejects non-integer or out-of-range hours and minutes. Tests cover valid and invalid reset times across ChatGPT, OpenCode Go, and Command Code.
Changes: Quota reset time validation
| Layer / File(s) |
Summary |
Validate monthly reset times pm-stack/aggregator/src/quota-extract.ts, pm-stack/aggregator/test/quota.test.ts |
monthDayTime returns null for invalid hours or minutes. Tests cover out-of-range values, the valid 23:59 boundary, and existing quota windows across the three consumers. |
Estimated code review effort: 2 (Simple) | ~8 minutes
Change: Bug fix · Severity of issue fixed: Low
Merge Risk: Minimal · up to 9b9c5
-
Quota reset times with out-of-range hours or minutes are now rejected instead of being silently rolled into a different time. Valid times are unchanged, and no merge-blocking risk remains.
Pre-merge checks: 4
-
| Check name |
Status |
Explanation |
| Description Check |
 |
Check skipped - CodeRabbit’s high-level summary is enabled. |
| Title check |
 |
The title "fix(quota): reject out-of-range reset times" names the main change. The raw summary and objectives confirm that monthDayTime now returns null for hours above 23 or minutes above 59, with re… |
| Linked Issues check |
 |
Issue #9003 requires monthDayTime to return null for out-of-range time-of-day values (hour > 23 or minute > 59) at all three call sites (Codex, OpenCode Go, Command Code), while keeping the window per… |
| Out of Scope Changes check |
 |
Both changed files are in scope. The source change is a single validation guard inside monthDayTime, which is the function named in #9003. No other extractor logic or parsing regex is modified. The te… |
Full details: Title check
-
Explanation
The title "fix(quota): reject out-of-range reset times" names the main change. The raw summary and objectives confirm that monthDayTime now returns null for hours above 23 or minutes above 59, with regression tests for those cases. The title is specific and short, and it matches the changeset.
Full details: Linked Issues check
-
Explanation
Issue #9003 requires monthDayTime to return null for out-of-range time-of-day values (hour > 23 or minute > 59) at all three call sites (Codex, OpenCode Go, Command Code), while keeping the window percentage and other fields. The diff adds one guard in monthDayTime in pm-stack/aggregator/src/quota-extract.ts, after the hh:mm split and before Date.UTC: if (!Number.isInteger(h) || h < 0 || h > 23 || !Number.isInteger(m) || m < 0 || m > 59) return null;. Because all three extractors call this shared function, the guard covers each call site. The guard runs before the date construction, so minute 60 and 99 (no midnight rollover) and hour 24 are rejected directly, not only by the day-roll side effect. Regression tests in pm-stack/aggregator/test/quota.test.ts run the existing three-consumer matrix and add cases for 18:60 (null), 18:99 (null), 24:00 (null), and 23:59 (expected 2026-10-30T23:59:00.000Z). The existing month-case, Foo 30, and Oct 39 cases remain in the matrix, and the 18:01 control is kept. The issue's acceptance criteria are covered by this change.
Full details: Out of Scope Changes check
-
Explanation
Both changed files are in scope. The source change is a single validation guard inside monthDayTime, which is the function named in #9003. No other extractor logic or parsing regex is modified. The test changes parameterize the existing consumer matrix with a time field and add the invalid and boundary time cases required by #9003. The test file diff contains no unrelated changes. The guard is only a validation addition, so the valid-time, month-case, unknown-month, out-of-range-day, and roll-forward paths are unchanged in behavior. Existing test results are taken from the PR description; this assessment did not run the tests.
Finishing Touches
-
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Share
-
Recent review info
-
Run configuration
-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: defaults
- Review profile: CHILL
- Plan: Advanced
- Run ID:
96f84231-ef36-4bed-aeff-f3e389290281
Commits
-
Reviewing files that changed from the base of the PR and between 8064969 and 9b9c5cb.
Files selected for processing: 2
-
pm-stack/aggregator/src/quota-extract.ts
pm-stack/aggregator/test/quota.test.ts
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|