Skip to content

restart_agent corrupts the health monitor heartbeat anchor, and the peer-progress gate then hides it #3605

Closed

Description

@jwbron

Summary

After restart_agent, the health monitor reports an impossible elapsed time for the restarted role, and the resulting alert is suppressed by the peer-progress gate, so an agent that does not exist produces no alert.

Evidence

After restarting task_planner on issue-3596-v2, the orchestrator logged repeatedly:

Heartbeat alert deferred by alive-signal gate pipeline_id=issue-3596-v2 agent_id=task_planner elapsed_seconds=1784944189 reason="peer heartbeat 4s ago"

1784944189 seconds is roughly 56 years: a Unix epoch timestamp being used as a duration, i.e. last_heartbeat was reset to 0 and now - 0 reported as elapsed.

At the same time the role had no pod and no Job (see #3597) while pipeline state reported it running with container_id: null. The alert was suppressed anyway by _has_recent_peer_progress because a DIFFERENT agent had heartbeated 4 seconds earlier.

Why it matters

This is the most extreme instance of #3595 root cause 1. The gate indefinitely suppressed an alert about an agent that did not exist, whose timer was visibly corrupt. Two independent defects (a corrupt anchor, a dependency-blind gate) combined so that the monitoring which should catch a failed restart is structurally deaf to it.

Suggested fix

  1. On restart, either clear the agent's health state entirely so it is treated as never-seen, or set last_heartbeat to the restart time rather than 0.
  2. Separately, an impossible elapsed value (greater than pipeline age) should be treated as a bug signal and surfaced, not silently gated.

The dependency-blind gate itself is tracked in #3595 root cause 2 / #3596 slice 3.

Related

#3595 root cause 1 and finding 8b, #3597, #3601

Activity

  1. added a commit that references this issue on Jul 25, 2026
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions