Skip to content

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

Merged
dan-petty merged 3 commits into
mainfrom
fix/4796-stage-before-refine
Nov 11, 2026
Merged

dan-petty merged 3 commits into
mainfrom
fix/4796-stage-before-refine

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

The model lane ran refine before stage. A round of 7 refine items (#4426) takes 35 to 65 minutes, and refine is due again when it ends. So the first round of each new Service pod ran refine, and stage often got no turn before the next restart.

The model lane now runs retitle, stage, refine, alternatives:

#4559 stays the full fix for restarts that cut a stage round.

Closes #4796

Change: openspec/changes/archive/2026-11-11-4796-run-stage-before-refine-on-the/

The model lane ran refine before stage. A round of 7 refine items takes
35 to 65 minutes, so the first round of each new Service pod held the
lane before stage had a turn. Stage now runs before refine. A round in
which refine set an item Ready writes stage_due to schedule.json, so
stage is due in the next round (#2659).

Refs #4796
@dan-petty dan-petty added type/bug Type bug: the code does not do what it must scope/roadmap The roadmap jobs: intake, refine, stage, implement and the Service that runs them labels Nov 11, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Measurements and checks for this change.

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

Day (UTC) Stage row minutes Refine row minutes Stage rounds Refine rounds
2026-11-10 688 205 14 28 (mostly 3 items)
2026-11-11 (to about 19:30) 311 611 10 19 (mostly 7 items)
  • Refine rounds of 7 items on 2026-11-11: 37.5, 38.6, 63.3, 41.2, 45.7, 35.9 and 77 minutes.
  • A new pod ran refine directly after a refine round 4 times on 2026-11-11 (about 15:00, 17:37, 19:30 and 19:37 UTC). No stage attempt ran from 17:36 to 18:54 UTC.
  • 149 Ready items are selectable and 0 items are Planned.

Expected stage runs per hour. A model of the lane with the measured numbers: refine 6.2 minutes for each item (log-normal), a stage round of 3 items that takes 32 minutes (2026-11-11) or 49 minutes (2026-11-10), a restart with a 10-minute drain at random times, 30 simulated days for each case.

Restart about every Order Stage rounds per hour Refine items per hour
80 minutes refine first (before) 0.62 to 0.70 5.7 to 6.6
80 minutes stage first (this change) 1.07 to 1.15 3.2 to 4.4
144 minutes refine first (before) 0.64 to 0.74 5.3 to 6.2
144 minutes stage first (this change) 0.86 to 0.98 3.8 to 5.0
never either order 0.66 to 0.81 4.6 to 5.6

So stage gets about 1 round of 3 items each hour (about 26 to 28 a day) with the current restart rate, against 10 on 2026-11-11. Refine stays at or above its rate before #4426 (about 3 items an hour on 2026-11-10). The alternatives in design.md give: a 17-minute bound on a refine round, 0.87 to 1.15 stage rounds and 3.0 to 4.6 refine items an hour; round robin, 0.82 to 0.95 stage rounds and 4.6 to 5.4 refine items an hour.

Checks:

  • uv run devops ci test of the 7 changed test files: 137 passed.
  • uv run devops roadmap eval stage --replay on origin/main and on this branch: the same result on both, "every gate refuses what it must refuse", 82 of 319 defects judged, 5 of 5 good plans accepted. This change does not touch the stage gates.
  • uv run devops ci fail-to-pass --base origin/main: 6 failed and 1 errored on base, 117 passed on base, all pass on this branch. Failed on base:
    • tests/roadmap/test_roadmap_run_due_table.py (collection error: CONST_ROADMAP_STAGE_DUE_STAMP does not exist on base; its new tests test_stage_runs_before_refine_and_is_due_in_the_round_after_refine_set_an_item_ready and test_a_refine_round_that_set_an_item_ready_and_failed_another_makes_stage_due fail on base on the order and the stamp)
    • tests/roadmap/stage/test_roadmap_stage_job.py::test_the_row_follows_retitle_before_refine_runs_on_a_clone_and_is_due_every_37_minutes
    • tests/roadmap/test_roadmap_run_lanes.py::test_each_lanes_success_stays_in_schedule_json_when_their_rounds_interleave
    • tests/roadmap/test_roadmap_run_service.py::test_service_wiring
    • tests/roadmap/test_roadmap_run_job_rows.py::test_the_alternatives_row_follows_refine_and_is_due_every_719_minutes_and_by_no_hint
    • tests/roadmap/test_roadmap_run_job_rows.py::test_the_dry_run_of_the_cli_lists_the_alternatives_row
    • tests/roadmap/implement/test_roadmap_implement_submit.py::test_the_row_follows_metrics_on_the_status_lane_runs_on_a_clone_and_is_due_every_seven_minutes

Live steps: none. No setting or ConfigMap key changes. The release that carries this change rolls out the Service image. A schedule.json with no stage_due key reads as no stamp. After the rollout, check in the Service log that the first model-lane round of the new pod logs a stage line for devops-cli before the line Refine round for <owner>/devops-cli started.

@dan-petty
dan-petty marked this pull request as ready for review November 11, 2026 22:09
@dan-petty
dan-petty merged commit 96c9bee into main Nov 11, 2026
26 checks passed
@dan-petty
dan-petty deleted the fix/4796-stage-before-refine branch November 11, 2026 22:09
dan-petty pushed a commit that referenced this pull request Nov 11, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.114.0](v0.113.0...v0.114.0)
(2026-11-11)


### Features

* **k8s:** add cert-manager and the Barman Cloud plugin
([#4789](#4789))
([cd6fb76](cd6fb76))
* **roadmap:** collect the git facts of a project review window
([#4794](#4794))
([21d1bc0](21d1bc0))
* **roadmap:** consolidate has a read-only MCP mirror
([#4807](#4807))
([2ec561d](2ec561d))


### Bug Fixes

* **ai:** devops ai agents detects the project manifest
([#4790](#4790))
([e8d1e53](e8d1e53))
* **mcp:** bound the gh resources longer than a GitHub read
([#4844](#4844))
([7f09921](7f09921))
* **roadmap:** run stage before refine on the model lane
([#4841](#4841))
([96c9bee](96c9bee))
* **roadmap:** stop refusing test paths in base docstrings
([#4826](#4826))
([1bbfce0](1bbfce0))
* **telemetry:** key the project gauges by repository
([#4804](#4804))
([9f0e0c8](9f0e0c8))


### Performance Improvements

* **ci:** run the in-image suite nightly and on image pull requests
([#4828](#4828))
([a2cfd9a](a2cfd9a))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/roadmap The roadmap jobs: intake, refine, stage, implement and the Service that runs them type/bug Type bug: the code does not do what it must

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant