Account deletion only cleans up Codeforces data, leaving other collections (including ones embedding the users email and analytics) in the database forever.
Root cause
server/modules/user/service.js:37-48 (deleteAccount) deletes CodeforcesProfile, CodeforcesSubmission, CodeforcesRatingHistory, then the User. It never deletes:
GithubData (unique per userId, models/GithubData.js:4-10) — orphaned GitHub cache persists.
ApexConversation (models/ApexConversation.js) — orphaned, and its contextSnapshot/contextPromptBlock embed the users email + full CF/GitHub analytics (built in utils/apexContextCompiler.js:311-320).
ContestReminder and any pending Otp rows.
Failure scenario
A user connects GitHub + uses APEX chat, then deletes their account. The User row is gone, but ApexConversation docs (name, email, ratings, repo/language stats) and GithubData remain in Mongo permanently — unreachable by the user and never cleaned up. "Delete my account" doesnt actually delete the personal data.
Fix
Extend the deletion cascade to GithubData, ApexConversation, ContestReminder, and pending Otp records (all keyed by userId/email), ideally in a transaction.
Dedup
No matching issue; no PR touches the user module. Unreported.
Contributing as part of Elite Coders Summer of Code (ECSoC 2026).
Account deletion only cleans up Codeforces data, leaving other collections (including ones embedding the users email and analytics) in the database forever.
Root cause
server/modules/user/service.js:37-48(deleteAccount) deletesCodeforcesProfile,CodeforcesSubmission,CodeforcesRatingHistory, then theUser. It never deletes:GithubData(unique peruserId,models/GithubData.js:4-10) — orphaned GitHub cache persists.ApexConversation(models/ApexConversation.js) — orphaned, and itscontextSnapshot/contextPromptBlockembed the users email + full CF/GitHub analytics (built inutils/apexContextCompiler.js:311-320).ContestReminderand any pendingOtprows.Failure scenario
A user connects GitHub + uses APEX chat, then deletes their account. The
Userrow is gone, butApexConversationdocs (name, email, ratings, repo/language stats) andGithubDataremain in Mongo permanently — unreachable by the user and never cleaned up. "Delete my account" doesnt actually delete the personal data.Fix
Extend the deletion cascade to
GithubData,ApexConversation,ContestReminder, and pendingOtprecords (all keyed byuserId/email), ideally in a transaction.Dedup
No matching issue; no PR touches the user module. Unreported.
Contributing as part of Elite Coders Summer of Code (ECSoC 2026).