Skip to content

fix(id): permanently refuse over-capacity bucket costs - #4555

Closed
dezren39 wants to merge 1 commit into
mainfrom
queue/6265-3927-permanent-oversize
Closed

dezren39 wants to merge 1 commit into
mainfrom
queue/6265-3927-permanent-oversize

Conversation

@dezren39

@dezren39 dezren39 commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

Summary

check_frame / check_bytes / combined checks
+ if request cost exceeds the bucket burst capacity
+   return RequestTooLarge (retry_after_ms = None)

Permanent over-capacity requests no longer promise a retry that can never succeed. Within-capacity temporary depletion keeps its bounded retry behavior.

Evidence

  • Before: triage reproduced over-capacity byte and zero-frame-burst requests returning a temporary refusal (Some(1000)) even at far-future times.
  • After: cargo test -p id --lib abuse::tests — 13 passed; cargo test -p id --lib frames::tests — 5 passed; git diff --check — passed.
  • The Refusal docs now distinguish permanent oversize refusals from retryable 429s.
  • CI coverage gap: .github/workflows/id-check.yml currently has no pull_request trigger although .github/ci-policy.md lists an ID PR tier. A missing PR check is not a green result; this gap needs resolution before merge.

Merge Danger

Door: two-way — the refusal behavior can be reverted without data migration.

Blast Radius: low — only abuse-bucket requests whose costs exceed configured burst capacity change behavior.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@dezren39
dezren39 requested a review from a team as a code owner November 2, 2026 20:02
@coderabbitai

coderabbitai Bot commented Nov 2, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 17 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

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: 63980bb6-1774-4627-b544-bf1f7efe1b48
Commits

Reviewing files that changed from the base of the PR and between e220845 and 8e4a985.

Files selected for processing: 2
  • pkgs/id/src/abuse.rs
  • pkgs/id/src/frames.rs
  • 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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 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-11-02T20:04:03.666288Z 8e4a985 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.

@dezren39

dezren39 commented Nov 8, 2026

Copy link
Copy Markdown
Member Author

🤖 Agent note · handed off

@dezren39 dezren39 added queue/parked Queue task is parked (waiting on CI, time, or an event) status/parked Deliberately paused with a recorded resume condition and removed status/in-progress Queue worker lifecycle state queue/claimed Queue worker lifecycle state labels Nov 8, 2026
@dezren39

Copy link
Copy Markdown
Member Author

agent-note:v1
state: closed-superseded (salvage checked)
lane: any-b (task 13399)
summary: Closing PR #4555 as superseded. Salvage diff against the canonical artifact (PR #8250, merged 2026-11-10, merge commit 841c5fc) performed before closing: this PR is the stranded-branch implementation of the issue #3927 fix (permanently refuse over-capacity bucket costs). PR #8250 (task 13029) implemented the same fix fresh on current main and closed #3927: same additions — TokenBucket::exceeds_capacity, Refusal::request_too_large / RefusalReason::RequestTooLarge (permanent, retry_after_ms: None), up-front refusal in check_frame/check_bytes and the combined paths in pkgs/id/src/abuse.rs. This PR's only other change is the matching frames.rs test expectation (reason RequestTooLarge + retry_after_ms None), which is the same assertion the landed code carries. Nothing unique remains; no salvage needed. The branch is left in place (no deletion outside the PR flow).

@dezren39 dezren39 closed this Nov 12, 2026
@dezren39 dezren39 removed status/parked Deliberately paused with a recorded resume condition queue/parked Queue task is parked (waiting on CI, time, or an event) work/assigned Queue worker lifecycle state labels Nov 12, 2026
@dezren39
dezren39 deleted the queue/6265-3927-permanent-oversize branch November 14, 2026 20:03
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