Skip to content

🤖 Heartbeat: changing the global default interval does not re-anchor fixed schedules that follow it #5741

Description

@ThomasK33

Problem: Since #5726, a workspace heartbeat can follow the global default interval (no saved intervalMs). A change to the global default (config.heartbeatDefaultIntervalMs) does not stamp that workspace's heartbeat.scheduleUpdatedAt. HeartbeatService re-reads the interval on its next tick. But a fixed-interval (trigger: "interval") workspace that restarts anchors its first deadline with max(last firing, scheduleUpdatedAt), so a heartbeat that fired under the old default can bypass the change once.

Fix idea: when updateHeartbeatDefaultIntervalMs changes the value, stamp scheduleUpdatedAt on every enabled workspace heartbeat without its own intervalMs, inside the same config write. Or let the anchoring read a global "default changed at" value.

Low impact: one early or late heartbeat after a restart.

Found by the final check of #5726.


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions