Skip to content

[Bug] AI dashboard summary cached permanently, never invalidated — stale growth insights #303

Description

@vedant7007

Problem (Med — correctness / stale AI output)

server/modules/ai/service.js:225-265 (getDashboardSummary) — once generated, the summary is stored in user.dashboardSummary.content and returned forever (:231-233); nothing regenerates or invalidates it — not a Codeforces sync, not new contest results — and there's no force-refresh endpoint.

The AI "growth insight" a user sees becomes permanently stale and can contradict their current stats.

Suggested fix (small)

Store/compare lastGeneratedAt (already a field, User.js:80) against a TTL, or invalidate the cache in the CF syncUserData completion path.

Glad to fix under GSSoC '26.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions