Skip to content

feat(monitoring): panels and alerts for the resolve, group and split rows #4822

Open

Description

@dan-petty

Problem or Motivation

The owner requirement of 2026-11-11 (#4780) asks that a dashboard or the project review shows the split thresholds and their history. The targets of #4780 also need the actions, the useful share and the spend of each new row.

Proposed Solution & Architectural Design

Target Subsystem

Monitoring (k8s/ dashboards and alert rules).

Existing Tool Considered

Grafana, Prometheus and promtool (installed). Cost to build: about 60,000 tokens and 2 hours.

Acceptance Criteria

  • The panel queries pass the dashboard check.
  • The promtool tests fire and stay quiet as written.
  • The runbook entries are in k8s/README.md.

Dependencies

Source: #4780

Alternatives check of 2026-12-01: in-use.
The repository already uses this tool.
Tool: Grafana (https://github.com/grafana/grafana), AGPL-3.0, last activity 2026-12-01, maintained.
Reason: The searches found no other tool for these panels. Grafana holds the dashboard rows and PromQL panels, and Prometheus with promtool holds the alert rules and their unit tests. Both are already in use, and the issue names them.

Covers:

  • Dashboard rows, panels and PromQL queries in JSON
  • Alert rules with for, severity and a promtool unit test
  • Panels over the existing exporter gauges and counters

Lacks:

  • No series records an item state change in 7 days
  • No dynamic period in PromQL, so one rule per row
  • Runbook rows stay hand-written in k8s/README.md

Proposed design

Problem statement

The resolve and split rows of the roadmap pipeline have no dashboard panels and no alerts. Owner requirement #4780 asks that a dashboard or the project review shows the split thresholds and their history, and that its targets show the actions and the spend of each new row. This change adds a steward row to the roadmap pipeline dashboard, a spend alert, a no-success alert for each steward row, a promtool test for each alert, and a runbook row for each alert. The group row is out of scope, because #4813 is closed as not planned. The useful-share panel cannot be built, because no series records an item state change in 7 days; that part is deferred to a new issue.

Acceptance criteria

Requirement: Steward row in the roadmap pipeline dashboard

The roadmap pipeline dashboard k8s/devops/dashboards/roadmap-pipeline.json SHALL hold a steward row with panels for the inbox kinds, the actions by row and result, the row spend and the split thresholds.

Scenario: The k8s check accepts the steward row

  • WHEN uv run devops ci --check --only k8s runs on the branch.
  • THEN The command exits 0, and its dashboard checks report no error for the steward row.

Requirement: Panel queries name declared metrics and filter the job variable

Each new Prometheus panel query SHALL name only a declared metric and SHALL filter the $job variable.

Scenario: The k8s check accepts the new queries

  • WHEN uv run devops ci --check --only k8s runs on the branch.
  • THEN The command exits 0, and its dashboard checks report no undeclared metric and no missing $job filter.

Requirement: Inbox panel reads the inbox gauge

The inbox panel SHALL read devops_cli_roadmap_inbox_items by kind and filter the $job variable.

Scenario: The k8s check accepts the inbox query

  • WHEN uv run devops ci --check --only k8s runs on the branch.
  • THEN The command exits 0, and its dashboard checks name no error for the inbox panel.

Requirement: Actions panel reads the row result series

The actions panel SHALL read devops_cli_roadmap_row_seconds by row and result and filter the $job variable.

Scenario: The k8s check accepts the actions query

  • WHEN uv run devops ci --check --only k8s runs on the branch.
  • THEN The command exits 0, and its dashboard checks name no error for the actions panel.

Requirement: Spend panel reads the row spend counter

The row spend panel SHALL read devops_cli_ai_spend_usd_total by row and filter the $job variable.

Scenario: The k8s check accepts the spend query

  • WHEN uv run devops ci --check --only k8s runs on the branch.
  • THEN The command exits 0, and its dashboard checks name no error for the spend panel.

Requirement: Split threshold panel reads the calibrate gauges

The split threshold panel SHALL read the split threshold, samples and window gauges that #4817 adds, with their signal and source labels, and filter the $job variable.

Scenario: The k8s check accepts the split query

Requirement: Row spend alert fires above the daily threshold

The steward spend alert SHALL fire when the resolve and split rows together spend more than 1 USD in a day.

Scenario: One day of spend above the threshold

  • WHEN promtool test rules runs the spend case with 24 hours of the row spend series that sum above 1 USD.
  • THEN The test reports RoadmapStewardSpendDailyHigh as firing.

Requirement: Row spend alert stays quiet below the daily threshold

The steward spend alert SHALL stay quiet when the resolve and split rows together spend 1 USD or less in a day.

Scenario: One day of spend below the threshold

  • WHEN promtool test rules runs the spend case with 24 hours of the row spend series that sum to 1 USD or less.
  • THEN The test reports RoadmapStewardSpendDailyHigh as quiet.

Requirement: Row success alert fires after two periods

The row success alert SHALL fire when a steward row has no successful run in two of its schedule periods.

Scenario: Two periods of the resolve row with no success

  • WHEN promtool test rules runs the resolve case with two periods of the resolve row that hold an error run and no successful run.
  • THEN The test reports RoadmapResolveNoSuccess as firing.

Requirement: Row success alert stays quiet with a success

The row success alert SHALL stay quiet when the steward row has a successful run in the last two periods.

Scenario: One success in the two periods

  • WHEN promtool test rules runs the resolve case with a successful run of the resolve row in the last period.
  • THEN The test reports RoadmapResolveNoSuccess as quiet.

Requirement: Row success window follows the row schedule

Each no-success rule SHALL use two periods of its row's CronWorkflow schedule.

Scenario: The resolve and split windows

  • WHEN promtool test rules runs the boundary cases for the resolve and split rows.
  • THEN The resolve rule fires at 8h and the split rule at 12h.

Requirement: Product rules file holds the new group

The product rules file SHALL hold the spend alert and the two no-success alerts in a new group roadmap-stewards under serverFiles.devops_cli_alerting_rules.yml.

Scenario: promtool accepts the new group

  • WHEN promtool check rules runs over the alert rules of k8s/devops/monitoring/prometheus-rules-values.yaml.
  • THEN It accepts each expression and annotation template of the group roadmap-stewards.

Requirement: Runbook entry for each alert

k8s/README.md SHALL list each new alert in the Alerting table with its fire condition, its for, its severity and its Do this step.

Scenario: The Alerting table lists the new alerts

  • WHEN uv run devops ci --check --only k8s runs on the branch.
  • THEN The command exits 0, and its alert runbook check reports no missing Do this row for the new alerts.

Requirement: Pending a person after the merge

The new alert group MUST load in the live Prometheus after a person deploys the merged product base.

Scenario: The live Prometheus holds the new group

  • WHEN A person runs uv run devops prometheus rules list after the devops Application syncs the merged rules file.
  • THEN The list holds the group roadmap-stewards with RoadmapStewardSpendDailyHigh, RoadmapResolveNoSuccess and RoadmapSplitNoSuccess.

Existing Tool Considered

The alternatives check of 2026-12-01 records in-use for Grafana (https://github.com/grafana/grafana), with Prometheus and promtool for the alert rules and their unit tests. The repository already uses these tools. The block in the issue body gives what the tools lack. This change adds the dashboard row, the Prometheus rules, the promtool test cases and the README rows. Written cost to build this instead of using the tools: about 60,000 tokens and 2 hours.

Key questions

  • Which file holds the roadmap pipeline dashboard that feat(roadmap): a dashboard and alerts for the pipeline #3655 adds?: The roadmap pipeline dashboard is k8s/devops/dashboards/roadmap-pipeline.json, with the uid devops-roadmap-pipeline and the row Roadmap Pipeline. feat(roadmap): a dashboard and alerts for the pipeline #3655 added it, and its cases are in tests/fixtures/dashboard_queries/roadmap-pipeline.yaml. The steward row goes into that file. k8s/devops/dashboards/roadmap-service-telemetry.json is a different dashboard. [sources: openspec/specs/roadmap-pipeline-dashboard/spec.md:5, k8s/devops/dashboards/roadmap-pipeline.json:38, k8s/devops/dashboards/roadmap-pipeline.json:371, tests/fixtures/dashboard_queries/roadmap-pipeline.yaml:1]
  • Does devops_cli_ai_spend_usd_total carry a row label?: Yes. The counter is described by operation, provider, model, server, backend and row, and the telemetry document says that it and devops_cli_ai_model_answers_total carry row. The spend panel and the spend alert select row=~"resolve|split". [sources: docs/TELEMETRY.md:132, docs/TELEMETRY.md:260]
  • Which series do feat(roadmap): Emit inbox gauges, add panel, show digest line #2968 and feat(roadmap): split thresholds come from measured job history #4817 add for the inbox kinds and the split thresholds?: feat(roadmap): Emit inbox gauges, add panel, show digest line #2968 is merged and adds the gauge devops_cli_roadmap_inbox_items with repo and kind; the panel Inbox Items by Kind already reads it in k8s/devops/dashboards/project-metrics.json. feat(roadmap): split thresholds come from measured job history #4817 is open and adds the split threshold gauges. The repository at this commit does not hold those gauges, so their exact names come from feat(roadmap): split thresholds come from measured job history #4817. [sources: docs/TELEMETRY.md:186, k8s/devops/dashboards/project-metrics.json:653, openspec/changes/archive/2026-11-15-2968-emit-inbox-gauges-add-panel-show/proposal.md:14]
  • Which series records the actions and the result of a steward row?: devops_cli_roadmap_row_seconds{repo,row,result} records the row duration with its result. The actions panel reads it by row and result; the no-success rules read the series with result="success". [sources: docs/TELEMETRY.md:190]
  • Which series gives the period of a row, so that the row success rule compares two periods?: devops_cli_roadmap_row_interval_seconds{repo,row} gives the period of the rows intake, stage, fix_plan, refine and alternatives only. The steward rows have fixed CronWorkflow schedules in ADR 0021: resolve every 4 hours (14,400 s) and split every 6 hours (21,600 s). The no-success rules use 8h for resolve and 12h for split, two periods of each row. [sources: docs/TELEMETRY.md:192, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md:139, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md:162]
  • Which series carries the useful share of a row, the share of items that change state within 7 days?: No series records an item state change in 7 days. The roadmap metrics hold devops_cli_roadmap_items{repo,phase}, devops_cli_roadmap_item_age_seconds{repo,phase} and devops_cli_roadmap_row_seconds{repo,row,result}, and none carries an item transition. The alternatives check of 2026-12-01 records the same lack in its block. The useful-share panel is deferred to a new issue. [sources: docs/TELEMETRY.md:180, docs/TELEMETRY.md:182, docs/TELEMETRY.md:190]
  • Which rows do the panels and the alerts cover?: The resolve and split rows only. The reply of 2026-12-01 on this issue closes feat(roadmap): the group row links a family and closes on a re-check #4813, the group row, as not planned, so no group row exists to chart or alert on. The spend alert sums the spend of these two rows. (best practice) [sources: src/devops_cli/github/repo_ref.py:67, src/devops_cli/github/repo_ref.py:69, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md:139, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md:162]
  • Where do the new alert rules go?: Add the new group roadmap-stewards under serverFiles.devops_cli_alerting_rules.yml of k8s/devops/monitoring/prometheus-rules-values.yaml. The prometheus Application gives this file as its second values file, rule_files names it, and the alert runbook check reads its groups. (best practice) [sources: k8s/devops/monitoring/prometheus-rules-values.yaml:16, k8s/devops/monitoring/prometheus-rules-values.yaml:17, k8s/README.md:214, tests/gate/k8s_checks/alert_runbooks.py:59]
    • Chosen: Product rules file. The rules select devops_cli_* series, and this file holds the product groups that the prometheus Application loads.
    • Rejected: PrometheusRule CR in k8s/devops/alerts. k8s/devops/alerts/inbox.yaml is not in the devops kustomization, so the Application does not deploy it.
  • Where does each alert get its runbook entry?: Add a row for each new alert to the Alerting table of k8s/README.md, with its fire condition, its for, its severity and its Do this step. The table has five columns, and the k8s check refuses a product alert with no non-empty Do this row. (best practice) [sources: k8s/README.md:216, tests/gate/k8s_checks/alert_runbooks.py:117, docs/guidelines/sre.md:242]
    • Chosen: Row in the Alerting table of k8s/README.md. The table lists every alert of the cluster with its condition, for, severity and Do this step, and the body names k8s/README.md.
    • Rejected: New runbook document. A separate document splits the alert list, and no other alert uses one.
  • Which checks prove the panels and the rules?: Run uv run devops ci --check --only k8s for the dashboard linter, the declared metrics, the $job and $repo filters, the product alert rules and the Do this rows. Run promtool check rules and promtool test rules for the alert rules and their unit tests. A command that runs tests, such as pytest, is no proof. (best practice) [sources: docs/TESTING.md:68, tests/gate/k8s.py:20, tests/gate/k8s_checks/dashboards.py:48, tests/gate/k8s_checks/alert_runbooks.py:117]
    • Chosen: The k8s gate and promtool. The k8s gate runs the dashboard and alert runbook checks offline, and promtool checks the alert rules and their cases.
    • Rejected: The dashboard query fixture test. A command that runs tests is no proof for a config file (docs/TESTING.md:68).
  • Which severity and for do the new alerts use?: Set severity: warning and for: 0m on every new alert. The spend expression covers 24 hours and each no-success expression covers two periods, so the window is the smoothing; RagIngestBehind uses the same pattern. A 1 USD spend or a missed steward row is a ticket, not a page. (best practice) [sources: docs/guidelines/sre.md:243, k8s/devops/monitoring/prometheus-rules-values.yaml:535, k8s/README.md:218]
    • Chosen: warning, for 0m. The expression covers the window, as RagIngestBehind does, and neither alert pages.
    • Rejected: critical. The page budget is 2 a day, and a 1 USD spend or a missed row does not page.
    • Rejected: warning, for 30m. The window is already a day or two periods, so a second wait delays the alert with no gain.
  • How many no-success rules does the change add?: Two, one for each steward row: RoadmapResolveNoSuccess with 8h and RoadmapSplitNoSuccess with 12h. PromQL has no dynamic range, so one rule holds the two periods of one row. The spend alert is RoadmapStewardSpendDailyHigh. (best practice) [sources: docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md:139, docs/adr/0021-the-roadmap-service-is-a-webhook-router-cluster-pods-run-the-roadmap-jobs-and-valkey-holds-their-shared-state.md:162]
    • Chosen: Two rules, one per row. Each row has its own schedule, so two periods are 8h for resolve and 12h for split.
    • Rejected: One rule with 12h. 12h is more than two periods of the resolve row, so the rule waits too long for that row.
    • Rejected: One rule with 8h. 8h is less than two periods of the split row, so the rule fires before its second period ends.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

#4808, #4817

Activity

  1. added
    source/agent
    on Nov 11, 2026
  2. added
    type/feature
    scope/monitoring
    status/new
    value/medium
    effort/medium
    on Nov 11, 2026
  3. dan-petty commented on Nov 11, 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/monitoring. The (monitoring) scope of the title gives the scope.
    • Priority: P2-Medium. It fulfils an owner requirement for visibility but depends on several open items.
    • Value: Medium. It gives the owner the split thresholds, spend and success panels they asked for.
    • Effort: Medium. The body estimates about 60,000 tokens and 2 hours of work.
    • Related: feat(roadmap): a dashboard and alerts for the pipeline #3655, which asks for a different change. Both work on the roadmap pipeline dashboard in k8s/, but #3655 builds the dashboard structure while the candidate adds the steward row panels and their alerts.
  4. added
    priority/p2-medium
    on Nov 11, 2026
  5. devops-cli-service commented on Nov 14, 2026

    @devops-cli-service
    Contributor

    Alternatives check: in-use

    Reason: The need is project-specific dashboard panels plus Prometheus alert rules and promtool tests, and the body already names Grafana, Prometheus and promtool as installed tools. Grafana covers the dashboard panels (and keeps them as code in the repo), but it does not supply the steward-row queries, the promtool unit tests or the runbook entries, so the issue remains partly configuration work.

    The repository already uses this tool.

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

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

    Covers:

    • Renders and provisions the roadmap pipeline dashboard panels from PromQL queries over the project's Prometheus metrics
    • Keeps the dashboard definitions in the repository so the panel queries can be reviewed and checked

    Lacks:

    • The steward-row panel queries themselves: inbox kinds, actions by row and result, the 7-day useful share, the per-row spend and the split thresholds over time
    • The two alert rules and their promtool unit tests, which belong to Prometheus/promtool rather than Grafana
    • Runbook entries in k8s/README.md

    Tools considered:

    Searches run:

    • Grafana dashboard panels and Prometheus alerting rules as code promtool unit tests, results: 5
    • grafana-operator Kubernetes dashboards and PrometheusRule CRD maintained, results: 5
    • Grafana Foundation SDK generate dashboards as code, results: 5
    • promtool test rules unit testing Prometheus alerting rules, results: 5
    • Grafana, results: 5
    • Prometheus, results: 5
    • promtool, results: 5
    • grafana-foundation-sdk, results: 5

    Sources:

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

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

    @devops-cli-service
    Contributor

    Refine cannot set this item to Ready at e5dfddb 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.

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

    @devops-cli-service
    Contributor

    Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies in the section Proposed design of the body.

  8. dan-petty commented on Dec 1, 2026

    @dan-petty
    OwnerAuthor

    Scope change of 2026-12-01: #4813 (the group row) is closed as not planned. So the panels and the alerts of this item cover the resolve and split rows only. The alert on the spend of the three rows becomes an alert on the spend of these two rows.

  9. devops-cli-service commented on Dec 1, 2026

    @devops-cli-service
    Contributor

    Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies in the section Proposed design of the body.

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/monitoringsource/agentstatus/newtype/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions