Skip to content

Forgotten cards should stay due the same day, not roll to tomorrow - #204

Open
oddish3 wants to merge 2 commits into
eudoxia0:masterfrom
oddish3:performance-change
Open

Forgotten cards should stay due the same day, not roll to tomorrow#204
oddish3 wants to merge 2 commits into
eudoxia0:masterfrom
oddish3:performance-change

Conversation

@oddish3

@oddish3 oddish3 commented Aug 17, 2026

Copy link
Copy Markdown

MIN_INTERVAL (1 day) is applied to every grade, including Forgot. In practice this means grading a card "forgot" always pushes its due_date to tomorrow — even for a brand-new card, whose raw FSRS interval on Forgot is typically well under a day (~0.4 days).

hashcards has no Anki-style intraday relearning steps (by design, per the "Simple" principle in the README), so the only way a forgotten card can come back up in a later session on the same day is if its due_date is allowed to stay today. Right now it can't — you have to wait until tomorrow, which doesn't match what "Forgot" should mean.

This adds a separate, lower floor (MIN_INTERVAL_FORGOT = 0.0) used only for Grade::Forgot, leaving Hard/Good/Easy untouched. It's a one-constant, one-branch change — no session/queue changes, no schema changes, still fully day-granular (no new intraday state). It composes naturally with all_due(today) (used by drill and, after #199, by due), so a forgotten card just shows up as due again whenever you next open a session that day.

Added three tests: forgetting a new card, forgetting a previously-reviewed card, and forgetting the same card twice same-day (checking elapsed_days == 0 doesn't break the stability update - FSRS handles that as an ordinary case, not a special one).

Happy to adjust the floor value if you'd rather it not be exactly 0 (e.g. leaving a small epsilon), just picked 0 since nothing downstream treats interval_days as a denominator.

@oddish3

oddish3 commented Aug 17, 2026

Copy link
Copy Markdown
Author

Problem

Grade::Forgot was subject to the one-day minimum interval. If a user ended a
session after forgetting a card, that card could not appear in another session
until tomorrow.

Change

For Grade::Forgot, persist interval_days = 0 and due_date = today, while
retaining the true FSRS result in interval_raw. Other grades are unchanged.

Result

  • Same-session repetition is unchanged and remains queue-controlled.
  • A forgotten card is eligible in another session that day.
  • If not reviewed again, it remains eligible as overdue on later days.
  • There are no intraday delays or relearning steps.
  • Future due reports retain exact-date semantics.

Added a database-level regression test covering persistence and all_due.
Verified the real HTTP lifecycle across three sessions. All 149 tests pass.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant