Package dev.dokimos.server.service
Class RegressionAlertService
java.lang.Object
dev.dokimos.server.service.RegressionAlertService
Computes, inside the run-completion transaction, whether a just-completed run regressed against its
baseline, and publishes a
RegressionAlertEvent when it did. The event is delivered to the
project's webhooks only after the transaction commits (see AlertWebhookDispatcher), so the
decision is part of completion but the network I/O is not.
The baseline is resolved exactly as the CI gate resolves it (the most recent SUCCESS run of the
same experiment, scoped by dataset version and git branch), and the comparison uses the same shared
ComparisonSupport path, so an alert fires on the same regression the gate would fail on. An
alert fires only when the pass rate both regressed and the drop is statistically significant, which
keeps noise from minor run-to-run jitter off the webhook.
-
Constructor Summary
ConstructorsConstructorDescriptionRegressionAlertService(ExperimentRunRepository runRepository, ComparisonSupport comparisonSupport, org.springframework.context.ApplicationEventPublisher eventPublisher) -
Method Summary
Modifier and TypeMethodDescriptionvoidEvaluates a completed run for a significant pass-rate regression and, if found, publishes a regression alert event.
-
Constructor Details
-
RegressionAlertService
public RegressionAlertService(ExperimentRunRepository runRepository, ComparisonSupport comparisonSupport, org.springframework.context.ApplicationEventPublisher eventPublisher)
-
-
Method Details
-
evaluateOnCompletion
Evaluates a completed run for a significant pass-rate regression and, if found, publishes a regression alert event. Never throws: any failure to resolve or compare is logged and swallowed so the surrounding run-completion transaction is unaffected.- Parameters:
run- the run that just reached a terminal status
-