Skip to content

added more flexibility to public interface around heartbeating#78

Open
virajmehta wants to merge 3 commits intomainfrom
viraj/heartbeat-in-steps
Open

added more flexibility to public interface around heartbeating#78
virajmehta wants to merge 3 commits intomainfrom
viraj/heartbeat-in-steps

Conversation

@virajmehta
Copy link
Member

@virajmehta virajmehta commented Mar 7, 2026

Note

Medium Risk
Public API changes to TaskContext::step and heartbeat plumbing could require downstream updates and may affect lease-extension behavior if incorrectly wired, though the underlying DB call remains the same.

Overview
Adds a new heartbeat module introducing a Heartbeater trait plus HeartbeatHandle (real DB-backed lease extension) and NoopHeartbeater (test/no-op), and re-exports these types from lib.rs.

Updates TaskContext to own a cloneable HeartbeatHandle, delegate TaskContext::heartbeat() to it, and expose TaskContext::heartbeat_handle() for passing heartbeating into other helpers.

Changes TaskContext::step so step closures receive StepState<State> (wrapping the user state plus an Arc<dyn Heartbeater>), enabling heartbeats during long-running step execution; tests are updated to use step_state.state.

Written by Cursor Bugbot for commit 9c60a6d. This will update automatically on new commits. Configure here.

@virajmehta virajmehta changed the title added more flexibility to public inteface around heartbeating added more flexibility to public interface around heartbeating Mar 7, 2026
@virajmehta virajmehta self-assigned this Mar 7, 2026
@virajmehta virajmehta marked this pull request as ready for review March 7, 2026 16:58
@virajmehta
Copy link
Member Author

@BugBot review

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant