Skip to content

feat(roadmap): a dashboard and alerts for the pipeline #3655

Done

Description

@dan-petty

Update 2026-11-26 (infra move): product dashboards live in k8s/devops/dashboards/.

  • k8s/monitoring/ is in dan-petty/homelab. Add the dashboard and its entry in k8s/devops/dashboards/kustomization.yaml.
  • homelab reads that folder at a release tag, so it needs no change.

Split from #3069. #3069 holds the metrics. This item holds the view and the alerts that read them.

Problem

The repository has no dashboard and no alert for the outcomes of the roadmap pipeline. A person cannot see the plans per day, the implement success by class, the repair rounds or the tokens per delivered item. No alert fires when the success rate falls or when one failure class repeats.

Expected

Acceptance criteria

  • The dashboard is in the repository, and the render of k8s/devops/dashboards holds it in a ConfigMap with the label grafana_dashboard: "1".
  • A test fails and names the query when a panel reads a metric that the Service does not emit.
  • Each new alert selects job="roadmap-service" and has a promtool test that it fires, that it stays quiet on a normal series, and that it holds over a pod change.
  • Each new alert has a runbook entry in the Alerts section of k8s/README.md.
  • A test evaluates the panel queries on fixture series of a sample item and compares each value with the job record of that item.

Existing tool considered

Grafana with its dashboard sidecar, Prometheus rules and promtool cover this work, and the repository already uses them. The change adds no tool.

Dependencies

Related

#3027 (tracker), #2919 (state age, delivered), #3162 (defect rate of plans), #3217 (outcomes in devops roadmap explain).

Source: #3069

Alternatives check of 2026-11-25: in-use.
The repository already uses this tool.
Tool: grafana/grafana (https://github.com/grafana/grafana), AGPL-3.0, last activity 2026-11-25, maintained.
Reason: Searches found Grafana, which the repository already runs with its dashboard sidecar; it covers the dashboard, its panels and its provisioning, while the alert rules, promtool cases and repository-specific tests are project code.

Covers:

  • Dashboard JSON provisioned by the sidecar as a labelled ConfigMap
  • Panels over Prometheus series, filtered by job and repo variables
  • Dashboard as code beside the existing product dashboards

Lacks:

  • Check that a panel names only a declared metric
  • Evaluation of panel values against a job record fixture
  • Prometheus alert rules and promtool cases, which are project code

Proposed design

Problem statement

The roadmap pipeline records its outcomes in job records, but the repository holds no dashboard of them: a person cannot see the plans per day, the implement success by class, the repair rounds, or the tokens per delivered item. This item delivers the Grafana dashboard roadmap-pipeline with its panels, its provisioning entry, the Roadmap Service row update and the repository tests that check them. The alert rules, their promtool cases and their runbook rows are in #6039 and #5919, so this item adds no alert. The owner split the build into four task groups so each step fits the token budget.

Acceptance criteria

Requirement: Dashboard is provisioned

The devops-cli dashboard kustomization SHALL render roadmap-pipeline.json into the ConfigMap grafana-devops-cli-dashboards with the label grafana_dashboard: "1".

Scenario: The monitoring render holds the dashboard

  • WHEN A person runs kubectl kustomize k8s/devops/dashboards
  • THEN The output holds the ConfigMap grafana-devops-cli-dashboards with roadmap-pipeline.json and the label grafana_dashboard: "1".

Requirement: A panel names only a declared metric

A test SHALL fail and name the query when a panel reads a metric that neither an instrument in src/devops_cli/telemetry/instruments.py nor a CONST_SERVICE_METRIC_ constant in src/devops_cli/config/constants.py declares.

Scenario: A panel names a metric with no declaration

  • WHEN A person runs uv run pytest tests/grafana/test_grafana_dashboards.py with a panel query that names a metric absent from both the instruments and the Service constants
  • THEN The test fails and its message holds the text of that query.

Requirement: The dashboard holds the pipeline panels

The dashboard SHALL hold a panel for the plans per day from devops_cli_roadmap_stage_total{result="staged"}, a panel for the time in a phase from devops_cli_roadmap_item_age_seconds, and panels for the implement success by class, the repair rounds and the tokens per delivered item from the Service counters of #3069.

Scenario: A named panel is absent

  • WHEN A person runs uv run pytest tests/grafana/test_grafana_dashboards.py and the dashboard JSON has no panel with that query
  • THEN The test fails and names the missing panel.

Requirement: Every panel filters by the job and repo variables

Every panel query SHALL filter its series with the job variable, and a panel that groups by repo SHALL filter the repo variable.

Scenario: A panel misses a variable

  • WHEN A person runs uv run pytest tests/grafana/test_grafana_dashboards.py and a panel query names no job variable, or groups by repo with no repo variable
  • THEN The test fails and names the panel and the missing variable.

Requirement: A snapshot gauge uses last_over_time

A panel that reads a snapshot gauge SHALL wrap the gauge in last_over_time over at least 1 hour.

Scenario: A gauge panel reads a bare selector

  • WHEN A person runs uv run pytest tests/grafana/test_grafana_dashboards.py and a gauge panel reads a bare selector
  • THEN The test fails and names the panel and the query.

Requirement: The Service row charts the deferred counters

The Roadmap Service row of k8s/devops/dashboards/roadmap-service-telemetry.json SHALL chart each series that deferred_metrics of test_cli_dashboard_service_row_reads_each_series_of_the_service lists, and that set SHALL be empty after the change.

Scenario: A deferred series has no panel

  • WHEN A person runs uv run pytest tests/grafana/test_grafana_dashboards.py and the Roadmap Service row has no panel for a series in deferred_metrics
  • THEN The test fails and names the series.

Requirement: Panel values match the job record

A test SHALL evaluate each panel query on the fixture series of one item and SHALL compare each value with the job record of that item.

Scenario: A panel value differs from the record

  • WHEN A person runs uv run pytest tests/prometheus/test_dashboard_queries.py and the evaluated value of a panel differs from the value in the job record
  • THEN The test fails and names the panel and the two values.

Existing Tool Considered

grafana/grafana (https://github.com/grafana/grafana), AGPL-3.0, in use and maintained. The alternatives block of the issue records what Grafana covers and what it lacks. This item uses Grafana for the dashboard and its panels and adds the repository tests that the block leaves to project code; the alert rules and promtool cases are in #6039. No new tool is added.

Key questions

  • Are the alert rules, promtool tests and runbook rows part of this item?: No. feat(roadmap): alert rules for the pipeline outcomes #6039 holds the alert rules for the pipeline outcomes, and feat(roadmap): job grade gauges and alerts for the pipeline #5919 holds the job-grade gauges and alerts. The owner's four task groups name no alert work. The existing RoadmapServiceItemStuck alert stays unchanged, so this item adds no second stuck-item alert. The alert rules, their promtool cases and their runbook rows go with feat(roadmap): alert rules for the pipeline outcomes #6039 and feat(roadmap): job grade gauges and alerts for the pipeline #5919. (best practice) [sources: k8s/devops/monitoring/prometheus-rules-values.yaml:366, docs/CLUSTER.md:179]
  • The alternatives check now records in-use for grafana/grafana. Does the item keep Grafana?: Yes. The repository already runs Grafana with its dashboard sidecar, and the product dashboards are provisioned from k8s/devops/dashboards/ into the ConfigMap grafana-devops-cli-dashboards. The item adds no new tool. (best practice) [sources: k8s/README.md:341, k8s/monitoring/dashboards/kustomization.yaml:20, k8s/devops/dashboards/kustomization.yaml:26]
    • Chosen: Keep grafana/grafana. The repository already uses it, and its dashboard sidecar loads the labelled ConfigMaps that the product dashboards generate.
    • Rejected: Use the Argo Workflows UI as the dashboard. It shows workflow runs, not the pipeline outcomes that the issue names.
    • Rejected: Build a new web page or a TUI. It is new code to build and keep that duplicates the deployed Grafana.
  • How does the item split its task groups after the stage job returned it?: The owner answered: split the group. Use four task groups. Group 1 creates k8s/devops/dashboards/roadmap-pipeline.json with the frame, the job and repo variables, the plans-per-day panel and the time-in-a-phase panel, adds the kustomization entry and the render check, and keeps the file below 400 lines. Group 2 adds the implement-success, repair-round and tokens panels and the panel checks. Group 3 charts the deferred counters in the Roadmap Service row and empties deferred_metrics. Group 4 adds the fixture evaluation. Only group 1 creates a file. (best practice) [sources: src/devops_cli/roadmap/plan_check.py:651, src/devops_cli/roadmap/stage/stage_change.py:143]
    • Chosen: Split the task group into four groups. The stage job found 65069 tokens against the 64000-token budget. The owner answered 'Split the group.' Only the first group creates a file, and it stays below 400 lines.
    • Rejected: Raise the step budget. The owner refused it. The plan check keeps the code default of roadmap.stage.step_tokens.
  • Which kustomization entry holds roadmap-pipeline.json, and where does the file live?: The file is k8s/devops/dashboards/roadmap-pipeline.json. The entry grafana-devops-cli-dashboards in k8s/devops/dashboards/kustomization.yaml:27 generates it. k8s/monitoring/dashboards/kustomization.yaml:21 lists ../../devops/dashboards as a resource, so the monitoring render holds the ConfigMap. [sources: k8s/devops/dashboards/kustomization.yaml:27, k8s/monitoring/dashboards/kustomization.yaml:21, k8s/README.md:341]
  • Do the metrics that the panels read exist at this commit?: Yes. devops_cli_roadmap_stage_total is declared at src/devops_cli/telemetry/instruments.py:379. devops_cli_roadmap_item_age_seconds is declared at src/devops_cli/telemetry/instruments.py:512 and carries the labels repo and phase (:510). The Service counters of feat(roadmap): metrics for the pipeline outcomes #3069 are declared at src/devops_cli/config/constants.py:1883 and emitted at src/devops_cli/roadmap/implement/implement_submit.py:465, :469, :475 and :482; the jobs counter is primed at src/devops_cli/server/counter_series.py:106. [sources: src/devops_cli/telemetry/instruments.py:379, src/devops_cli/telemetry/instruments.py:512, src/devops_cli/telemetry/instruments.py:510, src/devops_cli/config/constants.py:1883, src/devops_cli/roadmap/implement/implement_submit.py:465, src/devops_cli/roadmap/implement/implement_submit.py:469, src/devops_cli/roadmap/implement/implement_submit.py:475, src/devops_cli/roadmap/implement/implement_submit.py:482, src/devops_cli/server/counter_series.py:106]
  • Which series may the panels read?: Only the series that the instruments and the Service constants declare. A snapshot gauge uses last_over_time over at least 1 hour. A panel that groups by repo filters the repo variable. (best practice) [sources: src/devops_cli/telemetry/instruments.py:512, k8s/devops/dashboards/project-metrics.json:594, docs/TELEMETRY.md:76]
    • Chosen: Read only the declared series. The owner limits the first dashboard to the series that exist today, and every series is an entry of INSTRUMENTS or a CONST_SERVICE_METRIC_ constant.
    • Rejected: Read a gauge with a bare selector. Prometheus finds a plain selector only near a sample, so a snapshot gauge needs last_over_time.
    • Rejected: Add a panel for every metric name now. The first dashboard uses the series that the issue names; a panel for every declared name would chart series that no panel needs now.
  • How do the panels select their series?: The job and repo variables filter every panel. Each devops_cli_* selector starts with job=~"$job", and a panel that groups by repo adds repo=~"$repo". (best practice) [sources: k8s/devops/dashboards/roadmap-service-telemetry.json:288, k8s/devops/dashboards/roadmap-service-telemetry.json:389, k8s/devops/dashboards/project-metrics.json:594]
    • Chosen: Filter every panel by the job and repo variables. The existing product dashboards define both variables and use the job matcher on every devops_cli_* series.
    • Rejected: Hard-code the Service job in each panel. The job moves to the row pods after the Workflows move, so a variable keeps the panels working.
  • Which test files hold the dashboard checks?: The panel checks go in tests/grafana/test_grafana_dashboards.py, including the Roadmap Service row test at :416. The provisioning is proved by the kubectl kustomize render in uv run devops ci --check --only k8s, so no test reads the kustomization. The fixture evaluation goes in tests/prometheus/test_dashboard_queries.py with tests/fixtures/dashboard_queries/roadmap-pipeline.yaml. No second evaluator is built. (best practice) [sources: tests/grafana/test_grafana_dashboards.py:416, tests/prometheus/test_dashboard_queries.py:1, docs/TESTING.md:68]
    • Chosen: Use the existing test files and the fixture evaluator. The repository already has the dashboard test file and the fixture evaluator that reads tests/fixtures/dashboard_queries/.
    • Rejected: Build a new fixture evaluator. It is new code to build and keep, and the repository already has the evaluator.
  • Which series does the Roadmap Service row defer today, and what does charting them require?: The set at tests/grafana/test_grafana_dashboards.py:420 holds the four implement metrics of feat(roadmap): metrics for the pipeline outcomes #3069: jobs, repair rounds, tokens and consecutive failures. The row test compares the queried series of the row with every CONST_SERVICE_METRIC_ constant that the set does not defer (:431 and :438). The change charts the four deferred counters in the Roadmap Service row and empties the set. [sources: tests/grafana/test_grafana_dashboards.py:420, tests/grafana/test_grafana_dashboards.py:431, tests/grafana/test_grafana_dashboards.py:438, src/devops_cli/config/constants.py:1883]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Moved to new items

#5918, #5919, #6039

Activity

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

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/feature. The feat prefix of the title gives the type.
    • Scope: scope/roadmap. The (roadmap) scope of the title gives the scope.
    • Priority: P2-Medium. It adds operational visibility but does not block a release or fix a defect.
    • Value: Medium. Operators gain a single view of pipeline health and early warning of regressions, which reduces mean-time-to-detect.
    • Effort: Medium. One dashboard JSON, two Prometheus alert rules, promtool tests, and runbook entries are needed.
    • Related: feat(roadmap): measure plan defect rate after plan verification #3162, which asks for a different change. Both are split from #3069 and target the roadmap-pipeline dashboard, but #3162 adds one defect-rate metric and panel while this item builds the dashboard shell and the two alerts.
  4. added
    priority/p2-medium
    on Nov 5, 2026
  5. devops-cli-service commented on Nov 6, 2026

    @devops-cli-service
    Contributor

    Refine cannot set this item to Ready at 235a807 while the items below stay open. The next refine round looks at the item again when they close, or when a person replies in a comment or edits the body.

  6. devops-cli-service commented on Nov 7, 2026

    @devops-cli-service
    Contributor

    Alternatives check: covers

    Reason: The searches returned nothing (the provider did not answer), but the issue itself names Grafana with its dashboard sidecar, Prometheus alert rules and promtool as the tools that cover the dashboard and the alerts, and says the repository already uses them; no ADR in force rejects them. Grafana's sidecar loads a dashboard JSON from a labelled ConfigMap, and Prometheus rules with promtool tests cover the alerts, so one tool chain covers the whole need.

    Tool: grafana/grafana (https://github.com/grafana/grafana)

    • License: AGPL-3.0
    • Last activity: 2026-11-07
    • Maintained: yes

    Covers:

    • Dashboard JSON provisioned through a ConfigMap with the grafana_dashboard: "1" label, loaded by Grafana's dashboard sidecar
    • Dashboard panels and queries over the Prometheus metrics of the roadmap pipeline
    • Prometheus alerting rules with job-level selectors, so an alert survives a pod change
    • promtool unit tests for alert firing, silence on a normal series and pod relabeling
    • Alert runbook rows alongside the rules in the repository's monitoring docs

    Lacks:

    • The project-specific tests (panel query against emitted metrics, panel value against the job record, kustomize render check, runbook table check) are repository test code that Grafana and Prometheus do not provide
    • The metrics that the panels and alerts read come from feat(roadmap): metrics for the pipeline outcomes #3069, which is still open

    Tools considered:

    Searches run:

    • promtool unit test alert rules fire quiet pod change, results: 0
    • Grafana dashboard sidecar ConfigMap label grafana_dashboard kustomize, results: 0
    • Grafana dashboard provisioning sidecar, results: 0
    • Grafana, results: 0

    Sources:

    Checked on 2026-11-07. A person decides what this means for the item. The check changes no label and closes no issue.

  7. devops-cli-service commented on Nov 7, 2026

    @devops-cli-service
    Contributor

    Refine cannot set this item to Ready at 257cb46 until a person answers the questions below. Reply in a comment or edit the body, and the next refine round looks at the item again.

    • The alternatives check found that https://github.com/grafana/grafana covers this item. Adopt the tool, or keep the item and give the reason. (a person decides)
  8. 47 remaining items

  9. devops-cli-service commented on Nov 18, 2026

    @devops-cli-service
    Contributor

    The result in the alternatives block of the issue body changed. Before this check: covers, tool https://github.com/grafana/grafana. A person decides what the new result means for the item.

    Searches (9)

    Tools considered:

    Searches run:

    • promtool unit test alerting rules prometheus, results: 5
    • Grafana dashboard sidecar provisioning ConfigMap grafana_dashboard label, results: 5
    • prometheus promtool rules unit test, results: 5
    • grafana dashboard JSON provisioning sidecar kubernetes, results: 5
    • Grafana, results: 5
    • promtool, results: 5
    • grafana dashboard provider sidecar kubernetes dashboards, results: 5
    • prometheus/prometheus promtool rules test, results: 5
    • provisioning, results: 5

    Sources:

  10. dan-petty commented on Nov 21, 2026

    @dan-petty
    OwnerAuthor

    Answer to the owner question: split the group. Keep the step budget at 64000 tokens.

    Why:

    • CI Plan Check measures each group with the code default of roadmap.stage.step_tokens (src/devops_cli/roadmap/plan_check.py:647). A higher live value or --step-tokens value makes stage and CI disagree. Then the plan pull request fails.
    • A higher code default changes a cap of the stage job. Hold chore(roadmap): hold incremental stage and implement work #6521 stops that work until refactor(roadmap): re-architect stage and implement on Coder #6519 decides.
    • The group is most probably over because one step creates the whole dashboard file. Stage counts 32 tokens for each estimated line of a new file (src/devops_cli/roadmap/stage/stage_change.py:139). The dashboards in k8s/devops/dashboards/ have 1049 to 1627 lines. A group that changes a file reads it packed to at most 8000 tokens.

    Use these task groups:

    1. Create k8s/devops/dashboards/roadmap-pipeline.json with the dashboard frame, the job and repo variables, and two panels: plans per day and time in a phase. Add the entry in k8s/devops/dashboards/kustomization.yaml and the render test. Keep the new file below 400 lines.
    2. Change roadmap-pipeline.json and add the other panels: implement success by class, repair rounds, and tokens per delivered item. In tests/grafana/test_grafana_dashboards.py, add these tests: a panel names only a declared metric, each panel filters by job and repo, and a snapshot gauge uses last_over_time.
    3. Chart the deferred counters in the Roadmap Service row of k8s/devops/dashboards/roadmap-service-telemetry.json, and empty deferred_metrics.
    4. Add the fixture evaluation in tests/prometheus/test_dashboard_queries.py.

    Only group 1 creates a file. Groups 2 to 4 change files, so each group stays below the budget.

    An agent builds this item in a workflow lane from this design, in this group order. The stage job is not necessary. If a lane cannot build it, the status goes back to New, refine writes these groups into the design, and an agent runs the stage job with --item 3655.

    #4725, #6519 and #6521 are sources, not dependencies of this item.

  11. dan-petty commented on Nov 24, 2026

    @dan-petty
    OwnerAuthor

    Split the group.

  12. devops-cli-service commented on Nov 25, 2026

    @devops-cli-service
    Contributor

    Next step: the stage job writes the plan of the item. See Moved to new items in the section Proposed design of the body.

  13. added
    owner/agent
    status/in-progress
    status/in-review
    and removed
    status/ready
    status/in-progress
    on Nov 28, 2026
  14. removed
    status/in-review
    owner/agent
    on Nov 28, 2026
  15. devops-cli-service commented on Nov 28, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-28 17:56 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