Skip to content

fix(roadmap): correct the facts and the stage SLI of the review #6612

Closed

Description

@dan-petty

Problem

PR #6586 (#4692) added the fact catalog of the project review (src/devops_cli/roadmap/project_review/catalog.yaml and dispatch.py). Its second review ended after the merge. It confirmed these fact defects on main (752c6ed). Each one gives ok with 0 or no rows for a value that was not measured, or gives a false disagreement:

  1. prometheus.tool_limit_hits queries devops_cli_roadmap_tool_cuts_total, but its base is devops_cli_roadmap_tool_calls_total. prometheus.stage_gate_refusals queries devops_cli_roadmap_stage_gate_refusals_total, but its base is devops_cli_roadmap_stage_total. The probe finds the base metric, so a window from before the counter existed (before 2026-11-14 for cuts, feat(roadmap): mark each cut tool answer with its cap #5622; before about 2026-11-09 for refusals, feat(telemetry): send stage step seconds and gate refusal counts #4176) gives ok with [] or 0.0. Live: --since 2026-11-06T00:00:00Z --until 2026-11-07T00:00:00Z prints prometheus.tool_limit_hits: [] cuts.
  2. The base probe _PROBE (dispatch.py line 94) is group(last_over_time({base}[{range}])) over the whole window. Nine facts read their query only at the window end (no [{range}]), for example prometheus.alertmanager_alerts, prometheus.silences_active and prometheus.argocd_apps. When the series is absent at the window end, the fact gives ok with no rows. Live: the window that ends 2026-11-17T12:00Z gives alertmanager_alerts ok with [] and silences_active ok with 0.0, but 20 minutes before, 18 alerts were active. In the last 30 days, alertmanager_alerts was absent for 542 minutes.
  3. The disagreement pair prometheus.implement_runner_jobs and prometheus.runner_jobs_started (catalog.yaml line 861) breaks for a window that crosses the Job rename of feat(roadmap): label Service Jobs by repository and item #5739 (2026-11-14). The right fact counts only the new Job names. Live: the 7 days to 2026-11-16T00:00Z give 48.43 against 15, a false disagreement of about 69 %.
  4. The path:openspec/specs condition (dispatch.py line 161) is checked on the working tree, not at the base and head commits of the window. A window from before 2026-10-23 (commit f209f6c added the folder) gives openspec.requirements ok with {"base": 0, "head": 0}.
  5. prometheus.oldest_pending_update reads a gauge that no code emits yet (feat(monitoring): export outdated dependencies from Renovate #4911 adds it). Each review gives skipped: No series matched the query., which looks like a gauge that stopped.
  6. The owner decided on 2026-11-21 (comment on feat(roadmap): read project review facts through a catalog #4692) that SLO 1 of the stage row counts item outcomes, not Service rounds. prometheus.stage_sli still divides the rounds of devops_cli_service_jobs_total, and since feat(roadmap): run each stage item in its own Job #5559 a round plans no item. PR feat(roadmap): read project review facts through a catalog #6586 added the item outcomes only as the rows fact prometheus.stage_item_results.

Expected

  1. base names the queried metric. A catalog load check refuses a fact whose base metric does not occur in its query. An explicit field lets a fact use another metric on purpose.
  2. The probe has the time scope of the query: a fact with no [{range}] probes group(<base>) at the window end.
  3. A window that starts before the rename of feat(roadmap): label Service Jobs by repository and item #5739 does not read the pair: a not-before time on runner_jobs_started, or the pair leaves the disagreement list for that window.
  4. The path condition is checked at the base and head commits (for example git cat-file -e <sha>:openspec/specs). It gives skipped with a reason when the path is not there.
  5. The skip reason of oldest_pending_update says that the gauge comes with feat(monitoring): export outdated dependencies from Renovate #4911.
  6. prometheus.stage_sli is the share of the stage item outcomes (devops_cli_roadmap_stage_total, result!="skipped") that are good. The design names which results are good (staged, and whether needs_split is), and the definition names the owner decision.

Acceptance criteria

  • Test first for each point, with fixtures. Each test fails on the base.
  • A catalog test: a fact whose base metric is not in its query is refused.
  • A dispatcher test: an end-instant fact with an empty answer, a range probe with a series and an instant probe with no series gives skipped.
  • A dispatcher test: a window that crosses the rename time does not report the runner pair.
  • A test with a fixture repository whose base commit has no openspec/specs: the fact is skipped.
  • A test: stage_sli reads devops_cli_roadmap_stage_total and gives the share of good item outcomes.
  • The live check after the merge: rerun the windows of points 1 and 2 read-only. The facts of points 1 and 2 are skipped.

Dependencies

None.

Source

Source: #6586

Alternatives check of 2026-11-21: none.
Tool: none found.
Reason: Searches found no relevant tool; the nearest are a PromQL rule linter, a PromQL parser and an SLO rule generator, none of which checks the fact catalog, the probe scope, the window gating or the item-outcome SLI.

Lacks:

  • No check that a fact's base metric occurs in its query
  • No probe scoped to the window end for instant facts
  • No window gating of the runner metric pair across a rename
  • No path condition checked at the base and head commits
  • No stage SLI computed from item outcomes

Activity

  1. added
    type/bug
    source/agent
    scope/roadmap
    status/new
    value/medium
    on Nov 21, 2026
  2. dan-petty commented on Nov 21, 2026

    @dan-petty
    OwnerAuthor
  3. added
    effort/medium
    priority/p2-medium
    on Nov 21, 2026
  4. devops-cli-service commented on Nov 21, 2026

    @devops-cli-service
    Contributor

    The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.

    Searches (8)

    Tools considered:

    Searches run:

    • PromQL linter validate metric names in query pint, results: 5
    • open source tool check Prometheus query metric exists before time range, results: 5
    • promtool prometheus query static analysis promql parser library, results: 5
    • pint Prometheus rule linter, results: 5
    • cloudflare pint promql lint metric name, results: 5
    • promql-parser python package, results: 5
    • sloth SLO generator prometheus recording rules, results: 5
    • tool validate YAML catalog metric name against query, results: 5

    Sources:

  5. added
    owner/agent
    on Nov 21, 2026
  6. added
    status/in-progress
    and removed
    status/new
    on Nov 21, 2026
  7. added
    status/in-review
    and removed
    status/in-progress
    on Nov 21, 2026
  8. removed
    status/in-review
    owner/agent
    on Nov 21, 2026
  9. devops-cli-service commented on Nov 21, 2026

    @devops-cli-service
    Contributor
  10. devops-cli-service commented on Nov 21, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-21 19:08 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/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions