Study.Review — append-only review event log #27

Open
opened 2026-09-26 13:58:36 +00:00 by belvedere · 0 comments
Collaborator

Objective: Every answer the user gives, permanently, as the source of truth for all progress.

Files:

  • Create: lib/first_thousand_words/study/review.ex

Steps:

  1. Attributes: rating (:again|:hard|:good|:easy), was_correct,
    answer_text (what the user typed, nullable), elapsed_ms, reviewed_at,
    interval_before, interval_after, ease_after.
  2. belongs_to :card, belongs_to :user.
  3. Append-only: no update or destroy actions exposed. Index the query to review history
    by (user_id, reviewed_at).
  4. read :list_reviews_for_period used by the stats layer.

Verify: a review row is created per submission and cannot be edited through the code interface.

Note: storing interval_before/after makes it possible to reconstruct exactly how a card got
to its current state — the thing that makes "why is this card due in 4 months?" answerable.

**Objective:** Every answer the user gives, permanently, as the source of truth for all progress. **Files:** - Create: `lib/first_thousand_words/study/review.ex` **Steps:** 1. Attributes: `rating` (`:again|:hard|:good|:easy`), `was_correct`, `answer_text` (what the user typed, nullable), `elapsed_ms`, `reviewed_at`, `interval_before`, `interval_after`, `ease_after`. 2. `belongs_to :card`, `belongs_to :user`. 3. **Append-only**: no update or destroy actions exposed. Index the query to review history by `(user_id, reviewed_at)`. 4. `read :list_reviews_for_period` used by the stats layer. **Verify:** a review row is created per submission and cannot be edited through the code interface. **Note:** storing `interval_before/after` makes it possible to reconstruct exactly how a card got to its current state — the thing that makes "why is this card due in 4 months?" answerable.
Sign in to join this conversation.
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
nickkeers/first-thousand-words#27
No description provided.