Repository navigation
Description
What happened
The owner asked on 2026-10-31 for one issue workflow that is simple, clear, discrete, consistent and repeatable for the Service jobs, agentic coders and human developers. The plan and the owner's decisions are in the tracker issue. Decisions taken (the recommended defaults): add the label status/planned (amends ADR 0016); claim an item with labels owner/service, owner/agent and owner/human; a new runner image digest clears a stop once; any actor may claim an item, one at a time, a person's claim beats the Service's, and the Service never takes a claimed item.
Nothing measures how long an item waits in a state. Items sat in Ready (the four bugs left out by the stage budget), in Planned (two medium-effort items) and as stopped drafts for hours or days before a person saw them.
What should happen
- A gauge of the age of the oldest item in each state (
new,ready,planned,in-progress,in-review,blocked) and of the oldest claim (W3), by repository. - One Prometheus alert: an item has been in
readywith a plan, orblocked, longer than a set time, with the number of the item in the message. The alert rule follows the project's alert conventions and has a unit test. - A Grafana panel next to the inbox panel (W7).
Evidence
- The 2026-10-31 stuck items. The existing metrics path (
telemetry, the metrics row of the Service).
Acceptance criteria
- The gauges are declared instruments and are sent through
emit. - The alert rule has a promtool unit test.
- A test shows the age is computed from the label event time or the record, with a fake clock.
-
uv run devops cipasses.
Proposed design
Problem statement
No metric shows how long an item waits in a roadmap state. Items sat in Ready, Planned, or as stopped drafts for hours or days before a person saw them. The project needs a gauge of the age of the oldest item in each state, a gauge of the oldest claim, one Prometheus alert for stuck items, and a Grafana panel to display them.
Acceptance criteria
Requirement: Age gauges are declared instruments
The age-of-oldest-item gauges for each state and the age-of-oldest-claim gauge SHALL be entries in INSTRUMENTS and sent through emit().
Scenario: Instrument registry contains the new gauges
- WHEN The telemetry module is imported and INSTRUMENTS is inspected
- THEN The gauges for states new, ready, planned, in-progress, in-review, blocked and the claim gauge are present in INSTRUMENTS
Requirement: Alert rule passes promtool
The Prometheus alert rule for stuck items SHALL pass promtool check rules.
Scenario: promtool validates the alert rule file
- WHEN promtool check rules is run on the alert rule file
- THEN The command exits with code 0 and reports no errors
Requirement: Age is computed from label event time
The age of an item in a state SHALL be computed from the timestamp of the label event that set the status label, using an injectable clock.
Scenario: Fake clock shows correct age
- WHEN A label event is recorded at time T and the injected clock reads T plus 3600 seconds
- THEN The gauge reports 3600 seconds
Requirement: CI passes
The full CI suite SHALL pass after the change.
Scenario: devops ci completes successfully
- WHEN uv run devops ci is executed
- THEN The command exits with code 0
Existing Tool Considered
No check has run. The project already uses Prometheus for metric exposition and Grafana for dashboards. No open-source tool computes the age of the oldest GitHub issue in a given label state. The project builds this in its existing telemetry path (src/devops_cli/telemetry/instruments.py). The written cost is the tokens to build, keep, and fix the age-computation logic (read label events, compute the delta, emit the gauge) until it matches a purpose-built tool, plus the elapsed time for that work.
Key questions
- How is the age of an item in a state computed?: From the timestamp of the label event that set the status label (for example, when status/ready was applied). This is the moment the item entered the state. An injectable clock makes the test deterministic. (best practice) [sources: CONTRIBUTING.md:131, docs/adr/0001-github-is-the-roadmap-source.md]
- Chosen: Label event time. Chosen. It marks the exact moment the item entered the state. ADR 0016 states that labels hold the fields and issue events keep the history of each label change.
- Rejected: Issue record timestamp (created_at or updated_at). Rejected. updated_at changes on any edit, not just a state change. created_at is the issue age, not the state age.
- What is the alert threshold for a stuck item?: A configurable value read from the Service configuration, with a sensible default. The body says 'longer than a set time,' which implies it is not hardcoded. (best practice) [sources: CONTRIBUTING.md:131]
- Chosen: Configurable via Service configuration. Chosen. The body says 'a set time,' which means it is a parameter. A configuration value lets the owner adjust it without a code change.
- Rejected: Hardcoded constant in the alert rule. Rejected. It would require a code change and a redeploy to adjust the threshold.
- Where does the Grafana panel go, and does it wait for the inbox panel (W7, issue feat(roadmap): Emit inbox gauges, add panel, show digest line #2968)?: The age panel is built in the existing Grafana dashboard so it can sit next to the inbox panel when feat(roadmap): Emit inbox gauges, add panel, show digest line #2968 delivers it. It does not wait for feat(roadmap): Emit inbox gauges, add panel, show digest line #2968. (proposed)
- Chosen: Build the age panel now, position it for the inbox panel. Chosen. The reply on this issue says to build the age panel so it can sit next to the inbox panel and not wait for it.
- Rejected: Wait for feat(roadmap): Emit inbox gauges, add panel, show digest line #2968 to deliver the inbox panel first. Rejected. The reply explicitly says not to wait. The age panel is independent of the inbox panel.
- What is the metric naming convention for the new gauges?: devops_cli_roadmap_item_age_seconds with labels for state and repository, and devops_cli_roadmap_claim_age_seconds for the oldest claim. Counters end in _total; gauges do not. [sources: CONTRIBUTING.md:131]
- Which states does the age gauge cover?: Six states: new, ready, planned, in-progress, in-review, blocked. Plus the oldest claim (W3). [sources: docs/adr/0001-github-is-the-roadmap-source.md]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Oct 31, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
featprefix of the title gives the type.(telemetry)scope of the title gives the scope.The system runs without the gauges, but stuck items go unnoticed for hours, so this improves reliability without blocking delivery.It surfaces stuck items to operators within a set time instead of hours or days, reducing rework and idle waiting.Requires new gauges, an alert rule with a promtool test, a fake-clock test, a Grafana panel, and a passing CI run.Both belong to the one issue workflow for the Service, agentic coders and people; #2908 is the umbrella while this candidate adds the telemetry gauges and alert for stuck items.dan-petty commentedon Nov 1, 2026
This issue asks for a Grafana panel "next to the inbox panel (W7)". The inbox panel does not exist yet. The command
devops roadmap inbox(#2915) prints the list only. Issue #2968 owns the inbox counts as gauges and the inbox panel. Build the age panel of this issue so that it can sit next to that panel, and do not wait for it.feat(roadmap): add devops roadmap inbox for what waits for a person (#…
devops-cli-service commentedon Nov 1, 2026
Status set to Ready at e093ac8 (see proposed design in issue body).
devops-cli-service commentedon Nov 2, 2026
Staged: branch
feat/2919-stuck-item-age-metrics-and-one, draft pull request #3171. The pull request plans the item and closes no issue.The task groups, with the tokens of the inputs of each step, for a budget of 40000 tokens:
The plan run made 12 model request(s), and used 439132 input tokens and 6091 output tokens. The tool calls, in order:
search_code({"text":"PROJECT_ITEMS"})list_files({"directory":"src/devops_cli/roadmap"})search_code({"text":"def metrics"})list_files({"directory":"k8s/monitoring"})search_code({"text":"metrics"})list_files({"directory":"k8s/monitoring/dashboards"})search_code({"text":"metrics"})search_code({"text":"ROADMAP_STAGE_TOTAL"})search_code({"text":"promtool"})search_code({"text":"roadmap_service"})list_files({"directory":"tests/fixtures/prometheus_rules"})list_files({"directory":"tests/telemetry"})list_files({"directory":"tests/prometheus"})list_files({"directory":"tests/roadmap"})list_files({"directory":"k8s/monitoring"})list_files({"directory":"tests/fixtures/prometheus_rules"})list_files({"directory":"k8s/monitoring/dashboards"})search_code({"text":"PROJECT_ITEMS"})search_code({"text":"promtool"})list_files({"directory":"src/devops_cli/roadmap"})search_code({"text":"PROJECT_ITEMS"})search_code({"text":"metrics"})docs(openspec): fix the plan of #2919 module, read cost and alert design
docs(openspec): plan #2919 stuck-item age metrics and alert (#3171)
devops-cli-service commentedon Nov 5, 2026
Released in v0.61.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.61.0
devops-cli-service commentedon Nov 5, 2026
Live since 2026-11-05 12:32 UTC
docs(openspec): plan #2968 Add inbox gauges and panel (#5604)