Skip to content

feat(roadmap): rows with a large backlog run on a shorter loop - #5523

Merged
dan-petty merged 3 commits into
mainfrom
feat/5470-backlog-row-intervals
Nov 13, 2026
Merged

dan-petty merged 3 commits into
mainfrom
feat/5470-backlog-row-intervals

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

The Service rows intake, stage, fix_plan, refine and alternatives now read their interval from roadmap.<row>.interval_minutes at the start of each round, with the old constant as the default. So a person can change a loop with no release and no restart. Each row also gets a backlog rule (backlog_interval_minutes, backlog_threshold, off by default): while the queue that the last round of the row counted holds the threshold or more items, the row is due at the shorter interval. Each runner counts its queue from the listing that its round reads, so the count sends no request. The round keeps the queue in queues.json, logs it with the interval in use and sends two gauges. The GitHub self-cap of the Service stays. The model lane stays serial: until #4559 moves stage to Jobs, a shorter refine loop gives more refine rounds only when the stage rounds are short.

Closes #5470

Change: openspec/changes/archive/2026-11-13-5470-backlog-row-intervals/

The rows intake, stage, fix_plan, refine and alternatives read their
interval from roadmap.<row>.interval_minutes at each round. The defaults
are the old fixed intervals: 29, 37, 53, 17 and 719 minutes. The new
section roadmap.refine holds the settings of the refine row.

Each of these rows has a backlog rule. While the queue that the last
round of the row counted holds roadmap.<row>.backlog_threshold or more
items, the row is due every roadmap.<row>.backlog_interval_minutes. Both
settings are empty by default, so the rule is off until a person sets
them. The settings refuse a backlog interval above the interval.

Each runner counts its queue from the listing that its round reads, so
the count sends no request. The round keeps the last queue of each row
in queues.json beside schedule.json. A record that cannot be read stops
the round and names the file. After each successful round, the Service
logs the queue and the interval in use, and sends the gauges
devops_cli_roadmap_row_queue_items and
devops_cli_roadmap_row_interval_seconds by repo and row.

The GitHub request budget of the Service stays: a shorter loop sends its
requests through the same gate.
…minutes

The intake page and the wait comment of a refused stage plan gave the
old fixed intervals. They now name roadmap.<row>.interval_minutes.
docs/CLUSTER.md and the plan say that the backlog values go in
k8s/devops/configmap.example.yaml and reach the cluster through
devops k8s deploy-stack, because a hand edit of the live ConfigMap goes
away at the next deploy-stack. A new test makes sure that the five rows
with a cadence read the section of their own name, so a change that
builds a row again keeps its cadence.
The change moves to the archive, and its delta becomes the capability roadmap-row-cadence.
@dan-petty dan-petty added type/feature Type feature: a new function scope/roadmap The roadmap jobs: intake, refine, stage, implement and the Service that runs them labels Nov 13, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Review, tests and render diff

Merge order with #4559. #4559 (stage Jobs, built in parallel) also changes the stage row in src/devops_cli/roadmap/run.py. This PR changes the stage adapter in one place only: it returns JobOutcome(missing=plan.missing, queue=plan.queue). Its other run.py changes are in the due logic (JobRow.cadence, _Cadences, _Poll.intervals, _execute_due_rows). The second PR to merge must rebase. Its new stage row must keep cadence=attrgetter("stage") and must put the queue of the selection in the outcome (StageSelection.queue, StagePlan.queue in stage/stage.py). The test test_each_row_with_a_cadence_reads_the_section_of_its_name fails if a rebuilt row loses its cadence.

Serial model lane. The lane runs retitle, stage, fix_plan, refine and alternatives one after the other, and each due row runs once in each round. A shorter interval makes a row due in more rounds. It cannot run refine while a long stage round runs, so refine gets more rounds in each hour only when the stage rounds are short. This stays true until #4559 moves stage to Jobs (design.md, decision 7).

Queue of each row (no new GitHub request): stage = open items that roadmap.stage.filter names, before the per-item rules and the limit; refine = items that its selection orders; intake = candidates of the round (decided, left and held); fix_plan = open pull requests with plan/needs-fix in the kept issue listing (none in mode off); alternatives = Coverage.unchecked (none while the check is off). These match the counts of the issue (Ready 177, New 583).

Fixes in review (commit docs(roadmap): name the interval settings...):

  • docs/roadmap/intake.md and the wait comment in roadmap/failure.py gave the old fixed intervals (29 and 37 minutes). They now name roadmap.<row>.interval_minutes.
  • The plan said that the live ConfigMap is not in git. Its template is k8s/devops/configmap.example.yaml, and the ConfigMap follows only devops k8s deploy-stack, so a hand edit goes away at the next deploy-stack. docs/CLUSTER.md item 24, the proposal and the tasks now say this.
  • New guard test: the five rows with a cadence read the section of their own name, and no other row has a cadence. A mutation (refine row pointed at the stage section) makes it fail.

Checks run locally

  • Builder: tests first (seen to fail for the right reason); 76 new and adjacent tests passed; after the rebase on 2bdc9a2, 620 passed (config, security declarations, new tests, stage job, due table, steps, MCP tool snapshot, docs) and 4459 passed, 1 skipped (stage, refine, intake, stores, run lanes and ledger, alternatives, server, telemetry). devops ci typecheck: no issues in 845 files. devops docs check: up to date. devops openspec check and archive validation: passed.
  • Reviewer: tests/roadmap/test_roadmap_run_row_cadence.py, test_roadmap_suspended_row_comment.py, test_roadmap_limit_classes.py, tests/docs: 195 passed. devops ci --check --only lint,format,domain,docs: all pass. devops openspec check: passed. Pre-push hooks passed.

Render diff. No path under k8s/ changes, so kubectl kustomize gives the same output at origin/main and at this branch. No pod restarts. The settings are new keys with extra="ignore" sections, so an image from before this release ignores them.

Steps for a person after the release (live proof of #5470): add the backlog values under roadmap.<row> in k8s/devops/configmap.example.yaml (the issue proposes stage 13 min at 50, refine 7 min at 100, fix_plan 23 min at 3, alternatives 181 min at 50) and run devops k8s deploy-stack --stack devops from a checkout of main. Then check the log line The row <row> of <repo> has <n> items in its queue... and the gauges devops_cli_roadmap_row_queue_items and devops_cli_roadmap_row_interval_seconds, and that the rounds per hour of stage and refine rise with no GitHub budget hold.

@dan-petty
dan-petty marked this pull request as ready for review November 13, 2026 18:20
@dan-petty
dan-petty merged commit 59d140d into main Nov 13, 2026
24 checks passed
@dan-petty
dan-petty deleted the feat/5470-backlog-row-intervals branch November 13, 2026 18:20
dan-petty pushed a commit that referenced this pull request Nov 13, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.131.0](v0.130.0...v0.131.0)
(2026-11-13)


### Features

* **roadmap:** rows with a large backlog run on a shorter loop
([#5523](#5523))
([59d140d](59d140d))

---
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/feature Type feature: a new function

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(roadmap): rows with a large backlog run on a shorter loop

1 participant