Repository navigation
user_preference read as text: two missed conversions; recompute fit after a validator fix - #903
Merged
Merged
Conversation
… after a validator fix Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
ArchLens - No architecturally relevant changes to the existing views |
… fit is recomputed Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Three small bugs found by the code review of #895. #895 didn't cause them; they sit next to it.
user_word.user_preferenceis TEXT in prod while the model says Integer, so it comes back as"-6"or"0". #895 addedUserWordExPreference.of()to turn it into an int; two places didn't use it yet.bookmark.py): the "known" mark is meant to wear off (-6 → -4 → -2 → 0), but"-6" += 2raises.add_word_to_study.py): a stored"0"!=0, so the word looked like the learner had a preference and was left alone.fit_for_studywasn't recomputed (validation_service.py): it kept the value worked out when the word was created (before its sentence was attached), or long before if the learner already had that word. Now recomputed after the sentence is attached; if the word is unfit, its schedule is cleared.Tests:
test_user_preference_as_text.py, one per bug; all three fail on master (including the realTypeError) and pass here. Related core and API tests pass.The root cause (TEXT column) goes away with roadmap 0b, which replaces
user_preference.🤖 Generated with Claude Code