fix(cache): reject oversized keys to prevent memory bloat #1403#2040
Conversation
|
@swarupio is attempting to deploy a commit to the jhasourav07's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
🚨 Hey @swarupio, the CI Pipeline is failing on this PR and it has been marked as Please fix the issues before this can be reviewed. Here's how: 1. Run checks locally before pushing: npm run format:check # Check Prettier formatting
npm run lint # Run ESLint
npm run typecheck # TypeScript type check
npm run test # Run unit tests (Vitest)
npm run build # Verify production build passes2. Auto-fix common issues: npm run format # Auto-fix formatting with Prettier
npm run lint -- --fix # Auto-fix lint errors where possible3. Check the full failure log here: Once you push a fix and the CI passes, the |
|
Please pull the latest changes and resolve the conflicts so we can review it! git fetch origin
git rebase origin/main
# resolve any conflicts, then:
git push --force-with-leaseOnce resolved, the |
1 similar comment
|
Please pull the latest changes and resolve the conflicts so we can review it! git fetch origin
git rebase origin/main
# resolve any conflicts, then:
git push --force-with-leaseOnce resolved, the |
|
@swarupio look for conflicts |
952a1f7 to
ad02c3c
Compare
|
@Aamod007 HI PLEASE MERGE IT IF THE REVIEW IS COMPLETE |
|
🎉 Congratulations @swarupio! Your PR has been successfully merged. 🚀 Thank you for contributing to CommitPulse. Your work helps us build a better tool for the community.
Keep building! 💻✨ |
Description
Added strict length validation to the
TTLCachesetmethod to reject extremely large cache keys (e.g.,'a'.repeat(20000)). This prevents potential memory bloat and database strain. Also updated the corresponding Vitest suite inlib/cache.test.tsto assert this new boundary behavior and removed an older, conflicting test.Fixes #1403
Pillar
Visual Preview
N/A (Backend cache logic update)
Checklist before requesting a review:
CONTRIBUTING.mdfile.localhost:3000/api/streak?user=YOUR_USERNAME).npm run formatandnpm run lintlocally and resolved all errors (CI will fail otherwise).feat(themes): ...,fix(calculate): ...).README.mdif I added a new theme or URL parameter.