Skip to content

racedMarkersPossible() counts a stale peer's last-known role as active

Id: TD-PPagop-26082707 · Status: resolved · Filed: 2026-08-27 · Resolved: 2026-09-22 · Ref: https://github.com/Pullwright/agent-ops/pull/1763

dashboard/index.html’s racedMarkersPossible() (added in #832) filters fleet.nodes on role === “active” without checking n.stale (heartbeat_age_s > 1800s, the same threshold nodeUnknown()/other call sites already use at dashboard/index.html:1440,2871,3158). A peer that went dark more than 30 minutes ago but whose last heartbeat recorded role: “active” still counts toward “more than one active node”, so the ↻ raced / recovered-race badges can still render for a cycle even when that peer is actually offline and could not have contended for the claim. Suggested fix: exclude stale peers from the active-node count in racedMarkersPossible(), e.g. fleetNodes().filter(function (n) { return n.role === "active" && !n.stale; }). Low impact (only affects the badge’s precision during a peer outage window), not a regression introduced against the issue’s own acceptance criteria, which only requires collapsing the single-active-node case.

Noticed while the Approver was judging https://github.com/Poetic-Poems/agent-ops/pull/832.

Migrated to https://github.com/Poetic-Poems/agent-ops/issues/1005.