Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/check review_limit only if is_learn is false #262

Merged
merged 2 commits into from
Dec 21, 2024

Conversation

L-M-Sherlock
Copy link
Member

@L-M-Sherlock L-M-Sherlock changed the title Fix/check review limit only if is learn is false Fix/check review_limit only if is_learn is false Dec 21, 2024
Copy link
Member

@Luc-Mcgrady Luc-Mcgrady left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That issue is talking about this option
image

which defaults to off though in the simulator defaults to on.

image

To fix it you would need to add that to the simulator config.
something like.

let review_learn_count = learn_cnt_per_day[day_index] * (config.new_cards_affect_review_limit ? 1 : 0) 
if (!is_learn && review_cnt_per_day[day_index] + review_learn_count + 1 > review_limit)
    || (is_learn && learn_cnt_per_day[day_index] + 1 > learn_limit)
    || (cost_per_day[day_index] + fail_cost > max_cost_perday)

I originally made it default to off in the simulator:
https://github.com/open-spaced-repetition/fsrs-rs/pull/235/files/a79f4221e3652aedd940720b77ad0774407da736..cbe8f9d98f75189445d90435ec7339e900b01fa0#r1798205551

This is still a bug though I'm pretty sure 😄

@L-M-Sherlock
Copy link
Member Author

OK, so we should make a breaking change?

@Luc-Mcgrady
Copy link
Member

This does actually fix this issue nvm.

I'm not sure its worth the breaking change, maybe if another breaking change happens we can include it then.

@L-M-Sherlock
Copy link
Member Author

I tend to merge this PR and keep the breaking change in the future. What do you think of?

@Luc-Mcgrady
Copy link
Member

Sounds good

@L-M-Sherlock L-M-Sherlock merged commit 0625bfa into main Dec 21, 2024
3 checks passed
@L-M-Sherlock L-M-Sherlock deleted the Fix/check-review_limit-only-if-is_learn-is-false branch December 21, 2024 15:33
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.

"New cards ignore review limit" doesn't apply to simulator
2 participants