Repository navigation
Description
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)insrc/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_secondsanddevops_cli_roadmap_oldest_item_numberget the labels{repo, phase}in place of{repo, state, plan}. No shim: the dashboard panels that readstateandplanchange 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
atvalue or PR event that set the phase. The step writes no new key. - An item is stalled when all of these are true:
- Its phase age is over the setting
roadmap.stall.hours(default 24). - No unit of the item runs. The step finds the units by the item labels of feat(roadmap): label Service Jobs by repository and item #4558.
- It has no person cause, and no
owner/agentorowner/humanclaim.
- Its phase age is over the setting
- Emit
devops_cli_roadmap_stalled_items{repo, phase}. - Change the expression of
RoadmapServiceItemStuckto 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
RoadmapServiceItemStuckat 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
dan-petty commentedon Nov 13, 2026
Both items work on the stuck-item age gauge and the RoadmapServiceItemStuck alert, but #2919 delivers the initial gauge and alert while the candidate rewrites their labels and expression to use phase.feat(roadmap): the phase of each item drives the stuck-item alert (#5495
devops-cli-service commentedon Nov 15, 2026
Released in v0.149.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.149.0
devops-cli-service commentedon Nov 15, 2026
Live since 2026-11-15 05:17 UTC
feat(github): Count the claims of each repository (#6156)