Skip to content

feat(roadmap): the phase of each item drives the stuck-item alert #5495

Closed

Description

@dan-petty

Problem or Motivation

An item can stop between two jobs with no failure line: no job is due by its own rule, and no person cause is recorded. Today 28 bot items wait for a person for a median of 6 days.

Issue #2919 built the age gauge devops_cli_roadmap_item_age_seconds{repo, state, plan} and the alert RoadmapServiceItemStuck. The alert reads only two states: blocked, and ready with a plan PR. It does not see an item that stops in another phase, and it fires for an item that a unit works on or that waits for a person by a recorded cause. The approved pipeline split design (tracker #5482) derives one phase for each item. The same phase function feeds the funnel and due_jobs (#5504).

Proposed Solution & Architectural Design

  • Add the pure function phase(item) in src/devops_cli/roadmap/phase.py. It reads only the labels, the record block (store.py) and the PR facts. Phases: new, judged, researched, ready, plan-checked, staged, planned, tests-pushed, code-checked, in-review, ready-for-review, reviewed, merged. A phase whose job is not built yet stays out until its item ships.
  • The age gauges devops_cli_roadmap_item_age_seconds and devops_cli_roadmap_oldest_item_number get the labels {repo, phase} in place of {repo, state, plan}. No shim: the dashboard panels that read state and plan change in the same PR.
  • Add the count gauge devops_cli_roadmap_items{repo, phase} from the listing snapshot, beside _emit_item_ages (github/metrics.py). A label set that goes away gets 0 one time. feat(roadmap): count the claims of each repository #4579 keeps only the claims gauge.
  • The phase age is the time since the newest label event, record at value or PR event that set the phase. The step writes no new key.
  • An item is stalled when all of these are true:
  • Emit devops_cli_roadmap_stalled_items{repo, phase}.
  • Change the expression of RoadmapServiceItemStuck to the stall rule: the stalled count is above 0 for 1 h. Delete the old expression. Add no second stuck-item alert.
  • devops roadmap explain <n> prints the phase and the phase age.

Target Subsystem

Roadmap Service and roadmap jobs (src/devops_cli/roadmap/, src/devops_cli/github/metrics.py, k8s/devops/monitoring/).

Acceptance Criteria

  • Test first: a table test gives the phase of each fixture state. The test fails on the base.
  • A test: an item with a running unit, a person cause or a person claim is not stalled.
  • A test: the gauge sends 0 one time for a phase that empties.
  • A promtool rule test fires RoadmapServiceItemStuck at 1 h of stalled items and not before. The rules file holds one stuck-item alert.
  • Live proof: after the merge and the release, the Service emits the gauges as the App for 24 h. A comment on this issue gives the count of each phase, the stalled items, and a compare with devops roadmap inbox.

Existing Tool Considered

Prometheus gauges and alert rules (in use) carry the measure. The age gauge and the alert of #2919 change in place. No open tool derives the phases of this pipeline. Build: 200,000 to 400,000 agent tokens and 0.5 to 1 day.

Related

Tracker #5482, Phase 0. Depends on #4558 (the item labels of the Jobs). #2919 (closed: the age gauge and the alert), #3655 (the pipeline dashboard; its rule "no second stuck-item alert" holds), #4579 (the claims gauge), #2968 (inbox gauges). #5504 reuses phase.

Source: #5482

Activity

  1. added
    source/agent
    on Nov 13, 2026
  2. added
    type/feature
    scope/roadmap
    status/new
    value/medium
    effort/medium
    on Nov 13, 2026
  3. dan-petty commented on Nov 13, 2026

    @dan-petty
    OwnerAuthor
  4. added
    priority/p2-medium
    on Nov 13, 2026
  5. added
    owner/agent
    status/in-progress
    and removed
    status/new
    on Nov 15, 2026
  6. added
    status/in-review
    and removed
    status/in-progress
    on Nov 15, 2026
  7. removed
    status/in-review
    owner/agent
    on Nov 15, 2026
  8. devops-cli-service commented on Nov 15, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-15 05:17 UTC

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

    effort/mediumpriority/p2-mediumscope/roadmapsource/agenttype/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions