diff --git a/docs/OPEN_POINTS.md b/docs/OPEN_POINTS.md index 8182265cd..3ad0553d1 100644 --- a/docs/OPEN_POINTS.md +++ b/docs/OPEN_POINTS.md @@ -26,7 +26,6 @@ Statuswerte: `BLOCKED_DECISION` (wartet auf eine Entscheidung) · `DEFERRED` | ID | Befund | Risiko | Beleg | Status | Nötige Entscheidung | |---|---|---|---|---|---| -| D1 | LEARN nach schwacher oder mittlerer Antwort, wenn das aktuelle Concept keine frische Frage mehr hat, das Topic aber noch andere Fragen bietet. Die SSOT regelt nur den Fall, dass das ganze Topic nicht mehr abfragbar ist (`content-exhausted`). | gering | [LearningQuestions §Zustandsübergänge](../ssot/ssot_function_definition_LearningQuestions.md) | BLOCKED_DECISION | Gewünschtes Tutor-Verhalten festlegen, dann SSOT ergänzen | | HOSTMOCK-REMOVAL | Der Host-Mock bleibt nach ADR 0009 (E9) als Rückfallebene neben der Browser-Emulation; zwei Laufzeiten bedeuten doppelte Wartung (Runner-Pool, Laufzeit-Sandbox, WebSocket-Simulation, Mock-Tests). | gering | [ARCHITECTURE.md, Host-Mock als Rückfallebene](ARCHITECTURE.md#host-mock-als-rückfallebene) | DEFERRED | Nach `v2.0.0` und einem Semester ohne Rückfall: eigene ADR über den Abbau nach den dort festgeschriebenen Kriterien und Umfang | ## Erweiterungen diff --git a/server/services/tutor/curriculum/learning-planner.ts b/server/services/tutor/curriculum/learning-planner.ts index 6d7857a06..de9fe4c35 100644 --- a/server/services/tutor/curriculum/learning-planner.ts +++ b/server/services/tutor/curriculum/learning-planner.ts @@ -282,7 +282,8 @@ function selectRemediation(context: RatingSelectionContext): { concept: Curricul const target = topic.concepts.find(({ id }) => id === scaffoldQuestion.concept); if (target) return { concept: target, question: scaffoldQuestion, scaffold }; } - return chooseQuestionInConcept(topic, facts, concept, currentQuestion, usedQuestionIds, difficulty, context.strategy); + return chooseQuestionInConcept(topic, facts, concept, currentQuestion, usedQuestionIds, difficulty, context.strategy) + ?? selectOtherConceptQuestion(context); } function selectClarification(context: RatingSelectionContext): { concept: CurriculumConcept; question: CurriculumQuestion } | null { @@ -290,7 +291,21 @@ function selectClarification(context: RatingSelectionContext): { concept: Curric const indicatorQuestion = strategy?.clarification === "new-indicator" ? topic.questions.find((question) => question.concept === concept.id && question.indicator !== currentQuestion.indicator && questionApplies(question, facts) && !usedQuestionIds.has(question.id)) : topic.questions.find((question) => question.concept === concept.id && question.indicator === currentQuestion.indicator && questionApplies(question, facts) && !usedQuestionIds.has(question.id)); - return indicatorQuestion ? { concept, question: indicatorQuestion } : chooseQuestionInConcept(topic, facts, concept, currentQuestion, usedQuestionIds, difficulty, strategy); + return indicatorQuestion + ? { concept, question: indicatorQuestion } + : chooseQuestionInConcept(topic, facts, concept, currentQuestion, usedQuestionIds, difficulty, strategy) ?? selectOtherConceptQuestion(context); +} + +/** + * A weak or medium answer in a Concept that has no fresh question left must not end LEARN while the Topic + * still offers questions (LearningQuestions SSOT, LEARN transitions): the next unmastered Concept whose + * prerequisites are mastered continues the dialog. The weak Concept stays unmastered and can be asked again later. + */ +function selectOtherConceptQuestion(context: RatingSelectionContext): { concept: CurriculumConcept; question: CurriculumQuestion } | null { + const { topic, facts, concept, observations, usedQuestionIds, difficulty, strategy } = context; + const nextConcept = selectNextConcept(topic, facts, observations, usedQuestionIds, concept.id, strategy); + const question = nextConcept ? selectQuestion(topic, nextConcept, facts, usedQuestionIds, difficulty, undefined, strategy) : null; + return nextConcept && question ? { concept: nextConcept, question } : null; } function selectAdvance(context: RatingSelectionContext): { concept: CurriculumConcept; question: CurriculumQuestion } | null { diff --git a/ssot/ssot_function_definition_LearningQuestions.md b/ssot/ssot_function_definition_LearningQuestions.md index f383303f5..18e248343 100644 --- a/ssot/ssot_function_definition_LearningQuestions.md +++ b/ssot/ssot_function_definition_LearningQuestions.md @@ -586,6 +586,7 @@ without formal Topic mastery claims. | Current phase | Condition | Next phase | Active Topic | Strategy behavior | |---|---|---|---|---| | LEARN | Topic mastery criteria not all true | LEARN | unchanged Topic | LEARN precedence | +| LEARN | Weak or medium answer, the current Concept has no fresh question left, another unmastered Concept of the Topic with mastered prerequisites has one | LEARN | unchanged Topic | next such Concept in Topic order; the weak Concept stays unmastered and is not marked as exhausted | | LEARN | Topic A mastered; applicable unmastered Topic B exists | LEARN | highest-precedence unmastered Topic | acquisition precedence; mastered Topics skipped | | LEARN | No probeable unmastered Topic, but unresolved unmastered Topic remains | LEARN (blocked) | highest-precedence unresolved Topic | `progressionBlockedReason: content-exhausted`; bounded free fallback only | | LEARN | All relevant acquisition Topics mastered or no longer fact-applicable; no unresolved blocker | DEEPEN | same mastered Topic | post-mastery resolution begins | diff --git a/tests/server/services/tutor/session-question-repetition.test.ts b/tests/server/services/tutor/session-question-repetition.test.ts index c9478d97e..a64c4aea9 100644 --- a/tests/server/services/tutor/session-question-repetition.test.ts +++ b/tests/server/services/tutor/session-question-repetition.test.ts @@ -221,11 +221,13 @@ describe("relaxed repetition keeps its normative revisit", () => { expect(new Set(ids.slice(0, firstRepeat))).toEqual(new Set(valuesQuestions)); }); - it("strict never revisits once the weak learner has used every question of the Concept", async () => { + it("strict never revisits; a weak learner who used every question of the Concept moves on to the next Concept (D1)", async () => { const { served } = await runSession({ turns: 5, window: 0, rating: () => 1 }); const ids = plannedIds(served); expect(duplicates(ids)).toEqual([]); - expect(new Set(ids)).toEqual(new Set(["values-application", "values-concept", "values-prediction"])); + expect(ids.slice(0, 3).sort()).toEqual(["values-application", "values-concept", "values-prediction"]); + expect(ids.slice(3).every((id) => id.startsWith("output-"))).toBe(true); + expect(ids.length).toBeGreaterThan(3); }); });