fix: correct event handler registration in plugins #29

Merged
mvhutz merged 1 commits from fix/plugin-event-handlers into main 2026-01-14 00:35:03 +00:00
Owner

Description

This PR fixes incorrect event handler registration in two plugins that were introduced in the refactoring.
The bugs prevented the plugins from functioning as intended.

Fixed issues:

  • Statistics plugin was registering plugin.Step for StopEvent instead of plugin.Stop, preventing statistics from being printed at the end of execution.
  • Logs plugin was listening to StopEvent instead of StepEvent, causing it to log only once at the end instead of on each reduction step.

Benefits

Statistics are now correctly printed at the end of execution.
Debug logs now correctly show each reduction step instead of just the final state.
Plugins now work as originally intended before the refactoring.

Checklist

  • Code follows conventional commit format.
  • Branch follows naming convention (<type>/<description>).
  • Tests pass (if applicable).
  • Documentation updated (if applicable).
## Description This PR fixes incorrect event handler registration in two plugins that were introduced in the refactoring. The bugs prevented the plugins from functioning as intended. Fixed issues: - Statistics plugin was registering `plugin.Step` for `StopEvent` instead of `plugin.Stop`, preventing statistics from being printed at the end of execution. - Logs plugin was listening to `StopEvent` instead of `StepEvent`, causing it to log only once at the end instead of on each reduction step. ## Benefits Statistics are now correctly printed at the end of execution. Debug logs now correctly show each reduction step instead of just the final state. Plugins now work as originally intended before the refactoring. ## Checklist - [x] Code follows conventional commit format. - [x] Branch follows naming convention (`<type>/<description>`). - [x] Tests pass (if applicable). - [x] Documentation updated (if applicable).
mvhutz added 1 commit 2026-01-14 00:34:39 +00:00
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.
mvhutz merged commit 5c54f4e195 into main 2026-01-14 00:35:03 +00:00
mvhutz deleted branch fix/plugin-event-handlers 2026-01-14 00:35:03 +00:00
Sign in to join this conversation.