mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 13:49:40 +08:00
Asking the tutor "what am I studying?" in a fresh chat answered "no mastery path has been built yet, let me create one" to learners who had several, and left an empty path behind for every attempt (#909). Both halves come from reads going through get_or_create. A turn with no explicit path and no selected book resolves its id to the conversation's own scratch id, so the creating read manufactured a path under that id — five such asks, five orphaned empty paths — and then truthfully reported the empty thing it had just made. Reads now load without creating (_load_path). mastery_status treats a missing path exactly like an unbuilt one, and mastery_quiz / _grade / _assess refuse an unbuilt path by name instead of half-creating it. The empty-status message is the other half: unconditionally telling the model to build is what made it replace a course rather than look for it. It now reports how many built paths exist elsewhere and points at mastery_paths / mastery_switch, keeping the build prompt for a learner who genuinely has none. Building still creates — mastery_build goes through its own write path.