Skip to content

Interface: LessonSignalTriggerBuilder ​

Defined in: builders/lesson-signal-trigger-builder.ts:7

Fluent configurator for lesson promotion signal triggers ($t in .emitSignalWhen(sig, $t => ..., mapper)).

Configures the minimum lifetime clean passes, maximum lifetime violations, and cooldown window in hours required before emitting a rule-promotion signal for a high-leverage lesson.

Methods ​

build() ​

ts
build(): object;

Defined in: builders/lesson-signal-trigger-builder.ts:48

Compiles and returns the frozen threshold numbers for this promotion trigger.

Returns an immutable object containing minCleanPasses, maxViolations, and cooldownHours.

Returns ​

object

Frozen trigger thresholds.

NameTypeDefined in
cooldownHoursnumberbuilders/lesson-signal-trigger-builder.ts:51
maxViolationsnumberbuilders/lesson-signal-trigger-builder.ts:50
minCleanPassesnumberbuilders/lesson-signal-trigger-builder.ts:49

cooldownHours() ​

ts
cooldownHours(hours): LessonSignalTriggerBuilder;

Defined in: builders/lesson-signal-trigger-builder.ts:39

Sets the cooldown window in hours before re-emitting the signal for the same lesson.

Prevents duplicate promotion signals from firing repeatedly within hours hours.

Parameters ​

ParameterTypeDescription
hoursnumberPositive cooldown duration in hours.

Returns ​

LessonSignalTriggerBuilder

New immutable signal trigger builder.


maxViolations() ​

ts
maxViolations(count): LessonSignalTriggerBuilder;

Defined in: builders/lesson-signal-trigger-builder.ts:28

Sets the maximum lifetime violated count allowed to emit the promotion signal.

Lessons with more than count lifetime violations are excluded from promotion signal emission.

Parameters ​

ParameterTypeDescription
countnumberMaximum allowed lifetime violation count.

Returns ​

LessonSignalTriggerBuilder

New immutable signal trigger builder.


minCleanPasses() ​

ts
minCleanPasses(count): LessonSignalTriggerBuilder;

Defined in: builders/lesson-signal-trigger-builder.ts:17

Sets the minimum lifetime clean_pass count required to emit the promotion signal.

Lessons must accumulate at least count clean passes before becoming eligible for promotion.

Parameters ​

ParameterTypeDescription
countnumberMinimum lifetime clean pass count.

Returns ​

LessonSignalTriggerBuilder

New immutable signal trigger builder.

Released under the MIT License.