Revert "Add per-user submission rate limit (1 per hour)"#438
Conversation
This reverts commit 7d97a31.
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Pull request overview
Reverts the previously added per-user submission rate limit (1/hour) for submissions (notably the Modal B200 + leaderboard 730 path), removing both the DB helper and the API enforcement, along with the associated tests.
Changes:
- Removed
LeaderboardDB.check_user_rate_limit()and its query logic. - Removed API-side rate limiting enforcement in
to_submit_info()(HTTP 429 path). - Removed rate-limit-specific unit tests and an unused
datetimeimport.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
tests/test_leaderboard_db.py |
Removes tests covering the DB-level rate-limit helper. |
tests/test_admin_api.py |
Removes API-level rate-limit tests and drops unused datetime import. |
src/libkernelbot/leaderboard_db.py |
Removes check_user_rate_limit() from the DB layer. |
src/kernelbot/api/api_utils.py |
Removes rate-limit enforcement in submission validation; also tweaks a 500 error detail string. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| except Exception as e: | ||
| raise HTTPException( | ||
| status_code=500, | ||
| detail=f"Internal server error while validating submission: {e}", | ||
| detail=f"Internal server error while validating leaderboard/GPU: {e}", | ||
| ) from e |
There was a problem hiding this comment.
This PR is described as a pure revert of the per-user submission rate limit, but it also changes the 500 error detail text from "validating submission" to "validating leaderboard/GPU". If this wording change is intentional, please call it out in the PR description; otherwise consider reverting it to keep the revert minimal and reduce risk of unexpected user-facing changes.
Reverts #436