[Bug][High] Mastery Path review mode demotes a mastered objective to unmastered on a single independent wrong answer (mastery 1.0 → 0.75, below the 0.9 gate), forcing re-learning loops
Do you need to file an issue?
- [x] I have searched the existing issues and this bug is not already filed.
- [x] I believe this is a legitimate bug, not just a question or feature request.
Describe the bug
In Mastery Path's review mode the engine re-tests objectives the learner has already mastered. A single independent wrong answer during such a review can drop the objective's mastery below the 0.9 gate and mark it "not mastered" again, so the tutor goes back to teaching and quizzing the same objective and the learner has to re-answer questions they have already answered. Review turns into an adversarial re-test with a reset penalty instead of repairing memory decay.
Mechanism (verified against v1.6.15 source):
- Mastery is the recency-weighted accuracy of the last 5 independent attempts:
deeptutor/learning/mastery.py::compute_mastery, weights(0.5, 0.7, 0.85, 0.95, 1.0), with low-sample confidence caps (1 attempt ≤ 0.5, 2 attempts ≤ 0.8). - The quantitative gate is 0.9:
deeptutor/learning/policy.py::QUANTITATIVE_GATE(MEMORY/PROCEDURE = 0.9);is_assessed_masteredrequiresmastery_levels >= 0.9. - Every graded attempt, including review, recomputes and overwrites
mastery_levels:deeptutor/learning/service.py::_apply_grade(reached viamastery_grade → grade_interaction_semantic → _evaluate_question), whereupdate_mastery(..., calculate_mastery(...))runs;calculate_masteryonly countsindependentattempts. - A failed review also drives the SRS state down:
deeptutor/learning/scheduler.py::schedule_reviewwithquality < 0.5incrementslapse_count, multipliesstabilitybyretention_factor × difficulty_factor, and shortens the next interval. - For qualitative (concept/design) objectives the failure is even harsher:
record_qualitative_in_memorycaps mastery atmin(current, 0.4). - Review mode itself only allows re-testing mastered objectives (
_review_scope_refusal), so this deduction happens precisely on objectives the learner has already cleared.
Numeric check:
- Last 5 independent attempts all correct:
(0.5+0.7+0.85+0.95+1.0)/4.0 = 1.0(mastered). - The most recent one answered wrong:
(0.5+0.7+0.85+0.95+0)/4.0 = 0.75— below 0.9, sois_masteredbecomes False. - One more wrong:
(0.5+0.7+0.85+0+0)/4.0 = 0.5125.
Building to 1.0 needs at least three correct attempts (the first two are capped), yet one wrong answer is enough to demote the objective.
Why this is a design problem, not just "strictness":
- Spaced repetition is supposed to repair memory decay, not run adversarial tests; a single retrieval failure does not mean the knowledge is gone.
- Turning a continuous mastery score into a binary "mastered / not mastered" via a hard 0.9 gate, and pairing that jump with "back to re-learning + a shorter review interval", makes the learner's feedback almost entirely negative.
- After a review miss a learner needs a hint, a re-explanation, a small top-up and positive feedback — not a full reset of the objective.
Steps to reproduce
- Complete a MEMORY/PROCEDURE objective until
mastery_statusshows it mastered (mastery ≥ 0.9). - Switch to
reviewmode and quiz that objective. - Answer one question wrong without using hints.
- Observe
mastery_status:mastery_levelsdrops from 1.0 to 0.75, the objective returns to unmastered,nextpoints back to it, and the tutor resumes teaching and posing questions. - Repeat and observe the "demote → re-learn → demote again" loop.
Suggested evidence: before/after mastery_status, the quiz_attempts / learning_evidence records, and the session trace (including the "50+ questions on one objective, still unmastered" case).
Expected Behavior
- A failed review should not demote a mastered objective to "unmastered"; it should distinguish an independent recall failure from assisted recovery and keep the passed state.
- A failed review should mainly affect stability / the next review interval (the memory-decay model), not reset
mastery_levelsand the passed state. - A failed review of a passed objective should trigger a hint, re-teaching or a small top-up rather than a full re-learning flow.
- Show positive feedback and progress visibility so the learner understands that a review miss is expected.
- At minimum, provide a configurable leniency policy (see open #1908).
Related Module
Guided Learning
Configuration Used
- Local source install, DeepTutor v1.6.15 (HEAD
a31d826);devnot checked, may differ. - Operating System: Windows.
Logs and screenshots
No screenshots attached. The numeric verification above is arithmetic over the published compute_mastery weights, not runtime logs.
Additional Information
- DeepTutor Version: local source build v1.6.15 (HEAD
a31d826) - Operating System: Windows
- Related Issues: #1781 (closed, same mechanism), #1527 (closed), #1541 (closed), #2401 (open, stale review-card replay), #1908 (open, configurable review strategies)
后记(一名学习者的个人感受)
前面是就事论事,下面就说点我自己的感受,如有冒昧,先说声抱歉。
我前后三次尝试把 DeepTutor 当作主力学习工具,愿意一次次回来,很大程度是因为信任这个项目背后的团队和学校。但反复遇到的进度阻塞,确实让我越来越难坚持。最难接受的就是这次说的复习体验:一个我花时间掌握的知识点,因为复习时的一两次小差错就被打回“未掌握”,然后我得重新去做那些已经做过的题。实际用下来,我甚至遇到过一个知识点做了 50 多道题,系统还没认可。
我理解间隔复习要处理遗忘、要给出真实的掌握度,这些用心我尊重。我不太理解的是,为什么复习的代价被设计得这么重,一次失误就抹掉之前的努力。对学习者来说,复习本该是“修补记忆的磨损”,而不是一次对抗性测试。学习者需要的不只是冷冰冰的数字,也要一点正反馈,要一个“错了没关系,再讲一遍”的余地。
我无意质疑维护者的专业和投入,也不想凭空下什么结论。只是作为一个用户,这个体验确实让我失望。我失望的不是某个人,而是“一个本该帮学习者坚持下去的功能,反而在劝退人”这件事。
如果这个设计的初衷是“严格”,能不能把“严格”用在初次掌握上,把“宽容”留给复习巩固?哪怕只是给一个可配置的复习策略,也足以让我这样的学习者重新信任它。
真心希望这个项目越做越好,而不是越来越像一件要用户反复调试的工具。
Follow-up: confirmed on v1.7.2, with partial-credit repair attempts
A read-only inspection of a real procedure objective found 13 independent graded attempts: 7 correct, 5 partial, 1 incorrect. No private chat text or identifiers are included here.
The result sequence was:
incorrect, correct, partial, correct, correct, correct, partial, correct, partial, correct, partial, partial, correct.
The released scoring function (deeptutor/learning/mastery.py:24-37) yields 0.9125 after attempt 6 (above the 0.9 gate in learning/policy.py:36-39,82-92), 0.8125 after attempt 7, and 0.7125 after attempt 13. The final value matches the persisted runtime state. The same scoring and gate code is present in the locally checked dev reference; this is not a fresh remote-dev verification.
The partial attempts were often numerically correct but missing requested working, an annual comparison, or one half of the comparison. The tutor then generated a NEW quiz card for the missing part; the correct repair became another independent attempt without replacing the preceding partial attempt. Consequently, even repeated correct repairs did not close the loop, and the tutor kept generating variants of the same exercise.
The latest session is in study mode, although earlier events show review mode. A fix scoped only to the UI's review mode or only to fully wrong reviews should therefore be checked against partial-credit demotion and subsequent study-mode recovery too. This report does not claim that every partial answer should pass: incomplete initial answers must still be assessed honestly. It asks to distinguish correction of an existing assessment from a new independent assessment, and to preserve a previously demonstrated pass while scheduling targeted review.
Related: tracking #1940, PR #2459. No productive progress, answers, or route configuration were changed during diagnosis.