Skip to content

fix(roadmap): run stage before refine on the model lane #4796

Closed

Description

@dan-petty

Problem Description

The model lane of each repository runs its rows one at a time, in the order refine, retitle, stage, alternatives (MODEL_LANE_ROWS in src/devops_cli/roadmap/run.py). Since #4430 (v0.109.0, closes #4426), refine takes at most 7 items and is due every 17 minutes. A 7-item refine round takes 36 to 77 minutes, so refine is due again when its round ends. The first round of each new Service pod runs refine first. The pod restarts about every 1 to 1.5 hours, so stage often gets no turn before the next restart.

Measured on the devops-cli lane (Prometheus devops_cli_roadmap_row_seconds, Service logs):

  • Stage row time fell from 688 minutes (2026-11-10) to 311 minutes (2026-11-11 to 19:30 UTC). Refine row time rose from 205 to 611 minutes. Stage rounds fell from 14 to 10.
  • On 2026-11-11, a new pod ran refine directly after a refine round 4 times: at about 15:00, 17:37, 19:30 and 19:37 UTC. From 17:36 to 18:54 UTC no stage attempt ran: the refine round of the new pod took 77 minutes.
  • 149 Ready items are selectable and 0 items are Planned. Stage, not refine, limits the plan pull requests.

Refine writes each item when it is done (#3631), so a restart costs refine at most the item in progress. A restart costs stage the round in flight (#4559).

This is not #4559. #4559 moves each stage item into its own Job (high effort) and removes stage from the model lane. This item changes only the row order of the lane, as a small fix until #4559 is done.

Reproduction Steps

  1. Set the last success of refine and of stage in schedule.json older than their intervals (17 and 37 minutes).
  2. Run devops roadmap run --dry-run, or run one round of MODEL_LANE_ROWS with run_due_jobs.
  3. The Due: line and the run order put refine before stage.

Expected vs Actual Behavior

Expected:

Actual: refine runs first in every round and after each restart.

Expected effect, from a model of the lane with the measured numbers (refine 6.2 minutes per item, a stage round of 32 to 49 minutes, a restart about every 80 minutes):

Stage rounds per hour Refine items per hour
Now (refine first) 0.62 to 0.70 5.7 to 6.6
Stage first 1.07 to 1.15 3.2 to 4.4
No restart, either order 0.66 to 0.81 4.6 to 5.6

Refine stays at or above its rate before #4430 (about 3 items per hour on 2026-11-10).

Environment Diagnostics

devops-cli 0.112.2 in the roadmap Service. service.model_call_concurrency 1. The ConfigMap sets roadmap.stage.limit 3.

Logs, Traces, or Terminal Output

19:37:17 Refine round for dan-petty/devops-cli started: 7 item(s) taken.   (new pod)
19:35:50 Refine round for dan-petty/devops-cli ended: taken=7, written=1, failed=0.
19:30:45 Refine round for dan-petty/devops-cli started: 7 item(s) taken.   (new pod)
19:17:53 stage gate returns: repo=dan-petty/devops-cli item=#4472 returns=1 result=refused
18:54:33 Refine round for dan-petty/devops-cli ended: taken=7, written=7, failed=0.
17:37:07 Refine round for dan-petty/devops-cli started: 7 item(s) taken.   (new pod)

Activity

  1. added
    source/agent
    type/bug
    scope/roadmap
    status/new
    value/medium
    effort/low
    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. Stage is starved and 0 items reach Planned, but a larger fix (#4559) is already planned.
    • Value: Medium. Unblocks stage so Ready items can become Planned, but it is a stopgap before #4559.
    • Effort: Low. The change reorders a small list of row names in one file.
    • Related: fix(service): the implement row waits behind refine on the model lane though it calls no model #2757, which asks for a different change. Both fix a row-ordering problem in the model lane, but #2757 moves the implement row and this candidate moves the stage row.
  3. added
    priority/p2-medium
    owner/agent
    status/in-progress
    and removed
    status/new
    on Nov 11, 2026
  4. removed
    status/in-progress
    owner/agent
    on Nov 11, 2026
  5. devops-cli-service commented on Nov 11, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-11 22:57 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/lowpriority/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