Repository navigation
Failed-key throttle: reserve the attempt before authenticating; never… - #113
Conversation
… evict a throttled bucket (Codex on #112) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0d9ae4e524
ℹ️ 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".
| window = self._requests.get(subject) | ||
| if window: | ||
| window.pop() |
There was a problem hiding this comment.
Release the reservation that actually completed
When authentications for the same (client, key id) overlap, pop() always removes the newest reservation rather than the successful request's own reservation. For example, an older valid request can finish after a newer invalid request; its release removes the invalid attempt and leaves the valid request's earlier timestamp as the counted failure. That failure then expires based on the earlier successful request, allowing further bad guesses before the actual failed attempt has aged out of the 60-second window. Return a per-reservation handle/timestamp and remove that specific entry instead.
Useful? React with 👍 / 👎.
…newest (Codex on #112) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… evict a throttled bucket (Codex on #112)