Feat/gtp 5.3 codex rate limit violations batching#73
Open
kudroma404 wants to merge 10 commits into
Open
Conversation
Persist rate-limit violations as periodic aggregates with per-client JSON details to avoid one-row-per-violation writes and reduce DB pressure. Made-with: Cursor
Capture 429 events from middleware and distributed subject checks so every denial contributes to the batched violation aggregates. Made-with: Cursor
Add integration coverage for distributed user limiter 429 behavior and unit coverage for per-client violation aggregation output. Made-with: Cursor
Merge origin/main into feat/gtp-5.3-codex-rate-limit-violations-batching and resolve conflicts while preserving batched rate-limit violation tracking changes. Made-with: Cursor
Ignore Cursor workspace files and fix rate-limit handler/test updates needed after syncing with main so local checks run against the new branch state. Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds batched tracking for rate-limit violations so we can observe abuse patterns without writing one DB row per
429.What changed
RateLimitViolationTracker+ sink abstractionSchema and config updates
rate_limit_violationsindev-env/init-scripts/init-schema.sql.Cargo.toml/Cargo.lock.db.violation_flush_interval_secdev-env/config/config-single.tomldev-env/config/config1.tomldev-env/config/config2.tomldev-env/config/config3.tomlFiles of interest
src/db/violation_tracker.rssrc/db/mod.rssrc/db/repository.rssrc/http3/rate_limits.rssrc/http3/server.rssrc/http3/state.rssrc/raft/mod.rssrc/test_support.rstests/client_http_api/rate_limit_violations.rstests/client_http_api/support.rstests/event_tracker/support.rsTest plan
cargo fmtcargo clippy --all-targets --all-features -- -D warningscargo test --all-targets --all-featurescargo test --tests --features test-supportrate_limit_violationswith aggregated details.Notes