Skip to content

feat(roadmap): job grade gauges and alerts for the pipeline #5919

Open

Description

@devops-cli-service

Split from #3655.

The gauge row for each workflow and the four alerts: RoadmapJobGradeDrop, RoadmapJobBroken, RoadmapJobInfraShare, RoadmapJobResultsMissing. RoadmapJobGradeDrop replaces the success-rate alert of #3655. The panels read the recorded series of #5172. Deferred because it depends on #5172, which is not yet delivered. Acceptance criteria: the gauge row shows the point grade, 7-day ratio, n, first-pass ratio, infrastructure share, and tokens; each alert has a promtool test and a runbook row; RoadmapJobGradeDrop fires when the 7-day Wilson upper bound is under the floor of the grade of 3 days before, with 30 or more attempts.

Proposed design

Problem statement

Do not start before #5172 delivers the recorded series. The roadmap pipeline has no gauge row and no alerts for job grade. A person cannot see the point grade, 7-day ratio, n, first-pass ratio, infrastructure share and tokens of each workflow. No alert reports a grade drop, a broken job, a high infrastructure share or missing results. This change adds the gauge row and four alerts. RoadmapJobGradeDrop replaces the success-rate alert of #3655.

Acceptance criteria

Requirement: Job grade gauge row

The dashboard SHALL show a gauge row with one panel for each of the point grade, 7-day ratio, n, first-pass ratio, infrastructure share and tokens, covering every roadmap workflow.

Scenario: Gauge row passes dashboard lint

  • WHEN I run uv run devops grafana dashboards lint k8s/devops/dashboards and uv run devops ci --check --only k8s.
  • THEN Both commands exit 0 and the lint command reports one gauge row with the six panels for every roadmap workflow.

Requirement: Recorded series only

The gauge row and the four alerts SHALL read only the recorded series that #5172 adds.

Scenario: No new recording rule for job grade

  • WHEN I run uv run devops prometheus rules.
  • THEN The output holds no recording rule for job grade.

Requirement: Promtool test for each alert

Each of the four alerts SHALL have a promtool test.

Scenario: Promtool tests pass for four alerts

  • WHEN I run promtool test rules tests/fixtures/prometheus_rules/roadmap_job_grade_tests.yaml.
  • THEN promtool reports one passing test for each of the four alerts.

Requirement: Runbook row for each alert

Each of the four alerts SHALL have a runbook row with its owner action.

Scenario: Runbook lists four alerts

  • WHEN I run uv run devops ci --check --only docs.
  • THEN The docs check exits 0 and reports one runbook row for each of the four alerts with its owner action.

Requirement: RoadmapJobGradeDrop alert

RoadmapJobGradeDrop SHALL fire when the 7-day Wilson upper bound is under the floor of the grade of 3 days before, with 30 or more attempts.

Scenario: Grade drop fires below the floor

  • WHEN promtool test rules tests/fixtures/prometheus_rules/roadmap_job_grade_tests.yaml evaluates 30 or more attempts and a 7-day Wilson upper bound under the floor of the grade of 3 days before.
  • THEN promtool reports RoadmapJobGradeDrop firing.

Requirement: RoadmapJobBroken alert

RoadmapJobBroken SHALL fire when a workflow has at least 5 attempts in the last 6 hours and no success.

Scenario: Broken job fires after six hours without a success

  • WHEN promtool test rules tests/fixtures/prometheus_rules/roadmap_job_grade_tests.yaml evaluates 5 or more attempts in the last 6 hours and no success.
  • THEN promtool reports RoadmapJobBroken firing.

Requirement: RoadmapJobInfraShare alert

RoadmapJobInfraShare SHALL fire when the infrastructure share is over 0.20 with 10 or more attempts in the last 24 hours.

Scenario: High infrastructure share fires

  • WHEN promtool test rules tests/fixtures/prometheus_rules/roadmap_job_grade_tests.yaml evaluates 10 or more attempts in the last 24 hours and an infrastructure share over 0.20.
  • THEN promtool reports RoadmapJobInfraShare firing.

Requirement: RoadmapJobResultsMissing alert

RoadmapJobResultsMissing SHALL fire when a workflow has attempts in the last hour and no result line in the last hour.

Scenario: Missing results fire

  • WHEN promtool test rules tests/fixtures/prometheus_rules/roadmap_job_grade_tests.yaml evaluates attempts in the last hour and no result line in the last hour.
  • THEN promtool reports RoadmapJobResultsMissing firing.

Existing Tool Considered

No alternatives check has run. Use the Prometheus alerting rules in k8s/devops/monitoring/prometheus-rules-values.yaml. Use promtool for the alert tests. Use the Grafana dashboard k8s/devops/dashboards/roadmap-service-telemetry.json. These open, maintained tools cover the need and lack no part. The repository already deploys them. No custom gauge or alert code is needed. The recorded series they read come from #5172, which is not yet delivered.

Key questions

  • Which tool renders the gauge row and evaluates the alerts?: Use the Prometheus alerting rules in k8s/devops/monitoring/prometheus-rules-values.yaml. Use promtool for the alert tests. Use the Grafana dashboard k8s/devops/dashboards/roadmap-service-telemetry.json. These open, maintained tools are already deployed. No custom gauge or alert code is needed. (best practice) [sources: k8s/devops/monitoring/prometheus-rules-values.yaml, k8s/devops/dashboards/roadmap-service-telemetry.json, docs/CLUSTER.md]
    • Chosen: Prometheus rules, promtool tests and Grafana dashboards. They are open, maintained, and the repository already deploys them.
    • Rejected: Custom Python gauge and alert service. It duplicates maintained tools and adds code to build and keep.
    • Rejected: Loki-only alerting. It has no Prometheus alert semantics and no promtool tests.
  • What is the grade floor and the minimum attempt count?: The grade is the highest floor that p reaches: 0.90, 0.80, 0.70, 0.60 or <60. The grade is 100 when every attempt is a first pass. The grade is too few under 30 attempts. p counts only attempts with infra=false. [sources: docs/roadmap/job-success.md, openspec/specs/roadmap-job-grades/spec.md]
  • What confidence does the 7-day Wilson upper bound use?: The 7-day Wilson upper bound uses z = 1.96, the 95% interval. [sources: docs/guidelines/agentic-jobs.md, docs/commands/roadmap.md]
  • When does RoadmapJobBroken fire?: It fires when a workflow has 5 or more attempts in the last 6 hours and no success. This is the broken signal of the job grade report. (best practice) [sources: docs/roadmap/job-success.md, src/devops_cli/roadmap/job_grade_report.py]
    • Chosen: 5 attempts in 6 hours with no success. It is the broken signal that the job grade report already records.
    • Rejected: 3 attempts in 6 hours with no clean attempt. It contradicts the recorded signal and fires before the report calls a job broken.
    • Rejected: 1 failed attempt. It is noisy and reports normal retries.
  • When does RoadmapJobInfraShare fire?: It fires when the infrastructure share is over 0.20 with 10 or more attempts in the last 24 hours. This is the infra signal of the job grade report. (best practice) [sources: docs/roadmap/job-success.md, src/devops_cli/roadmap/job_grade_report.py]
    • Chosen: 0.20 share with 10 attempts in 24 hours. It is the infra signal that the job grade report already records.
    • Rejected: 0.50 share with 30 attempts in 7 days. It hides a real infrastructure drag that the report already flags.
    • Rejected: No share alert. A high infrastructure cut then stays invisible.
  • When does RoadmapJobResultsMissing fire?: It fires when a workflow has attempts in the last hour and no result line in the last hour. This is the window of the existing RoadmapFixChecksJobWithoutResult alert. (best practice) [sources: k8s/devops/monitoring/prometheus-rules-values.yaml, src/devops_cli/roadmap/fix_checks_row.py]
    • Chosen: 1 hour with attempts and no result line. It matches the existing product alert for a Job that ended with no result line. It still catches a stopped result line within a shift.
    • Rejected: 24 hours with attempts and no result line. It hides a data loss for a day.
    • Rejected: No result alert. A silent result loss then stays invisible.
  • Where do the gauge row and alerts live?: The gauge row lives in the Roadmap Job Success row of k8s/devops/dashboards/roadmap-service-telemetry.json. The product alert rules live in k8s/devops/monitoring/prometheus-rules-values.yaml. The promtool cases live in tests/fixtures/prometheus_rules/. [sources: k8s/devops/dashboards/roadmap-service-telemetry.json, k8s/devops/monitoring/prometheus-rules-values.yaml, tests/fixtures/prometheus_rules/roadmap_service_tests.yaml]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

#5172

Activity

  1. added
    type/feature
    source/agent
    scope/roadmap
    status/new
    value/medium
    on Nov 16, 2026
  2. devops-cli-service commented on Nov 16, 2026

    @devops-cli-service
    ContributorAuthor
  3. added
    effort/medium
    priority/p2-medium
    on Nov 16, 2026
  4. devops-cli-service commented on Nov 18, 2026

    @devops-cli-service
    ContributorAuthor

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

  5. devops-cli-service commented on Nov 27, 2026

    @devops-cli-service
    ContributorAuthor

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions