Class RegressionAlertService

java.lang.Object
dev.dokimos.server.service.RegressionAlertService

@Service public class RegressionAlertService extends Object
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 Details

    • RegressionAlertService

      public RegressionAlertService(ExperimentRunRepository runRepository, ComparisonSupport comparisonSupport, org.springframework.context.ApplicationEventPublisher eventPublisher)
  • Method Details

    • evaluateOnCompletion

      public void evaluateOnCompletion(ExperimentRun run)
      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