Repository navigation
Conversation
|
@wakevro is attempting to deploy a commit to the Convex Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: get-convex/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe rate-limit schema now includes a Merge Risk: ⚪ Minimal · up to This change adds an index for existing rate-limit cleanup queries without changing which records are deleted or introducing new runtime or permission paths. No actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Warning Some tools did not complete. Review the errors below. 🔧 ESLint
src/client/create-schema.test.tsESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox. src/client/create-schema.tsESLint skipped: the matched ESLint configuration already failed (missing-dependency). src/client/rate-limit-index.test.tsESLint skipped: the matched ESLint configuration already failed (missing-dependency).
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. Comment |
Better Auth 1.7 database rate limiting prunes rows with deleteMany(rateLimit where lastRequest < cutoff) whenever a window resets. Without an index starting with lastRequest the adapter scanned the whole rateLimit table and logged "Querying without an index". Add the index to the schema generator and the shipped component schema, and test that the shipped schema matches the generator output. Port of convex#436. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add an index on
rateLimit.lastRequestso expired rate-limit records can be deleted using an indexed range query.Problem
Convex currently reports the following warning during rate-limit cleanup:
The cleanup operation filters expired rate-limit records by
lastRequest, but therateLimittable only has an index onkey.Changes
lastRequestindex to the schema generatorTesting
npm run buildnpm run typechecknpm run testnpm run lintBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.