Skip to content

Failed-key throttle: reserve the attempt before authenticating; never… - #113

Merged
warheart1984-ctrl merged 2 commits into
mainfrom
feat/rate-limit-per-credential
Oct 17, 2026
Merged

warheart1984-ctrl merged 2 commits into
mainfrom
feat/rate-limit-per-credential

Conversation

@warheart1984-ctrl

Copy link
Copy Markdown
Owner

… evict a throttled bucket (Codex on #112)

… evict a throttled bucket (Codex on #112)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-17T12:47:55.225388Z 1fa4abf New commits
ℹ️ 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread app/public_security.py Outdated
Comment on lines +75 to +77
window = self._requests.get(subject)
if window:
window.pop()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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>
@warheart1984-ctrl
warheart1984-ctrl merged commit 3638995 into main Oct 17, 2026
3 checks passed
@warheart1984-ctrl
warheart1984-ctrl deleted the feat/rate-limit-per-credential branch October 17, 2026 13:35
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