Function: mergeLessonOutcomePrecedence()
ts
function mergeLessonOutcomePrecedence(current, incoming): LessonOutcome;Defined in: runtime/lessons/lesson-scoring.ts:24
Merges two 4-state LessonOutcome values using strict severity precedence (SPEC.md §3.4.3).
Enforces violated > gate_rejected_unrecovered > gate_rejected_recovered > clean_pass so each (stepExecId, lessonId) records at most one worst-case outcome.
Parameters
| Parameter | Type | Description |
|---|---|---|
current | LessonOutcome | undefined | Previously recorded outcome for the lesson in the active step, if any. |
incoming | LessonOutcome | Newly observed outcome for the lesson. |
Returns
Higher-severity outcome according to the 4-state precedence order.