From ef5b94545faad173380c181ffb74f9e312c76d91 Mon Sep 17 00:00:00 2001 From: "M.V. Hutz" Date: Tue, 13 Jan 2026 19:34:29 -0500 Subject: [PATCH] fix: correct event handler registration in plugins Fixed incorrect event handler registration in two plugins: - Statistics plugin was calling Step instead of Stop on StopEvent, preventing statistics from being printed at the end of execution. - Logs plugin was listening to StopEvent instead of StepEvent, causing it to only log once at the end instead of on each step. --- internal/plugins/debug.go | 2 +- internal/plugins/statistics.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/plugins/debug.go b/internal/plugins/debug.go index 77bd4c6..15fe54b 100644 --- a/internal/plugins/debug.go +++ b/internal/plugins/debug.go @@ -14,7 +14,7 @@ type Logs struct { func NewLogs(logger *slog.Logger, process *engine.Engine) *Logs { plugin := &Logs{logger, process} - process.On(engine.StopEvent, plugin.Step) + process.On(engine.StepEvent, plugin.Step) return plugin } diff --git a/internal/plugins/statistics.go b/internal/plugins/statistics.go index 00bf5c4..62223e4 100644 --- a/internal/plugins/statistics.go +++ b/internal/plugins/statistics.go @@ -20,7 +20,7 @@ func NewStatistics(process *engine.Engine) *Statistics { plugin := &Statistics{} process.On(engine.StartEvent, plugin.Start) process.On(engine.StepEvent, plugin.Step) - process.On(engine.StopEvent, plugin.Step) + process.On(engine.StopEvent, plugin.Stop) return plugin }