feat(routing): choose quota window for earlier reset#644
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8193eed39e
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
To use Codex here, create a Codex account and connect to github. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 461c5e9a2e
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
e6485d6 to
746b1a5
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9e4e503419
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6f759e6451
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
|
Codex Review: Didn't find any major issues. You're on a roll. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
Closing this as superseded by #795, which rebases and repairs this reset-window routing preference work on current #795 is clean/mergeable and has the current CI/Codex evidence; keeping this old conflicted branch open would duplicate the same feature surface. |
Summary
Adds a configurable reset window for the existing "Prefer earlier reset" routing behavior. Operators can now choose whether earlier-reset routing is driven by the primary 5-hour quota window or the secondary weekly quota window. The default remains the weekly quota window to preserve existing behavior.
Why
The previous implementation always prioritized the secondary reset window. This keeps that default behavior while allowing operators to opt into the primary 5-hour window when that is the tighter operational constraint.
Changes
prefer_earlier_reset_windowin dashboard settings with a migration and API/schema support.5h quotavsWeekly quotaand update the status bar label.Validation
.venv/bin/pytest tests/unit/test_load_balancer.py tests/integration/test_settings_api.py -qPATH="/opt/homebrew/bin:$PATH" ./node_modules/.bin/vitest run src/features/settings/schemas.test.ts src/features/settings/components/routing-settings.test.tsx src/features/settings/hooks/use-settings.test.ts src/features/settings/components/totp-settings.test.tsx src/features/settings/components/session-settings.test.tsxPATH="/opt/homebrew/bin:$PATH" ./node_modules/.bin/tsc -bpython -m app.db.migrate --db-url <tmp sqlite> upgrade && python -m app.db.migrate --db-url <tmp sqlite> check