Conversation
- Multi-env config (dev/staging/prod) with separate .env files - Docker Compose for backend, MongoDB, and Mongo Express - web-ext hot-reload for extension development - Dynamic config loading from config.json - Comprehensive testing and deployment docs
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 0055953. Configure here.
| timezone: "Asia/Kolkata" // Explicitly set to IST | ||
| }); | ||
| // Sunday 06:07 — prune submissions >90 days old. | ||
| schedule("07 6 * * 0", "prune-submissions", () => submissionService.pruneOldSubmissions()); |
There was a problem hiding this comment.
Submission pruning at 90 days silently truncates streaks
High Severity
The prune-submissions cron job deletes submissions older than 90 days, but streakService.getCurrentStreak has a maxLookbackDays of 400, clearly intending to support streaks up to ~400 days. Once the prune job runs, any streak longer than 90 days is silently broken — the consecutive-day walk hits a gap where pruned records used to be, reporting a shorter streak than reality. This is a data-loss scenario affecting a core user-facing feature.
Reviewed by Cursor Bugbot for commit 0055953. Configure here.


Added Ver 2.5 Changes Including:
MAJORBackend Engine OptimizationsNote
High Risk
High risk because it replaces core backend API routes and MongoDB schemas (moving streak tracking to a new
submissionscollection and introducing deterministic daily-problem selection), plus changes cron scheduling and environment/CORS behavior which can break existing clients and data if migration is incomplete.Overview
Introduces a new V3 backend contract: replaces legacy
/problemset/*endpoints and controllers with/users,/problems(daily + range), and/submissionsAPIs, including shared controller error/validation helpers (lib/http.js).Switches the daily-problem engine to a deterministic, no-write selector (
lib/dailyProblem.js+services/problemService.js) and moves streak state to a newSubmissionmodel with server-side streak computation (services/streakService.js), alongside newProblem/Userschemas and a V2→V3 migration script.Updates ops/dev tooling: adds GitHub Actions CI (lint/format/test matrix with coverage artifact), Docker Compose for Mongo+backend, tighter
.gitignorefor env/config files, backend lint/format/test configs (ESLint/Prettier/Jest), CORS origin viaCORS_ORIGIN, and makes in-process cron opt-in (ENABLE_CRON) with only weekly refresh/prune jobs plus dev-only/test/crontriggers.Reviewed by Cursor Bugbot for commit 0055953. Bugbot is set up for automated code reviews on this repo. Configure here.