Repository navigation
feat(mastery): retain scoped teaching feedback and strategy outcomes - #1936
Merged
Merged
Conversation
This was referenced Oct 12, 2026
alvinets
pushed a commit
to alvinets/DeepTutor
that referenced
this pull request
Nov 8, 2026
…uide feat(mastery): retain scoped teaching feedback and strategy outcomes
alvinets
pushed a commit
to alvinets/DeepTutor
that referenced
this pull request
Nov 8, 2026
…uide feat(mastery): retain scoped teaching feedback and strategy outcomes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem and behavior
Mastery Path can remember intake answers, but a single free-text preference field does not reliably preserve independent corrections. Repeated teaching difficulties and attempted explanations also need a small durable record, rather than relying entirely on the conversation window.
This adds keyed teaching feedback to the existing per-path
LearnerProfileandmastery_profiletool. Explicit learner requests stay separate from objective-local observations and strategy outcomes. Routinemastery_statussnapshots return the path preferences and at most three relevant current-objective observations. Explicitinclude_teaching_historyinspection returns the bounded path record so the learner can inspect, correct or remove notes through conversation.For example, a learner can say that a definition is confusing, ask for a spatial example, and later report that the example helped. The tutor can remember both the request and the result without treating the explanation itself as proof of understanding or awarding mastery credit.
Design and safeguards
Validation
Targeted tests first failed because the structured update API and trusted quote injection were missing. The explicit-inspection test also failed before the read option was implemented.
The tests cover reload/persistence, independent corrections/removal, legacy compatibility, scope, limits, invalid confirmation, actual-quote verification, spoofed private context replacement, stale replay, atomic rollback, and resumed snapshot delivery/full inspection without mastery changes. Tentative teaching observations alone do not count as completed learner intake.
Limits and follow-up
This implements durable bounded state and its automatic delivery, not a guarantee that a model always identifies confusion or selects the best pedagogical explanation. A quote is mechanically checked for provenance; whether it actually supports the interpretation remains the tutor's responsibility. There is no new formal mastery score or automatic inference that silence means understanding.
The existing model chooses when a meaningful update is warranted. The learner can inspect/correct notes through the existing tools; a dedicated visual preferences editor is not included. Notes bind to the path's stable objective IDs and rely on native outline identity semantics.
Please consider this as a concrete implementation of the core durable-adaptation mechanism discussed in #1933. It is reasonable to improve the selection, update contract or user experience if there is a better fit, while preserving evidence provenance, non-destructive updates, bounded context and the separation from mastery assessment.
Refs #1933
Contribution status, related fixes and remaining requirements: tracking issue #1940.
Follow-up: actionable current-objective focus
Commit f4b0197 addresses the advisory part of #1949 through the existing profile owner: the next-step focus contains at most three current-objective observations, including the attempted strategy and its learner-supported outcome. Unrelated historical notes do not become the current difficulty. Fresh learner requests and compatible teaching defaults take precedence over stale summaries; pacing remains advisory rather than a rigid paragraph/quiz counter.
The clean native checkout passed 30 focused profile/focus tests. No extra inference pass or second memory database is added. Persistence, scoping and instruction delivery are tested; interpreting new feedback, saving an important observation and selecting an effective explanation remain model decisions, not guaranteed semantic compliance.
See #1949 and tracking issue #1940.
Continuity follow-up
Commit 1a2cdb5 adds non-destructive intake updates, explicitly authorized clearing, cross-session correction persistence and bounded save-failure handling. The independent review also checked that the unsaved notice composes with existing card/empty-final delivery behavior rather than bypassing it.
Commit b081d97 corrects a subsequently reproduced boundary case: the unsaved
notice must not finalize an intermediate, textless tool batch. It is attached
only when actual prose is finishing or the requested card has been delivered.
Both new regression cases failed before the fix; all eight focused continuity
tests pass afterward. This preserves useful preparation/delivery after optional
profile persistence fails; it does not introduce another retry loop.
Clean contribution checkout: 111 passed across profile continuity, teaching compass and Mastery capability tests; scoped Ruff and whitespace checks pass. These are overlapping regression scopes, not additional coverage percentages. The mechanism preserves recorded requests; it does not claim perfect model compliance with every teaching preference.