Skip to content

Arcade 2.0 / P4: Leaderboard meta-layer — weekly reset, daily challenge, streaks, plausibility checks #166

Description

@Anuraj-dev

Parent

Spec 27: #162

What to build

The come-back-tomorrow layer across all arcade games. Each game's leaderboard gains a weekly-reset board (ISO-week periods) beside the all-time board, so newcomers can realistically top a chart. A daily challenge gives everyone the same server-derived seed for that date, with its own daily board. Playing on consecutive days grows a visible streak; beating your personal best triggers a celebration even when you're off the podium. Server-side plausibility validation keeps the boards credible: per-game score ceilings, minimum-duration-versus-score pace checks, and monotonic progress sanity — implausible submissions are rejected. (Full replay verification is explicitly out of scope.)

Leaderboard storage becomes period-aware in Postgres; streaks are per-user daily-play records; the daily seed is derived server-side from the date. All request/response shapes live in the shared contract package; endpoints follow the existing arcade-scores REST patterns including rate limits. HUD: the leaderboard panel shows all-time / weekly / daily tabs, the streak counter, and today's challenge.

Acceptance criteria

  • Weekly (ISO-week) and daily-challenge boards per game alongside all-time, with migration; ranks correct across period boundaries
  • Daily challenge: server-provided date-derived seed, same for every player that day, played through the normal cabinets and submitted to the daily board
  • Streaks: consecutive-day play tracked server-side and shown in the HUD; personal-best celebration fires on new bests in any mode
  • Plausibility validation rejects over-ceiling scores, impossible score-per-duration pace, and non-monotonic submissions, with tests for accept/reject edges following existing REST test patterns
  • All new wire shapes in the shared package; rate limits applied; no change to entry-bundle budget (HUD additions stay in existing lazy surfaces where possible)
  • CI fully green

Blocked by

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentTriaged PRD ready for implementation

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions