Skip to content

feat(service): each roadmap job runs in its own lane - #5563

Merged
dan-petty merged 9 commits into
mainfrom
feat/5553-each-roadmap-job-in-its-own-lane
Nov 13, 2026
Merged

dan-petty merged 9 commits into
mainfrom
feat/5553-each-roadmap-job-in-its-own-lane

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

Each row of the roadmap due table now runs in a lane of its own in the Service: one worker and one trigger queue for each row and repository, with the name of the row. A round of one row no longer waits for a round of another row, such as alternatives behind refine.

  • The setting service.lanes puts rows into a shared lane. The Service reads it when it starts.
  • Each lane with a row that needs files works in its own clone, lanes/<lane>, and reads the listing through its own snapshot. The start removes the state of the earlier lanes.
  • A trigger carries the issue of its delivery as its subject, for feat(service): webhook events wake the lanes of their jobs #5555.
  • After a scoped intake, the wake goes to each other lane, and to the lane of intake when it holds another row.
  • devops_cli_roadmap_row_seconds gets the label lane.

The model call limit, the GitHub budget and the failure ledger stay shared. Overlap: #5559, #5560.

Closes #5553
Change: openspec/changes/archive/2026-11-13-5553-each-roadmap-job-in-its-own-lane/

Each row of the due table now runs in a lane of its own: one worker and
one trigger queue for each row and repository, named after the row. A
stage round no longer holds back a refine round of the same repository.

- The setting service.lanes puts rows into a shared lane. The Service
  reads it when it starts and refuses an unknown row, a row in two lanes
  and a lane name of another row.
- Each lane works in its own clone, lanes/<lane>. A test with two git
  worktrees of one clone showed fetches that fail on the shared refs.
- Each lane reads through its own listing snapshot. The lane of intake
  keeps the intake snapshot, which the scoped intake also reads.
- The start of the Service removes the clones and the snapshots of the
  lanes that it does not run.
- A trigger carries the issue of its event as an optional subject, the
  seam for #5555.
- The row seconds histogram carries the lane in a Service round.
The cluster runbook, the term Lane, the intake, stage and alternatives
pages and ADR 0017 now tell that each row runs in a lane of its own, and
how service.lanes groups rows. The scoped update spec now wakes each
other lane. The generated documents carry the setting service.lanes, the
help of serve --service and the lane of the row seconds histogram.
The comments of the stage stamp, the webhook keys, the listing snapshot
and the job record lock named the status, triage and model lanes. They
now name the lane of each row.
After a scoped intake of an edit or of a critical placement, the
Service sent the trigger to each lane but the lane of intake. When
service.lanes puts refine or retitle into the lane of intake, an edit
then did not make those rows due. lanes_to_wake now sends the trigger
to the lane of the update too when that lane holds another row.

The spec of the row seconds histogram now gives 13 rows and 39 series,
as the instrument and its test do.
The stage command, the stage Job and the stage row of the Service named
the status clone. The status lane is gone: the command and the Job work
in the clone 'clone', and the row works in the clone of its lane.
The helper of the lane table test held a type: ignore. With the tests of
origin/main, the tests then held 80 of them, above the ceiling of 79 that
test_suppressions_stay_under_their_ceilings checks. The helper now takes
the rows as JobRow.
The stage row moved to the status lane in #4559, so a blocked stage round
and the clone of stage no longer prove the lanes against origin/main. The
tests of a blocked round and of the working trees now also run on refine
and alternatives, which shared the model lane and its clone there.
@dan-petty

Copy link
Copy Markdown
Owner Author

Review and test results for the head of this pull request (rebased on origin/main 06bf1e6, release 0.133.0).

Fail-to-pass (uv run devops ci fail-to-pass --base origin/main, exit 0): 38 changed tests fail on the base, 112 pass, and 4 test files do not collect on the base (they import names that the base does not have). Each test that fails on the base is a test that this branch adds or changes. Acceptance tests:

  • test_a_blocked_round_of_one_row_holds_back_no_round_of_another_row_of_the_same_repository[refine-alternatives] fails on the base with assert (False, True, False, False) == (True, True, True, True): in the one model lane, a blocked refine round holds back alternatives. The [stage-refine] case passes on the base, because feat(roadmap): run each stage item in its own Job #5559 moved stage to the status lane.
  • test_two_lanes_never_use_the_same_working_tree[refine-alternatives] fails on the base with KeyError: 'alternatives' (no lane of its own).
  • tests/roadmap/test_roadmap_run_lane_table.py (default lanes, service.lanes groups) does not collect on the base.

Scoped checks on the head:

  • uv run devops ci --check --only lint,format,docs,constructs,openspec,test-settings,test-tree,startup-imports,swallowed-failures,domain: all pass.
  • uv run mypy src/devops_cli/roadmap/ src/devops_cli/server/ src/devops_cli/commands/serve.py src/devops_cli/config/settings.py: no issues in 181 files.
  • uv run devops ci test over tests/roadmap/test_roadmap_run_*.py, tests/roadmap/stage/, steps/, implement/, stores/, tests/server/, tests/telemetry/, tests/config/, tests/invariants/, tests/docs/, the alert rules and the dashboards: 7150 passed and 1 failed before the fix below; the failed test and the changed files pass after it (1126 passed).

Render diff: git diff --stat origin/main...HEAD -- k8s is empty. No manifest changes, so kubectl kustomize gives the same output on both sides. The Service image rolls at the next release (normal restart). At its start, the Service removes the clones clone, model-clone and triage-clone and the snapshot listing-status from its volume, so the first rounds clone each lane again and read the whole listing once for each lane. The live budget is 4000 GitHub requests an hour (largest use in 3 days: 3283).

Fixes in review:

  1. With service.lanes such as {model: [intake, refine]}, the wake after a scoped intake skipped the lane of intake, so an edit did not make refine due. lanes_to_wake now includes that lane when it holds another row (new tests in test_server_service.py and test_roadmap_run_lane_table.py).
  2. The spec of devops_cli_roadmap_row_seconds said 12 rows and 36 series; the table and the instrument have 13 rows and 39 series.
  3. Rebase on feat(roadmap): run each stage item in its own Job #5559: conflicts in run.py (docstring, model_clone, status_clone), test_roadmap_run_service.py, docs/CLUSTER.md, docs/roadmap/intake.md and docs/roadmap/stage.md. The stage row keeps the code of feat(roadmap): run each stage item in its own Job #5559 and runs in its own lane stage with the clone lanes/stage.
  4. The tests of a blocked round and of the working trees now also run on refine and alternatives, because after feat(roadmap): run each stage item in its own Job #5559 the stage cases pass on the base.
  5. A type: ignore in the new lane table test put the tests above the ceiling of 79 (test_suppressions_stay_under_their_ceilings). The helper is now typed.

Open: live proof after the release (Loki: refine and alternatives rounds of devops-cli at their interval while another round runs; the #5470 queue lines; the largest working set of the first day against 3Gi; the volume use, about 1.45 GB expected on a 1Gi local-path claim). Follow-ups: #5560 (names of the earlier lanes), #4718 (the by-lane panels now draw 13 lanes), #5555 (event routing by subject).

The lane settle of the Service tests waited for each worker once. A scoped
update enqueues its wake on other workers while its own worker is active,
so a worker that the pass found idle could get the trigger after it, and
test_a_wake_reaches_the_rows_that_share_the_lane_of_the_scoped_update
failed in CI. The settle now makes a second pass.
@dan-petty
dan-petty force-pushed the feat/5553-each-roadmap-job-in-its-own-lane branch from 003bf5f to 9affda2 Compare November 13, 2026 22:43
@dan-petty

Copy link
Copy Markdown
Owner Author

Fix after the first CI run (head 9affda2): shard 1 of Tests & Coverage failed in test_a_wake_reaches_the_rows_that_share_the_lane_of_the_scoped_update[opened] with At index 2 diff: {'metrics': [], 'model': [('webhook', 'issues', 'opened')]}. The cause was in the test helper _lanes_settled: it waited for each worker once, and the worker metrics was idle before the scoped update on the worker model enqueued its wake. The helper now makes a second pass. The 14 scoped, wake and subject tests passed 5 runs in a row, and tests/server/test_server_service.py passed (85 tests). The product code did not change.

@dan-petty
dan-petty marked this pull request as ready for review November 13, 2026 22:50
@dan-petty

Copy link
Copy Markdown
Owner Author

Check results

Head commit: 9affda25a979c4608683321cf9c0a2864ea66546

Check Conclusion Link
Tests & Coverage success run
devops-cli success run
zizmor success run
trivy-config success run
CodeQL success run
Tests on Main skipped run
Plan Check skipped run
Dependency Freshness skipped run
Analyze (python) success run
Fail-to-Pass Check skipped run
Analyze (actions) success run
Test Job Duration skipped run
Tests & Coverage (shard 3 of 4) success run
Service Image success run
Changed-Test Independence success run
Design Tokens success run
Tests & Coverage (shard 2 of 4) success run
MCP Server Image success run
Tests & Coverage (shard 1 of 4) success run
Static Analysis success run
Tests & Coverage (shard 4 of 4) success run
Docs Site Build success run
Runner Image success run
Semantic PR title success run

Skipped check: Tests on Main
Skipped check: Plan Check
Skipped check: Dependency Freshness
Skipped check: Fail-to-Pass Check
Skipped check: Test Job Duration

@dan-petty
dan-petty merged commit 268938a into main Nov 13, 2026
24 checks passed
@dan-petty
dan-petty deleted the feat/5553-each-roadmap-job-in-its-own-lane branch November 13, 2026 22:56
dan-petty pushed a commit that referenced this pull request Nov 13, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.134.0](v0.133.0...v0.134.0)
(2026-11-13)


### Features

* **service:** each roadmap job runs in its own lane
([#5563](#5563))
([268938a](268938a))

---
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/service The long-running devops Service and its lanes type/feature Type feature: a new function

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(service): each roadmap job runs in its own lane

1 participant