The HeartbeatService constructor was refactored to use an on_heartbeat
callback instead of accepting provider/model parameters directly. This
commit updates the tests to match the new API:
- Removed DummyProvider class (no longer needed)
- Updated test_start_is_idempotent to use new constructor
- Removed test_decide_returns_skip_when_no_tool_call (_decide method no longer exists)
- Updated test_trigger_now_executes_when_decision_is_run to use on_heartbeat callback
- Updated test_trigger_now_returns_none_when_no_callback to test new behavior
Also fixed a bug where start() was not idempotent - it now checks if a
task is already running before creating a new one.
All 3 HeartbeatService tests now pass.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>