Quizzes & Practice — User submission
complete
S
Student be3ff24b-29b
Category:
Quizzes & PracticeType:
User submissionUser role:
studentUser feedback:
I told it to give me a spelling quiz but the questions where math questions not spelling
P
Patrick Jean
marked this post as
complete
Verified Fixed (2026-04-25)
— Bug resolved by PR #1038 (commit 5bce1619), merged to main
. Added null safety check for zpd_domain
at backend/domains/student/api/sse.py:193-218
— when subject is None, all downstream domain-dependent operations (including quiz question generation) are now safely skipped, preventing subject mismatches like spelling quizzes showing math questions.P
Patrick Jean
Investigation (2026-04-25) — Quiz Subject Mismatch — Fresh Codebase Verification
main
at 702cd900. Bug confirmed present.Root cause verified:
backend/domains/student/api/sse.py:190
— zpd_domain = subject or "math"
. When a student requests a spelling quiz, the subject
parameter is often None (the LLM determines subject from conversation context, not the SSE endpoint params). This causes zpd_domain to default to "math", which injects math-specific ZPD context, quiz diversity constraints (number ranges, math contexts), and thematic seeds into the system prompt — overriding the student's intent.Additional math bias locations found:
- sse.py:599—result_data.get("subject", "math")in mastery processing
- sage_tools.py:1470,2398— Tool function defaultsdomain="math"
- routes.py:96,915,983,1015— REST endpoint defaultsdomain="math"
Fix PR #1041
(consolidated) correctly addresses this by:- Changing zpd_domain = subject or "math"→zpd_domain = subject(None = no domain bias)
- Wrapping all domain-specific context injections with if zpd_domain:guards
- Recovering subject from tool args when missing from quiz results
- Skipping mastery updates when no subject is available
- Includes unit tests for subject recovery logic
Status: PR #1041 is MERGEABLE but needs human review approval.
This is the blocking item — the fix has been ready since 2026-04-19.P
Patrick Jean
Verification (2026-04-25) — Quiz Subject Mismatch — Bug Still Present, PRs Mergeable
main
at 702cd900 (no new commits since last verification).Bug confirmed present:
backend/domains/student/api/sse.py:190
— zpd_domain = subject or "math"
hardcodes math as default when subject is None. This biases all 7 downstream context layers (ZPD, guided session, auto-plan, spaced repetition, mastery diagnostics, worldview/framework, quiz diversity) toward math. Secondary default at line 599 in _process_quiz_mastery()
: subject = result_data.get("subject", "math")
.Fix PRs (all OPEN, MERGEABLE, awaiting review):
- PR #1041 — consolidated fix (quiz subject bias + SSE hang + grade label)
- PR #1042 — targeted fix (subject/topic in interactive component results)
Action needed:
Human review and merge of PR #1041 or #1042.P
Patrick Jean
Verification (2026-04-25) — Quiz Subject Mismatch — Bug Still Present, PRs Mergeable
main
at 702cd900 (no new commits since last verification).Bug confirmed present:
backend/domains/student/api/sse.py:190
— zpd_domain = subject or "math"
defaults all non-explicit-subject requests to math ZPD context, biasing quiz content toward math even when a student requests spelling/other subjects.Fix PRs (all MERGEABLE):
- PR #1042 — Include subject/topic in interactive component results
- PR #1041 — Consolidated fix (quiz subject bias + SSE hang + grade label)
- PR #1036 — Remove hardcoded math default
Action needed:
Merge any one of the above PRs to resolve. PR #1041 is the most comprehensive (fixes 3 bugs in one PR).P
Patrick Jean
Verification (2026-04-25) — Quiz Subject Mismatch — No Change, PRs Mergeable
main
at 702cd900 (unchanged since last check). Bug confirmed present: backend/domains/student/api/sse.py:190
— zpd_domain = subject or "math"
.Fix PRs #1041 + #1042 remain open and MERGEABLE. Awaiting human review and merge.
P
Patrick Jean
Verification (2026-04-24) — Quiz Subject Mismatch — Bug Present, PRs Mergeable
main
at 702cd900 (1 new commit since last check: #1054 docs-only cycle plan — does not affect bug).Bug confirmed present:
backend/domains/student/api/sse.py:190
— zpd_domain = subject or "math"
still defaults to math when subject is missing.Fix PRs status:
- PR #1041(quiz subject bias + grade label + SSE hang): MERGEABLE, branch BEHIND main
- PR #1042(subject/topic in interactive component results): MERGEABLE, branch BEHIND main
Both PRs need a branch update but have no merge conflicts.
Recommend reviewing and merging #1041 first (broader fix), then #1042 (companion fix).
P
Patrick Jean
Verification (2026-04-24) — Quiz Subject Mismatch — All Fix PRs Confirmed Mergeable
main
at 86fec90c (no change). Bug confirmed present: backend/domains/student/api/sse.py:190
— zpd_domain = subject or "math"
.All key fix PRs verified as MERGEABLE and REVIEW_REQUIRED:
- PR #1041— Fixes this bug (plus SSE hang + grade label). Files:sse.py,sse_stream.py,EstimatedMasteryBadge.tsx+ tests.
- PR #1042— Companion fix: includes subject/topic in interactive component results.
Blocker:
Human review approval needed on PR #1041 (then #1042). Superseded PRs #1031–#1040 should be closed to reduce noise.P
Patrick Jean
Verification (2026-04-24) — Quiz Subject Mismatch — Correction: PRs Are Mergeable
main
at 86fec90c (unchanged since last check).Bug confirmed present:
backend/domains/student/api/sse.py:190
— zpd_domain = subject or "math"
still defaults all quizzes to math when subject is not provided.Status correction:
Previous comments stated PRs need rebase — this is no longer accurate
. Both PRs are currently MERGEABLE
with no conflicts:- PR #1041 (fix(student,chat,ui)) — fixes theor "math"default + SSE hang + grade label. Mergeable, awaiting human review.
- PR #1042 (fix(quiz)) — includes subject/topic in interactive component results. Mergeable, awaiting human review.
Blocked on:
Human review approval for both PRs. No code changes or rebasing needed.C
Claude Code (Investigator)
Verification (2026-04-24) — Quiz Subject Mismatch — No Change, PRs Need Rebase
main
at 86fec90c (unchanged since last check).Bug confirmed present:
backend/domains/student/api/sse.py:190
— zpd_domain = subject or "math"
defaults all quizzes to math regardless of actual subject.Fix PRs:
#1041 (removes math default) + #1042 (includes subject in interactive component results) — both OPEN, MERGEABLE, BEHIND main
— need rebase. Awaiting human review.
P
Patrick Jean
Verification (2026-04-24) — Quiz Subject Mismatch — No Change
main
at 86fec90c (no new commits since last check).Bug confirmed present:
backend/domains/student/api/sse.py:190
— zpd_domain = subject or "math"
hardcodes math as default when subject is missing, causing spelling quizzes to generate math questions.Fix PRs:
#1041 + #1042 still OPEN, must merge together. No competing changes on main.Load More
→