Implement persistent review queue

This commit is contained in:
hz
2026-07-19 12:51:24 -05:00
parent 1bfb3f5347
commit 7508d4fe1d
20 changed files with 1155 additions and 20 deletions
+8
View File
@@ -22,6 +22,8 @@ STEP-style question bank service for study games and clients.
- `GET /api/app-feedback` List and filter app feedback, newest first (SUPER only).
- `GET /api/app-feedback/{id}` Get one app feedback report (SUPER only).
- `PATCH /api/app-feedback/{id}/status` Resolve or dismiss app feedback (SUPER only).
- `POST /api/review-queue/next` Get one random pending review question, excluding IDs already shown in the current pass.
- `POST /api/review-queue/attempts` Idempotently record the first answer for a review cycle.
Player reads require `USER` or `SUPER` JWT auth. Authoring endpoints require `SUPER`.
@@ -35,6 +37,12 @@ materialized counter buckets and cached for up to five minutes. These rates are
independent and are not expected to sum to 100% when users see different
distractor subsets.
Submitted incorrect first attempts are materialized in `ReviewQueueItems`.
Skips are excluded. Review attempts are stored separately, do not affect Elo
or first-attempt statistics, and clear an item only when the first answer in a
review cycle is correct. Per-user incremental backfill checkpoints populate
the queue from historical first attempts without requiring a manual migration.
A background service snapshots the original choice IDs, backfills historical
attempts into v2 exposure counters, and reconciles recently active questions
every five minutes. The metric