Skip to content

fix(roadmap): stage metric and log give no left-out reason #4521

Closed

Description

@dan-petty

Problem Description

The stage job of the Service gives no reason when it leaves out an item. A Ready item can wait for days, and the logs and metrics do not show why.

The cause (origin/main 0ac2f76):

  • stage_results (src/devops_cli/roadmap/stage/stage.py:2840) gives the result skipped to every left-out item, and also to every returned and every rejected item.
  • emit_stage_results (src/devops_cli/roadmap/stage/stage.py:2860) adds 1 to devops_cli_roadmap_stage_total with only the labels result and repo. The metric has no reason label.
  • The Service logs no left-out reason. Loki holds 0 lines from the devops_cli.roadmap.stage.stage logger for the managed repositories in 48 hours.

The reasons exist in the code (StagePlan.left_out holds them, and devops roadmap explain prints them), but only a person who runs explain on a clone sees them.

Reproduction Steps

  1. Query Prometheus: count_over_time(devops_cli_roadmap_stage_total{repo!="dan-petty/devops-cli"}[48h]). All samples have result="skipped".
  2. Query Loki: sum by (logger) (count_over_time({namespace="devops", container="service"} |~ "(dotfiles|dreamscaper|homelab|vibes)" | json [48h])). No line comes from devops_cli.roadmap.stage.stage.
  3. Clone each repository and run uv run devops roadmap explain <n> for each Ready item. Only then do the reasons show.

Expected vs Actual Behavior

Expected: each stage round logs the left-out reason of each item one time (or one time per change of the reason), and the metric carries a bounded reason label, for example title_type, held_by_branch, failed_lately, queue_full, returned and rejected. A person or an alert can then see why a repository is idle without a clone.

Actual: from 2026-11-08T23:45Z to 2026-11-10T23:45Z, the stage job left out every Ready item in 4 managed repositories in every round:

Environment Diagnostics

  • DevOps CLI Version: 0.110.0 (the live roadmap-service pod)
  • Python Version: 3.14
  • OS & Architecture: Linux x86_64
  • Execution Environment: Roadmap Service (the stage row for the managed repositories)

Logs, Traces, or Terminal Output

# Prometheus
count_over_time(devops_cli_roadmap_stage_total{repo!="dan-petty/devops-cli"}[48h])
# 72 samples per repository, all result="skipped"

# Loki
sum by (logger) (count_over_time({namespace="devops", container="service"} |~ "(dotfiles|dreamscaper|homelab|vibes)" | json [48h]))
# refine, run, stage_ready, status_sync, webhooks; no devops_cli.roadmap.stage.stage

Related: #3387 (re-stage a failing draft plan), #2911 (explain names the reasons), #3671 and #3672 (other stage_ready changes).

Pre-Submission Checklist

  • I have verified that no sensitive credentials, private keys, or internal tokens are contained in this issue report.
  • I have checked existing issues and pull requests to ensure this is not a duplicate.

Activity

  1. added
    source/agent
    type/bug
    scope/roadmap
    status/new
    value/medium
    effort/medium
    on Nov 11, 2026
  2. 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/bug. The fix prefix of the title gives the type.
    • Scope: scope/roadmap. The (roadmap) scope of the title gives the scope.
    • Priority: P2-Medium. Operators cannot diagnose idle pipelines for days, but the system still functions correctly. The regression commit 0ac2f76 does not set P0: the author has no write access, and no caller attached it as evidence. A person can set P0 with the label priority/p0-critical.
    • Value: Medium. It removes a blind spot that blocks diagnosis of stalled items across managed repositories.
    • Effort: Medium. The reasons already exist in StagePlan.left_out; the work is wiring them into logs and adding one bounded label to the metric.
    • Related: feat(roadmap): devops roadmap explain names why stage and implement take or skip an item #2911, which asks for a different change. Both items surface stage left-out reasons, but #2911 delivers them via the explain CLI command while the candidate asks for them in Service logs and a metric label.
  3. added
    priority/p2-medium
    owner/agent
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Nov 11, 2026
  4. removed
    status/in-review
    owner/agent
    on Nov 11, 2026
  5. devops-cli-service commented on Nov 11, 2026

    @devops-cli-service
    Contributor
  6. devops-cli-service commented on Nov 11, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-11 14:13 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