You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Severity: MEDIUM + LOW · Source: docs/backend-contract-bug-audit.md (findings #10, #29)
Create skeletons for loading pages #10 [MEDIUM] Quiz submit has no idempotency — resubmission double-counts mastery/streak — routes/quiz.py:355-436. submit_quiz sets completed_at (:432) but never reads it; re-POSTing the same quiz_id re-applies the mastery delta, increments times_studied, appends another event, re-runs update_streak. Fix: if attempt.get("completed_at") is set, return the stored result (or 409).
Add in-app bug report form #29 [LOW] Free point for an unanswered, no-correct-option question — routes/quiz.py:372-379. Both selected and correct_label default to '', so is_correct = '' == '' is True for a malformed item, inflating score and mastery delta. Fix:is_correct = bool(correct_opt) and selected == correct_label.
Severity: MEDIUM + LOW · Source:
docs/backend-contract-bug-audit.md(findings #10, #29)routes/quiz.py:355-436.submit_quizsetscompleted_at(:432) but never reads it; re-POSTing the samequiz_idre-applies the mastery delta, incrementstimes_studied, appends another event, re-runsupdate_streak. Fix: ifattempt.get("completed_at")is set, return the stored result (or 409).routes/quiz.py:372-379. Bothselectedandcorrect_labeldefault to'', sois_correct = '' == ''is True for a malformed item, inflating score and mastery delta. Fix:is_correct = bool(correct_opt) and selected == correct_label.