Skip to content

Add a feature-flagged PostgreSQL solve-history read API #174

Description

@coder13

Goal

Expose durable per-user solve history from PostgreSQL as the first controlled read path, enabling #160, #161, and #163 without switching live room reads away from MongoDB.

Acceptance criteria

  • Define an authenticated, cursor-paginated API for the current user's completed solves.
  • Return stable solve IDs, event, time, +2/DNF penalties, scramble, room/session reference, and timestamps while enforcing private-room expectations.
  • Use the existing creation-time + solve-ID index for deterministic pagination.
  • Gate the read path behind configuration and provide an explicit fallback/disable path.
  • Add authorization, pagination, penalty, empty-history, and disabled-PostgreSQL tests.
  • Instrument latency, error rate, and fallback/disable behavior without logging solve data or identity.
  • Document how the client history UI and csTimer export should consume the API.

Dependencies

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: dataMongoDB, PostgreSQL, migrations, backfills, and data integrityarea: resultsSolves, scrambles, history, statistics, and exportsenhancementNew feature or requestpriority: P1High-priority work for the next delivery cycle

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions