Skip to content

feat: Add optional heartbeat response handling#11

Closed
Copilot wants to merge 1 commit intofeat/optional-heartbeat-responsesfrom
copilot/sub-pr-10
Closed

feat: Add optional heartbeat response handling#11
Copilot wants to merge 1 commit intofeat/optional-heartbeat-responsesfrom
copilot/sub-pr-10

Conversation

Copy link

Copilot AI commented Nov 19, 2025

Adds opt-in heartbeat response monitoring. By default, heartbeats are sent automatically but responses are not delivered to the subscription channel, avoiding noise for applications that don't need connection health monitoring.

Changes

  • API: Added return_heartbeat_response(bool) method to all plant handles for runtime control
  • Default behavior: Heartbeat responses ignored unless explicitly enabled (ignore_heartbeat_response: true by default)
  • Command routing: Added SetHeartbeatResponseMode command and updated SendHeartbeat to accept ignore_response parameter
  • Response handling: Modified request_handler to respect heartbeat response mode when callbacks are registered

Usage

// Enable heartbeat monitoring during trading hours
handle.return_heartbeat_response(true).await;

// Disable during off-market hours to avoid false alarms
handle.return_heartbeat_response(false).await;

Breaking Change

Partially reverts 0.5.0 behavior where all heartbeat responses were automatically delivered. Applications relying on heartbeat responses in the subscription channel must now call return_heartbeat_response(true).


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI changed the title [WIP] Add optional heartbeat response handling feat: Add optional heartbeat response handling Nov 19, 2025
Copilot AI requested a review from pbeets November 19, 2025 16:22
@pbeets pbeets closed this Nov 20, 2025
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.

2 participants