Skip to content

Fleet badge counts agents that owe a reply, not agents with a measured problem #493

Description

@Jacksondr5

Problem

The Fleet badge on the rail counts the wrong thing. The Fleet page definition says it counts agents with a measured problem. The code counts agents that owe someone a reply.

An agent owing a reply is the normal state of a busy fleet, so the badge is lit most of the time and does not tell the person that something is broken.

What the definition says

Fleet page AC23: the badge counts agents that have at least one measured problem; an agent counts once however many problems it has, unknowns never count, and the badge never counts open asks to the person or silence notices.

AC21 lists the measured problems: a failed latest run, a delivery alarm, and a run that has waited past the dispatch threshold.

What the code does

  • countFleetAlerts in apps/web/src/j5/fleet/fleet.logic.ts counts agents with openAsks > 0.
  • openAsks comes from apps/server/src/j5/a2a/FleetReadsHttp.ts: open Exchanges whose receiver is that agent.
  • apps/web/src/j5/fleet/FleetRailEntry.tsx renders that count as the badge.
  • The test in fleet.logic.test.ts is named "counts alerts from owed asks only".

A failed run or a delivery alarm does not change the badge. It has been this way since the page shipped in #149.

Decision

The definition is right and the code is wrong (Jackson, 2026-10-08).

Done when

  • The badge counts agents with at least one of the measured problems in AC21, once each.
  • An agent that only owes a reply does not count.
  • Unknown facts do not count.
  • The test asserts those three things.

Mobile: check whether the mobile app shows a Fleet badge and, if it does, that it uses the same count.

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions