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
Surfaced during work on #191 (Wash's vocab-quiz scoring fix, PR #198).
The bug
The test helper MakeAttempt in our vocabulary progress test fixtures (e.g., MasteryAlgorithmIntegrationTests.cs, MultiDayLearningJourneyTests.cs, VocabularyProgressServiceTests.cs) does not set DifficultyWeight on the attempt object. As a result, production defaults the weight to 1.0f for both MC (recognition) and Text (production) attempts.
In production code, MC attempts use weight 1.0f and Text attempts use weight 1.5f (production-recall bonus, lines ~138–144 of VocabularyProgressService.cs).
Why this matters
Tests using MakeAttempt(WasCorrect: true, IsTextEntry: true) do NOT exercise the 1.5× weighting that real Text attempts trigger in production. That means:
Tests systematically underestimate streak growth from text-entry attempts (1.0× instead of 1.5×).
During Latter quiz rounds rapidly empty #191's fix, Wash had to pad Tier 1 fixtures from 7 MC + 2 Text to 8 MC + 2 Text because the test was producing mastery = 10/12 = 0.833 instead of the production-equivalent 10.5/12 = 0.875 (just shy of the 0.85 IsKnown floor under divisor 12).
Background
Surfaced during work on #191 (Wash's vocab-quiz scoring fix, PR #198).
The bug
The test helper
MakeAttemptin our vocabulary progress test fixtures (e.g.,MasteryAlgorithmIntegrationTests.cs,MultiDayLearningJourneyTests.cs,VocabularyProgressServiceTests.cs) does not setDifficultyWeighton the attempt object. As a result, production defaults the weight to1.0ffor both MC (recognition) and Text (production) attempts.In production code, MC attempts use weight
1.0fand Text attempts use weight1.5f(production-recall bonus, lines ~138–144 ofVocabularyProgressService.cs).Why this matters
Tests using
MakeAttempt(WasCorrect: true, IsTextEntry: true)do NOT exercise the 1.5× weighting that real Text attempts trigger in production. That means:7 MC + 2 Textto8 MC + 2 Textbecause the test was producingmastery = 10/12 = 0.833instead of the production-equivalent10.5/12 = 0.875(just shy of the 0.85 IsKnown floor under divisor 12).Proposed fix
Either:
MakeAttemptmirror production's weight defaults:DifficultyWeight = IsTextEntry ? 1.5f : 1.0f.Then revert the
7→8MC padding in #191's fixtures (PR #198) since the original numbers will reflect production weights once the helper is fixed.Acceptance
MakeAttemptproduces production-equivalent weights.Cross-references
tests/SentenceStudio.UnitTests/Integration/MasteryAlgorithmIntegrationTests.cstests/SentenceStudio.UnitTests/Integration/MultiDayLearningJourneyTests.cs.squad/agents/wash/history.md) flagging the gotcha