Skip to content

Leave Disabled Workflows and Old Runs Out of backlog_metrics.py's Failing Branches #4587

Backlog

Description

@ptr727

Problem

backlog_metrics.py --format json lists a branch as failing when a workflow's latest completed run on it failed, however old that run is, and whether or not the workflow still exists or is enabled. The branch read takes gh run list --branch over the latest runs, and branch_attention keys each workflow by its database id. Nothing checks the workflow against actions/workflows, and nothing bounds how old the deciding run may be. The window only bounds failed_runs_in_window.

So a workflow that was disabled or deleted after a failed run stays in failing_branches every week. A branch with no run in months is reported as failing now.

Why it matters

HomeAutomation-Config's scripts/fleet_attention.py reads the same branch state with two filters. It counts only workflows that still exist and are enabled, from repos/{o}/{r}/actions/workflows with state active. A run older than 30 days decides nothing. #4437 replaces that script with the hub's attention lists. Without these filters, the switch would bring back the false entries the script was written to keep out of the weekly mail.

Possible directions

These are for the hub to decide.

  1. Drop a workflow that is not active in actions/workflows from failing_branches and recovered_branches.
  2. Leave out a deciding run older than a bound, or report its age so a reader can weigh it.

Related

Done looks like

  • A disabled or deleted workflow whose last run on develop failed is absent from failing_branches, and a test covers it.
  • How old a deciding run may be is either bounded or reported, and the choice is documented in scripts/README.md.

Activity

  1. added
    bug
    script
    on Nov 30, 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

    bugscript

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions