Forgotten cards should stay due the same day, not roll to tomorrow - #204
Open
oddish3 wants to merge 2 commits into
Open
Forgotten cards should stay due the same day, not roll to tomorrow#204oddish3 wants to merge 2 commits into
oddish3 wants to merge 2 commits into
Conversation
Author
Problem
ChangeFor Result
Added a database-level regression test covering persistence and |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_dateis 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 forGrade::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 withall_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 == 0doesn'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_daysas a denominator.