Function: shouldRetireLesson()
ts
function shouldRetireLesson(
lesson,
retirement,
slidingWindow?
): boolean;Defined in: runtime/lessons/lesson-scoring.ts:104
Evaluates the 3-way disjunction determining whether lesson must be retired (SPEC.md §3.4.3).
Retires when totalViolated >= v, or $(N_{\text{eff}} \ge m \land c_W / N_{\text{eff}} < \text{minRate})$, or $(|W| \ge m \land c_W / |W| < \text{minRate})$ where $N_{\text{eff}} = c_W + v_W + g_W^{\text{unrecovered}}$.
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
lesson | LessonRecord | undefined | Lesson record with updated outcome counters. |
retirement | | LessonRetirementConfig | undefined | undefined | Optional retirement thresholds from LessonsNode. |
slidingWindow? | number | DEFAULT_LESSON_SCORING_WEIGHTS.DEFAULT_SLIDING_WINDOW_SIZE | Sliding window size $K$ (defaults to 20). |
Returns
boolean
True when lesson satisfies any of the three retirement conditions.