Skip to content

fix: isolate file deletion rate limits - #193

Merged
danny-avila merged 1 commit into
mainfrom
danny-avila/fix-file-delete-rate-limiter
Sep 14, 2026
Merged

danny-avila merged 1 commit into
mainfrom
danny-avila/fix-file-delete-rate-limiter

Conversation

@danny-avila

Copy link
Copy Markdown
Collaborator

Summary

Expired-file cleanup sends DELETE requests through the file-list limiter today. A cleanup burst can therefore exhaust interactive list/metadata capacity, and clients receive the misleading message Too many file list requests.

This change gives deletion traffic an independent Redis bucket, wires both supported DELETE routes to it, and returns structured retry guidance with Retry-After. DELETE_LIMIT_WINDOW and DELETE_MAX_REQUESTS fall back to the existing fetch settings, preserving current defaults while allowing operators to tune deletion separately.

Production trigger

During a multi-replica rollout in AP, expired-file cleanup produced repeated CodeAPI DELETE requests, 15-second client timeouts, and 429 responses reporting the fetch limiter. This patch isolates that traffic and makes the backpressure contract machine-readable. The companion LibreChat PR prevents replicas from initiating duplicate sweeps.

Verification

  • bun test src/middleware/limits.test.ts src/service/exec-timeout.test.ts (10 passed)
  • git diff --check
  • Package typecheck currently has unrelated baseline errors in egress/replay files.

@danny-avila

Copy link
Copy Markdown
Collaborator Author

@codex review

Please review the current PR head 6d68307. Confirm that this exact commit is the reviewed commit and ignore findings that apply only to earlier heads.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 14, 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-09-14T05:14:13.566516Z 6d68307 Manual request
ℹ️ 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

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 6d68307f73

ℹ️ 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".

@danny-avila
danny-avila merged commit 1c7af88 into main Sep 14, 2026
10 checks passed
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