From e916f062381f3fb12a39846b4be88974552c9ed8 Mon Sep 17 00:00:00 2001 From: Daniel Petty Date: Fri, 13 Nov 2026 19:39:18 +0000 Subject: [PATCH 1/3] feat(roadmap): run each stage item in its own Job The row stage moves from the model lane to the status lane and becomes a submit (stage_submit.py). It plans no item and calls no model: a stage Job from CronJob roadmap-stage (#5483) plans each item in a pod of its own, so a rollout of the Service stops no plan. A round lists the stage Jobs of the repository by their labels: the Job list is the lock. It checks in for each Job of a check-out that ended with no check-in (evicted, deadline, failed or succeeded), runs the cleanup of the orphans, the closed items and the rejections, and then creates one Job for each Ready item that the selection takes, up to the new setting roadmap.stage.jobs (default 1). The check-out and the claim owner/service come before the create, the name comes from the item and the hash of its body, and a 409 means that the Job exists. An eviction is free 3 times on one body. A deadline end, a failed end and a later eviction count toward roadmap.stage.plan_defect_limit, and the end that reaches it returns the item to New with a comment that asks refine to split it. The in-pod body of the stage row, its place on the model lane, the round failure rule and the use of the model clone by stage are removed. The rules that read the series of the planner select job=~"roadmap-service|roadmap-stage", and the job grades read the result lines of the stage Job pods. Closes #4559 --- docs/CLUSTER.md | 11 +- docs/CONFIGURATION.md | 2 +- docs/ENV_VARS.md | 1 + docs/ERRORS.md | 1 + docs/ROADMAP_WORKFLOW.md | 5 +- docs/TELEMETRY.md | 2 + docs/roadmap/intake.md | 2 +- docs/roadmap/job-success.md | 7 +- docs/roadmap/stage.md | 6 +- k8s/devops/configmap.example.yaml | 3 + k8s/devops/dashboards/devops-cli.json | 79 ++- .../monitoring/prometheus-rules-values.yaml | 46 +- .../.openspec.yaml | 2 + .../design.md | 19 + .../proposal.md | 48 ++ .../specs/roadmap-stage/fix-plan/spec.md | 12 + .../specs/roadmap-stage/job/spec.md | 117 ++++ .../specs/roadmap-stage/round/spec.md | 9 + .../tasks.md | 32 + src/devops_cli/commands/roadmap.py | 4 +- src/devops_cli/config/constants.py | 10 + src/devops_cli/config/defaults.py | 3 + src/devops_cli/config/settings.py | 6 + src/devops_cli/docs/generator.py | 2 + src/devops_cli/exceptions/k8s.py | 6 + src/devops_cli/k8s/cluster_job.py | 10 + src/devops_cli/k8s/cluster_job_api.py | 30 +- src/devops_cli/lang/en/messages.py | 14 + src/devops_cli/roadmap/job_grade_report.py | 9 +- src/devops_cli/roadmap/run.py | 136 ++-- src/devops_cli/roadmap/stage/stage.py | 227 ++++--- src/devops_cli/roadmap/stage/stage_job.py | 145 ++++- .../roadmap/stage/stage_left_out.py | 1 + src/devops_cli/roadmap/stage/stage_pending.py | 11 +- src/devops_cli/roadmap/stage/stage_submit.py | 380 ++++++++++++ src/devops_cli/roadmap/stores/store.py | 5 +- src/devops_cli/server/counter_series.py | 21 + .../roadmap_service_activity_tests.yaml | 18 + .../roadmap_service_tests.yaml | 38 ++ .../roadmap_service_tools_tests.yaml | 23 + tests/grafana/test_grafana_dashboards.py | 3 + tests/k8s/test_k8s_cluster_job_api.py | 43 ++ .../test_k8s_monitoring_alerting.py | 50 +- .../test_roadmap_implement_submit.py | 3 +- .../stage/test_roadmap_stage_failure_class.py | 4 +- .../stage/test_roadmap_stage_item_writes.py | 8 +- tests/roadmap/stage/test_roadmap_stage_job.py | 352 ++++------- .../stage/test_roadmap_stage_job_entry.py | 2 + .../stage/test_roadmap_stage_job_result.py | 9 +- .../roadmap/stage/test_roadmap_stage_kill.py | 179 ++++++ .../test_roadmap_stage_plan_defect_limit.py | 8 +- .../roadmap/stage/test_roadmap_stage_ready.py | 1 + .../roadmap/stage/test_roadmap_stage_retry.py | 48 -- .../stage/test_roadmap_stage_round_log.py | 22 +- .../stage/test_roadmap_stage_submit.py | 581 ++++++++++++++++++ .../stage/test_roadmap_stage_write_stops.py | 14 +- .../steps/test_roadmap_fix_plan_row.py | 5 +- tests/roadmap/test_job_grade_report.py | 13 + tests/roadmap/test_roadmap_limit_classes.py | 12 + tests/roadmap/test_roadmap_retitle.py | 5 +- tests/roadmap/test_roadmap_run_due_table.py | 12 +- .../test_roadmap_run_failure_ledger.py | 1 + tests/roadmap/test_roadmap_run_job_rows.py | 7 +- tests/roadmap/test_roadmap_run_lanes.py | 7 +- tests/roadmap/test_roadmap_run_row_cadence.py | 4 +- tests/roadmap/test_roadmap_run_service.py | 3 +- tests/roadmap/test_roadmap_status_rows.py | 8 +- tests/security/test_config_declarations.py | 1 + tests/support/roadmap_run.py | 1 + tests/support/roadmap_stage.py | 55 +- tests/telemetry/test_telemetry_instruments.py | 2 + 71 files changed, 2373 insertions(+), 593 deletions(-) create mode 100644 openspec/changes/4559-run-each-stage-item-in-its-own-job/.openspec.yaml create mode 100644 openspec/changes/4559-run-each-stage-item-in-its-own-job/design.md create mode 100644 openspec/changes/4559-run-each-stage-item-in-its-own-job/proposal.md create mode 100644 openspec/changes/4559-run-each-stage-item-in-its-own-job/specs/roadmap-stage/fix-plan/spec.md create mode 100644 openspec/changes/4559-run-each-stage-item-in-its-own-job/specs/roadmap-stage/job/spec.md create mode 100644 openspec/changes/4559-run-each-stage-item-in-its-own-job/specs/roadmap-stage/round/spec.md create mode 100644 openspec/changes/4559-run-each-stage-item-in-its-own-job/tasks.md create mode 100644 src/devops_cli/roadmap/stage/stage_submit.py create mode 100644 tests/roadmap/stage/test_roadmap_stage_kill.py create mode 100644 tests/roadmap/stage/test_roadmap_stage_submit.py diff --git a/docs/CLUSTER.md b/docs/CLUSTER.md index 20950be16b..4b1bce51ac 100644 --- a/docs/CLUSTER.md +++ b/docs/CLUSTER.md @@ -43,16 +43,16 @@ The spans and the log records of devops-cli name the cluster in `k8s.cluster.nam 12. The Service's `/metrics` shows the budget and the suspended jobs (#2475): `devops_cli_service_budget_limit_requests` (the hourly budget), `devops_cli_service_budget_spent_requests` (the GitHub requests of the last hour, not counting the answers with status 304, which GitHub does not count against its rate limit), `devops_cli_service_budget_holds_total` (one count each time a hold begins), `devops_cli_service_job_suspended` (1 while a job of a repository, by `repo`, `row` and `class`, waits for its retry time or for new input after it failed `service.max_failed_rounds` rounds in a row; `class` is the failure class of its last failed round, or `unknown` for an entry that an earlier version wrote; when the class changes, the series of the old class is set to 0), `devops_cli_service_job_retry_after_seconds` (the seconds before the next probe round of the job, by `repo`, `row` and `class`, as of its last failed round or check; 0 when the job has no retry time; #4065), `devops_cli_service_state_unkept` (1 while the last write of a state record failed, by `record`: `budget`, `halt` or `ledger`; 0 after the next write that works; #4048), `devops_cli_service_webhook_delivery_failures` (the deliveries of the hooks of a repository that got no 2xx answer in the last 15 minutes, by `repo` and `code`, as GitHub records them; the metrics row sets it; #5017), `devops_cli_service_implement_jobs_total` (one count for each reported runner Job, by `repo`, `item_class` and `result`: `failed` for a Job that left a stop, else the state of the Job, `succeeded`, `failed` or `gone`, because a runner that writes its stop exits 0; a round also reports the Job of a closed item while the cluster holds that Job; #3069, #4703), `devops_cli_service_implement_repair_rounds_total` (one count for each repair round of a reported runner Job, by `repo` and `item_class`; #3069), `devops_cli_service_implement_tokens_total` (tokens spent by a reported runner Job, by `repo` and `item_class`; #3069), `devops_cli_service_implement_consecutive_failures` (gauge of stops in a row of the same failure `class` for `repo`, kept in `service-consecutive-failures.json`; #3069) and `devops_cli_service_implement_failures_total` (one count for each runner Job that left a stop, by the failure `class` and `repo`, when a round reports the Job; #3065; the values of `class` are the classes in [docs/ROADMAP_WORKFLOW.md](ROADMAP_WORKFLOW.md), The failure classes, and a panel or rule matches no other value, #3476). Each counter of the Service starts its label sets at zero (#3495, [docs/TELEMETRY.md](TELEMETRY.md)), except `devops_cli_service_identity_refused_total`, whose label set starts with the first refusal. Each GitHub request counts in `devops_cli_github_requests_total` under its `method`, its `status` (the HTTP status of the answer, or `none` for a gh command or an attempt with no answer), the `repo` of the worker that sent it and the job `row` (`metrics`, `intake`, `refine`, `retitle`, `stage`, `implement`, `stage_ready` or `alternatives`); a request outside a worker or a row counts as `other`. To find what spent the budget, run `sum by (repo, row, method) (increase(devops_cli_github_requests_total{job="roadmap-service"}[1h]))` in Grafana Explore. A delivery of the App bot's own write counts as outcome `self` in `devops_cli_service_webhook_deliveries_total`. 13. A refine round writes at most 2 comments on one item in 24 hours. A round that finds 2 refine comments of the last 24 hours on an item leaves the item alone, with no model call and no comment. The item waits on a person and takes no place under the round's limit, so the round refines the next item. For each newest comment on the item that the cap leaves with no answer, the round records the time of that comment in the item's job record (`refine.capped_after`), logs `Refine left # alone and wrote no comment`, and adds 1 to `devops_cli_roadmap_refine_comments_capped_total`. A later round that finds no newer comment does not log or count the item again. A person refines the item at the cap with `devops roadmap refine --item --confirm`. A web search asks the providers of `search.providers` in order (`searxng`, `duckduckgo`, `firecrawl` by default, #3925). A provider that is not configured is skipped: `searxng` without `search.searxng_url`, and `firecrawl` without its key. A provider that fails (a timeout, HTTP 401, 402, 403, 429 or 5xx, or a reply that is not readable) or returns no hit passes the search on at once, with no retry and no wait. The first provider with a hit answers. Each request goes through the HTTP entry point. DuckDuckGo and Firecrawl use the public level (the public HTTPS rule of policy `devops-default-perimeter`, no new rule). SearXNG sends `GET /search` with `format=json` at the configured level: loopback, or private with `ai.allow_private_network`. The client follows no redirect and reads at most 1 MiB, and a reply with no result while an engine did not answer counts as `degraded`. An address that the egress check refuses counts as `refused` and passes the search on. Each attempt counts in `devops_cli_web_searches_total` by `backend` (a provider name, or `none`) and `result`: `ok`, `empty`, the HTTP status of a refused search, `degraded` for a reply that cannot be read, `error` for no answer, `refused` for a query that the guard stopped or an address that the egress check refused, or `exhausted` for a search that no provider answered. A failed attempt logs `A web search failed on ` with the status or the error class, and never the key or the query. The guard refuses an empty query, a query over 400 characters or 50 words, a query that starts with `!` or `:`, and a query that holds a secret, an e-mail address, a private address or an internal host name; it sends no request. DuckDuckGo needs no key, so a round on a public repository has web search with the default providers. Firecrawl stays the last provider for one release cycle. When `crawl4ai.url` is set, the run also has the tool `fetch_page`, which reads the text of one page through the Crawl4AI service. It takes an https URL that a search of the same run returned or that the item text names, and no other URL; it sends no request for any other URL. A run fetches at most 3 pages. The tool frames the text as data from an outside page, never an instruction, and names the source URL and the fetch date so that a comment can cite them. A failed fetch is a tool answer and uses one fetch. Each call counts in `devops_cli_roadmap_page_fetches_total` by `toolset` (`refine` or `alternatives`) and `result` (`ok`, `refused`, `limit` or `error`). The tool is off with no `crawl4ai.url`. The tool needs the Crawl4AI service and its token. It reads pages from the web, which is new egress, so a person sets `crawl4ai.url` in the live ConfigMap to enable it. 14. The row `alternatives` of the model lane runs after `refine`: on a first run, and `roadmap.alternatives.interval_minutes` (719 by default) after its last success. It runs `devops roadmap alternatives --confirm` for the repository. A round checks at most `roadmap.alternatives.first_pass_limit` items (20 by default) while an item has no check, and at most `roadmap.alternatives.limit` items (5 by default) after. The row runs about twice a day, so a first pass of 141 items takes about 4 days. A round takes first the items with no check, then the items whose check is older than `roadmap.alternatives.recheck_days` (30 by default) or whose text changed. A webhook makes the row due at no other time. The row changes no label and closes no issue. It does nothing, and logs `The alternatives check of is off`, for a private repository and when no search provider is configured. If the check of an item fails, the row records the failure in the item's job record (`alternatives.failed_at` and `alternatives.failed_error`, the class of the error), writes the other checks and succeeds. The row fails, and counts toward the suspension after 3 failed rounds, only when it tried items and checked none. A round takes a failed item again after `roadmap.alternatives.retry_days` (3 by default). Each written check adds 1 to `devops_cli_roadmap_alternatives_total` by `verdict`: `covers`, `partly`, `none`, `not-applicable`, `rejected` or `in-use`. Each round also sends two gauges by `repo` at its start, before it checks any item, also when it checks none (#2950): `devops_cli_roadmap_alternatives_unchecked_items` (the items that the check can take and has no check for, an item in the retry delay too) and `devops_cli_roadmap_alternatives_oldest_check_age_seconds` (the age of the oldest check among those items, sent only while one has a check). Each written check observes `devops_cli_roadmap_alternatives_searches` by `verdict`: the searches the check ran, 0 for a skip class. The row Alternatives Check of the dashboard `devops-cli Telemetry` shows the three, and the alert `RoadmapServiceAlternativesNotSearching` warns when the Service made no web search in 3 days while an item has no check. An item of the type `test`, `docs`, `refactor`, `chore`, `ci` or `perf`, and a `fix` with a Python traceback in its body, gets `not-applicable` with no model call; every other item must run a search before the check accepts a verdict, and gets one more turn to search. Once for each round, the check reads the ADRs of `docs/adr/` that are in force. An ADR that a later ADR supersedes is left out. The model sees the number, the title, the status lines and the `Considered Options` section of each ADR. A check records the hash of these ADRs (`alternatives.adr_hash`), and an item whose hash differs from the ADRs at HEAD is checked again. The model proposes `rejected` with the number of an ADR, and `in-use` when the item names the tool. The job gives either verdict only when the text confirms it: `rejected` needs an ADR whose rejected options alone name the tool. Once for a round that checks an item of no skip class, the check also reads the SBOM of the dependency graph and the deployed paths of the lane's clone (`roadmap.alternatives.inventory_paths`), and gives `in-use` with no proposal for a tool that the repository already uses. It asks deps.dev (`api.deps.dev`) for the packages of the tool's GitHub project only when the SBOM holds a package and neither source holds the tool; a failed read skips the item. It drops a proposal that it cannot confirm and keeps the verdict of the reply. A cut by the token cap leaves out whole ADRs and logs a warning. A `covers` verdict makes refine ask a person to adopt the tool or to keep the item with a reason. A `rejected` or `in-use` verdict asks nothing. The item waits on a person until a reply answers the question, and Ready items with a new covering tool go back to New. Refine records the tool it asked about in the job record (`refine.alternatives_asked`). `devops roadmap run --dry-run` lists the row when it is due. -15. The row `retitle` is the first row of the model lane (#3535). It is due on a first run and every 61 minutes. It shortens the long title summary, or corrects the title type that the branch types do not list (#4508), of at most 25 open items, as `devops roadmap retitle --confirm` does, with the model of the `triage` task. It needs no clone, and it reads and writes only the issues of the repository. The row `stage` follows `retitle` and comes before `refine` on the model lane (#2659, #4796), so the stage job reads the new titles in the same round, and the first round of a new pod stages before refine takes its items. A round of 7 refine items takes 35 to 65 minutes, so with refine first a restart often left stage no turn. It runs `devops roadmap stage --confirm` in the model clone: it is due every `roadmap.stage.interval_minutes` (37 by default), on a first run, and after a round in which `refine` set an item Ready. That round writes a `stage_due` timestamp to `schedule.json`, and the next round runs the row. It stages the Ready items that `roadmap.stage.filter` names, at most `roadmap.stage.limit` in a round, plans only items with the priority `P0-Critical` or `P1-High` while the count of open Planned items is at `roadmap.stage.planned_limit` (#3487, #3692), and splits a task group over `roadmap.stage.step_tokens`. Each task group has a kind (#3005): a `behavior` group has a failing test and changes a path under `src/`, a `manifest` group has a failing case of a rule, a dashboard or a case file (#3981), and an `other` group has no test but a command or the steps of a manual check that prove it. The job writes the kind on the `Kind:` line of each group, and the plan reader reads it back (#5205). The job sends a reply that breaks this rule back to the model, `roadmap.stage.gate_returns` times at most (default 3, #4802), as each reply that the checks refuse. Each return is one more plan run, so the settings load refuses a value above 4 times the default (#4900, #5440). A reply that the checks refuse at the last return gets one more return when no finding of the reply before stays and no finding has the fix class `never`, at most `roadmap.stage.gate_return_extensions` times for each item (default 1, #4851). The model review of a plan sends the plan back to the planner `roadmap.stage.verify_repair_rounds` times at most (default 2, variable `DEVOPS_CLI_ROADMAP_STAGE_VERIFY_REPAIR_ROUNDS`), and once more for each review that marks more earlier findings `gone` than it opens new findings (#5409). No item gets more repair rounds than `roadmap.stage.verify_repair_rounds_ceiling` (default 4), so the settings load refuses a value of `verify_repair_rounds` above it, and no round starts after the Service stops (#5066, #5440). It leaves out an item whose change folder is on the default branch or in its archive (#2714): a round reads that tree once with `git ls-tree`, so a merged staging pull request never makes a second one. The pull request it opens is a draft with the title `docs(openspec): plan # `. The job does not mark it ready: the row `stage_ready` does (step 18). Before it opens one, it checks each path of the plan (`reads`, `changes`, the code spans of the tasks and `verify`) against the tracked files of the commit it plans, read with one `git ls-files` for the round (#3010). A path that is no file there, and that no group up to its own creates, goes back to the model with the files of the same name. When a later group creates the path, the problem names that group and tells the model to move it before the group that names the path (#3017). A second reply with a missing path stops the item, so no draft opens and the implement Job never meets a wrong path. `k8s/devops/configmap.example.yaml` holds the five settings, and `devops k8s deploy-stack --stack devops` applies them; each also has a variable, `DEVOPS_CLI_ROADMAP_STAGE_FILTER`, `DEVOPS_CLI_ROADMAP_STAGE_LIMIT`, `DEVOPS_CLI_ROADMAP_STAGE_PLANNED_LIMIT`, `DEVOPS_CLI_ROADMAP_STAGE_STEP_TOKENS` and `DEVOPS_CLI_ROADMAP_STAGE_TOOLSET`. The setting `roadmap.stage.toolset` is `extended` by default (#3238): a plan run then has three tools more than the nine that read the staged commit. `references` counts a text in every file of the commit. `read_issue` and `find_issues` read issues and pull requests of the repository on GitHub, as GET requests with the token of the Service and no other permission. `base` leaves them out. Each item of a round counts once in `devops_cli_roadmap_stage_total` by `repo` and its `result`: `staged`, `skipped`, `needs_split`, `failed` or `degenerate`. The label `reason` names the rule that left a `skipped` item out, such as `title_type`, `held`, `failed_lately`, `queue_full`, `returned` or `rejected`, and is `none` for the other results (#4521). The Service logs the reason of a left-out item with the line `stage left out: repo= item=# reason= detail=` once, and again only when the kind changes, so a person sees why a repository is idle with no clone. An item is `degenerate` when its plan reply holds a placeholder such as `x` in every text (#4204): the job sends no second request. A reply that the checks refused at least once logs `stage gate returns: repo= item=# returns= result= gates=:,... codes=:,... version=` when it passes or stays refused, with the gates and the codes of the findings of the last refused reply (#4846). After it, each of the first 20 findings of that reply logs `stage gate refused finding: repo= item=# returns= result= finding=/ gate= code= subject= version=` (#5433). The subject is the path, the tool or the command that the message of the finding names, as a JSON string: `redact_text` (the mask of `mask_secrets`) masks it, and then the line keeps its first 200 characters. A finding whose message names none of them has `subject=none`. The line holds no other text of the plan or of the finding, so a person can tell a fault of the plan from a fault of the gate, such as a read that the trace gate did not see. The code of a finding is the key of its message in `MESSAGES.roadmap`, such as `stage_problem_missing_test_file`. Each reply after a return logs `stage gate findings: repo= item=# return= in= gone= stuck= new= version=`: the findings of the reply before it, those that the reply no longer has, those that it has again (the same gate and the same text, with the digits masked), and its other findings. A reply that the checks refuse at the last return logs `stage gate extension: repo= item=# returns= in= gone= stuck= new= never= result= version=`, and its extra return logs `stage gate extension end: repo= item=# returns= result= version=` (#4851). Each reply that the checks judge observes the count of its findings in `devops_cli_roadmap_stage_gate_problems` by `repo` and `reply` (0 for the first reply, 1 more for each return). Each model review logs `stage review round: repo= item=# round= findings= returned= open= version=` (round 0 is the first review), a repair round past `roadmap.stage.verify_repair_rounds` first logs `stage review extended: repo= item=# round= fixed= added= version=` with the earlier findings that the last review marked `gone` and the new open findings that it opened (#5066, #5409), and each item that a round failed logs `stage item failed: repo= item=# step= class= version=` (#4535). The release workflow builds the Service image only for a release, so the version names one image digest. The error line of a failed round keeps the first 256 characters of each error and then names every failed item. A refused reply is logged with the line `stage reply refused: item=# request= input_tokens= tools_offered= result=`, and an item that fails in the plan keeps its refused replies, their problems and the gate, the code, the path and the text of each finding in `roadmap/stage///.refused.json` beside its plan file, until the item is staged. `src/devops_cli/roadmap/stage/stage_finding_classes.json` holds the seed fix class and fix rate of each code, from 42 refused plans of 2026-11-10 and 2026-11-11. Each call of a step sends its seconds to `devops_cli_roadmap_step_seconds` by `repo`, `row`, `step` and `result` (#4066): the steps `select`, `plan`, `gate`, `review` and `apply`, and the results `ok` and `error`. A gate that refuses a reply adds 1 to `devops_cli_roadmap_stage_gate_refusals_total` under the name of the gate. A failed item is recorded in its job record with the class of its error and the time (#3493), and the job leaves it out while it takes the other items: 1 hour for a `provider`, `plan_defect` or `ci_infra` class, 6 hours for a `parser` class, and no time for `head_moved` (`RETRY_AFTER` in `roadmap/failure.py`, #4060). A record with no class, or an unknown class, waits as `ci_infra`. The row fails a round only when it tried items and staged, stopped or returned none, or when a failure belongs to no item; three such rounds on the same input suspend the row. The ledger file keeps the class of each error, and a round that the stop of the Service ends counts as `stopped`, not as an error. The image carries the pinned OpenSpec and a Node runtime, so the job validates each change before it pushes: `kubectl -n devops exec deploy/roadmap-service -- openspec --version` prints the locked version. +15. The row `retitle` is the first row of the model lane (#3535). It is due on a first run and every 61 minutes. It shortens the long title summary, or corrects the title type that the branch types do not list (#4508), of at most 25 open items, as `devops roadmap retitle --confirm` does, with the model of the `triage` task. It needs no clone, and it reads and writes only the issues of the repository. The row `stage` follows `stage_ready` on the status lane (#4559): it plans no item and calls no model, so a rollout of the Service stops no plan. In the status clone it submits one stage Job for each Ready item that the selection takes ([Stage Jobs](#stage-jobs)), up to `roadmap.stage.jobs` Jobs of the repository at once (default 1), and the stage Job runs `devops roadmap stage --job-item --confirm` in a pod of its own. Before any create the row removes the staged branches of closed items and the orphans, and writes the rejections of the items that it does not submit. It is due every `roadmap.stage.interval_minutes` (37 by default), on a first run, and after a round in which `refine` set an item Ready. That round writes a `stage_due` timestamp to `schedule.json`, and the next round of the status lane runs the row. Each round also recovers the check-out of a stage Job that ended with no check-in. The rest of this item tells what the stage job of an item does. It stages the Ready items that `roadmap.stage.filter` names, at most `roadmap.stage.limit` in a round of `devops roadmap stage --confirm`, plans only items with the priority `P0-Critical` or `P1-High` while the count of open Planned items is at `roadmap.stage.planned_limit` (#3487, #3692), and splits a task group over `roadmap.stage.step_tokens`. Each task group has a kind (#3005): a `behavior` group has a failing test and changes a path under `src/`, a `manifest` group has a failing case of a rule, a dashboard or a case file (#3981), and an `other` group has no test but a command or the steps of a manual check that prove it. The job writes the kind on the `Kind:` line of each group, and the plan reader reads it back (#5205). The job sends a reply that breaks this rule back to the model, `roadmap.stage.gate_returns` times at most (default 3, #4802), as each reply that the checks refuse. Each return is one more plan run, so the settings load refuses a value above 4 times the default (#4900, #5440). A reply that the checks refuse at the last return gets one more return when no finding of the reply before stays and no finding has the fix class `never`, at most `roadmap.stage.gate_return_extensions` times for each item (default 1, #4851). The model review of a plan sends the plan back to the planner `roadmap.stage.verify_repair_rounds` times at most (default 2, variable `DEVOPS_CLI_ROADMAP_STAGE_VERIFY_REPAIR_ROUNDS`), and once more for each review that marks more earlier findings `gone` than it opens new findings (#5409). No item gets more repair rounds than `roadmap.stage.verify_repair_rounds_ceiling` (default 4), so the settings load refuses a value of `verify_repair_rounds` above it, and no round starts after the Service stops (#5066, #5440). It leaves out an item whose change folder is on the default branch or in its archive (#2714): a round reads that tree once with `git ls-tree`, so a merged staging pull request never makes a second one. The pull request it opens is a draft with the title `docs(openspec): plan # `. The job does not mark it ready: the row `stage_ready` does (step 18). Before it opens one, it checks each path of the plan (`reads`, `changes`, the code spans of the tasks and `verify`) against the tracked files of the commit it plans, read with one `git ls-files` for the round (#3010). A path that is no file there, and that no group up to its own creates, goes back to the model with the files of the same name. When a later group creates the path, the problem names that group and tells the model to move it before the group that names the path (#3017). A second reply with a missing path stops the item, so no draft opens and the implement Job never meets a wrong path. `k8s/devops/configmap.example.yaml` holds the five settings, and `devops k8s deploy-stack --stack devops` applies them; each also has a variable, `DEVOPS_CLI_ROADMAP_STAGE_FILTER`, `DEVOPS_CLI_ROADMAP_STAGE_LIMIT`, `DEVOPS_CLI_ROADMAP_STAGE_PLANNED_LIMIT`, `DEVOPS_CLI_ROADMAP_STAGE_STEP_TOKENS` and `DEVOPS_CLI_ROADMAP_STAGE_TOOLSET`. The setting `roadmap.stage.toolset` is `extended` by default (#3238): a plan run then has three tools more than the nine that read the staged commit. `references` counts a text in every file of the commit. `read_issue` and `find_issues` read issues and pull requests of the repository on GitHub, as GET requests with the token of the Service and no other permission. `base` leaves them out. Each item of a round counts once in `devops_cli_roadmap_stage_total` by `repo` and its `result`: `staged`, `skipped`, `needs_split`, `failed` or `degenerate`. The label `reason` names the rule that left a `skipped` item out, such as `title_type`, `held`, `failed_lately`, `queue_full`, `returned` or `rejected`, and is `none` for the other results (#4521). The Service logs the reason of a left-out item with the line `stage left out: repo= item=# reason= detail=` once, and again only when the kind changes, so a person sees why a repository is idle with no clone. An item is `degenerate` when its plan reply holds a placeholder such as `x` in every text (#4204): the job sends no second request. A reply that the checks refused at least once logs `stage gate returns: repo= item=# returns= result= gates=:,... codes=:,... version=` when it passes or stays refused, with the gates and the codes of the findings of the last refused reply (#4846). After it, each of the first 20 findings of that reply logs `stage gate refused finding: repo= item=# returns= result= finding=/ gate= code= subject= version=` (#5433). The subject is the path, the tool or the command that the message of the finding names, as a JSON string: `redact_text` (the mask of `mask_secrets`) masks it, and then the line keeps its first 200 characters. A finding whose message names none of them has `subject=none`. The line holds no other text of the plan or of the finding, so a person can tell a fault of the plan from a fault of the gate, such as a read that the trace gate did not see. The code of a finding is the key of its message in `MESSAGES.roadmap`, such as `stage_problem_missing_test_file`. Each reply after a return logs `stage gate findings: repo= item=# return= in= gone= stuck= new= version=`: the findings of the reply before it, those that the reply no longer has, those that it has again (the same gate and the same text, with the digits masked), and its other findings. A reply that the checks refuse at the last return logs `stage gate extension: repo= item=# returns= in= gone= stuck= new= never= result= version=`, and its extra return logs `stage gate extension end: repo= item=# returns= result= version=` (#4851). Each reply that the checks judge observes the count of its findings in `devops_cli_roadmap_stage_gate_problems` by `repo` and `reply` (0 for the first reply, 1 more for each return). Each model review logs `stage review round: repo= item=# round= findings= returned= open= version=` (round 0 is the first review), a repair round past `roadmap.stage.verify_repair_rounds` first logs `stage review extended: repo= item=# round= fixed= added= version=` with the earlier findings that the last review marked `gone` and the new open findings that it opened (#5066, #5409), and each item that a round failed logs `stage item failed: repo= item=# step= class= version=` (#4535). The release workflow builds the Service image only for a release, so the version names one image digest. The error line of a failed round keeps the first 256 characters of each error and then names every failed item. A refused reply is logged with the line `stage reply refused: item=# request= input_tokens= tools_offered= result=`, and an item that fails in the plan keeps its refused replies, their problems and the gate, the code, the path and the text of each finding in `roadmap/stage///.refused.json` beside its plan file, until the item is staged. `src/devops_cli/roadmap/stage/stage_finding_classes.json` holds the seed fix class and fix rate of each code, from 42 refused plans of 2026-11-10 and 2026-11-11. Each call of a step sends its seconds to `devops_cli_roadmap_step_seconds` by `repo`, `row`, `step` and `result` (#4066): the steps `select`, `plan`, `gate`, `review` and `apply`, and the results `ok` and `error`. A gate that refuses a reply adds 1 to `devops_cli_roadmap_stage_gate_refusals_total` under the name of the gate. A failed item is recorded in its job record with the class of its error and the time (#3493), and the job leaves it out while it takes the other items: 1 hour for a `provider`, `plan_defect` or `ci_infra` class, 6 hours for a `parser` class, and no time for `head_moved` (`RETRY_AFTER` in `roadmap/failure.py`, #4060). A record with no class, or an unknown class, waits as `ci_infra`. The stage Job of a failed item exits 1, and the row does not fail for it: the item waits for the wait of its class. The row fails a round for an error that belongs to no item, such as a refusal of the Kubernetes API or a Status that it could not set; three such rounds on the same input suspend the row. The ledger file keeps the class of each error, and a round that the stop of the Service ends counts as `stopped`, not as an error. The image carries the pinned OpenSpec and a Node runtime, so the job validates each change before it pushes: `kubectl -n devops exec deploy/roadmap-service -- openspec --version` prints the locked version. 16. The row `implement` follows `metrics` on the status lane (#2667, #2757). It calls no model, so a model-lane round that has not ended never delays it. It is due every 7 minutes and on a first run, in the clone of the status lane. The Service runs no step: a round only talks to the Kubernetes API, in three moves. It reports each Job that ended, with a comment on the item that holds the state and the last 40 lines of the log of the Job's pod, masked of secrets, and records `implement.job_state` as `succeeded`, `failed` or `gone`. It also logs the line `implement attempt: repo= item=# state= class= repair_rounds= tokens= digest= version=` for each Job that ended (#4535). It moves the deadline of each Job that has not ended (#3063, below). It waits while a Job of the repository has not ended. Else it makes one Job from CronJob `devops-cli-runner` for the first Staged or Planned item that the default filter names (a Planned item has its change folder on the default branch and no branch: a person merged the staging pull request, and the job makes the branch and the draft itself), with the args `roadmap implement --repo --item --confirm` and the item's number as the only item text, and records the name of the Job in `implement.job`, and the digest of the runner image that the CronJob template names in `implement.job_digest`. The same write sets the label `owner/service` on the item (#2910), and the report of the Job removes it. The comment that reports the Job names the digest. The Service makes no Job for an item that an agent or a person claimed, and a claim of an agent or a person ends a running Job at its next group boundary, with no push and no pull request. A round also sets the Status label of the items from their record (`status_sync.py`): it reads the plans on the default branch once for the sweep and for the plan, writes `status/planned` once a plan is merged, and writes `status/in-progress` as soon as the record names a Job, and again after it makes one. It writes only an open item that holds Ready or Planned with the label that a job last recorded, so a label that a person set stays. The rows `stage` and `stage_ready` use the same function. The Jobs of a repository carry the label `implement-repo`, whose value is a digest of the repository name, so the API is the lock and a restart of the Service loses nothing. A Job that leaves its item In Progress, or Ready or Planned with no stop, is a stop that the runner could not write, such as a pod that the kernel killed for its memory, unless an agent or a person claimed the item. The round then sets the item Blocked (`status/blocked`) and records `implement.stopped` as `job`. No Job is made for it before a clear rule runs. A stop that the runner writes sets Blocked in the same way, with the step in `implement.stopped`. After the report, the round clears the stop of each item that it set Blocked. It uses one of three rules, and a comment names the rule that ran. Rule `retry`: a comment `implement: retry`, made after the report by the owner, a member or a collaborator, clears the stop at once, whatever the image. Rule `continue` (#3721): three things must hold. The stop is `job`, which the round records for a Job that ended with no result. Examples are a pod that the kernel killed or evicted, a stalled Job that the Service ended, and a Job that no longer exists. The class in `implement.failure` has the action `retry` in `ACTION_BY_CLASS`. The count `implement.continuations` is less than the setting `roadmap.implement.continuations_per_item` (default 2, 0 turns the rule off). Kubernetes never restarts a Failed Job: `activeDeadlineSeconds` takes precedence over `backoffLimit`, and the template sets `backoffLimit: 0` on purpose. So a continuation is a new Job from the Service. The clear adds 1 to `implement.continuations`, a count and no other data, which stays after a clear. A retry of a person does not reset it. The comment says "continuation n of N", and at the limit it adds "No continuation is left". The rule runs before `digest`, reads no template and spends no clear by digest. The new Job takes the branch from `origin`. So it keeps the `wip:` commits that the run pushed for a group with more than one task (#3054). A group of one task that passed, and that no push kept, runs again. A class with another action, such as `oom` (`raise_limit`), waits for a retry, because a second run on the same limit ends the same way. Only a sign in the log gives the class `oom`. The Service reads no pod status, so a kill with no text in the log is continued as `ci_infra` (follow-up #3727). A stop that the runner wrote, with a step in `implement.stopped`, is no continuation. At the limit, a new runner image still clears the stop by the rule `digest`, within its limits. Rule `digest`: the digest in the template of CronJob `devops-cli-runner` is not `implement.job_digest`, so a new runner image has rolled out since the stop, and the class in `implement.failure` has the action `retry` in `ACTION_BY_CLASS` (#3481). A new image cannot fix a plan, a premise, a refused tool or a failed test, so a stop of another class, and a stop with no class on record, wait for a retry. Each clear by digest adds the class, the new digest and the time to `implement.digest_clears`, and the list stays after the clear. The settings `roadmap.implement.digest_clears_per_class` (default 1) and `roadmap.implement.digest_clears_per_item` (default 3) bound the entries; a stop at a limit stays Blocked until a retry, also for `ci_infra`. The comment of a clear by digest shows at most one time in 24 hours for an item (`implement.digest_clear_commented_at`), and the clear is recorded either way. The rule reads no image content: the Service holds digests and no map from a digest to commits. A clear sets Ready or Planned and removes `implement.stopped`, and the same round can make a Job for the item. The new Job overwrites `implement.job_digest`, so a second stop on the same image waits for a retry. A continuation is the exception, and `implement.continuations` bounds it. So the round makes no Job in a loop. A stop with no digest on record is cleared by a retry only, except a stop `job`, which a continuation clears with no digest. Inside one priority, a round takes an item with no digest clear before an item with one, and a retried item of a higher priority still goes before a new item of a lower priority. A Blocked stop that no rule clears costs one request in the first round after a start of the Service, the listing of its comments. A later round lists the comments again only when the `updated_at` of the issue moved, as a new comment moves it (#4854). The round reads the issue again only when a rule holds, and reads the template at most one time. The round clears no item that a Job holds, that an agent or a person claimed, or that a person labeled Blocked by hand. The failures ledger is unchanged: three failed rounds on the same input still suspend the row. If CronJob `devops-cli-runner` does not exist, the round fails with a message that names it: run `devops k8s deploy-stack --stack devops`, or wait for Argo CD. A Job that cannot pull its image (the package `runner` is not public, or no release published it) has an empty log, so it ends by its stall after 70 minutes, and the next round records the stop. Read the Jobs with `kubectl -n devops get jobs -l implement-repo`. The Job runs the checks that a person runs at a commit and at a push (#3043). Before the first step it runs `pre-commit install-hooks`, with `PRE_COMMIT_HOME` in the cache directory of the data directory, on the home volume. The two remote hook repositories come over public HTTPS (9 s and 51 MB, measured). A failed install stops the item at the step `hooks`, before any model request. Each step then runs the `pre-commit` stage on its staged changes as its last exit check. The child is `uv`, which holds no token. The Job installs no git hook, because git runs a hook with the token of the session, and the agent can edit the hook configuration. For the same reason every hook run gets `--config` with a copy of the configuration of the default branch, so an edit of the agent skips no hook. A hook run that runs out of time stops the step. A failed hook goes to the agent as a repair turn with its output. The setting `roadmap.implement.repair_rounds` (variable `DEVOPS_CLI_ROADMAP_IMPLEMENT_REPAIR_ROUNDS`, default 3) bounds the extra turns of a step for `ruff`, `mypy` and the hooks. Only a used budget stops the step. After the last group, the docs, the archive and the final rebase, and before the push, the Job runs the scoped checks: the `pre-push` stage of the hooks, `devops ci --check --only constructs,docs,openspec`, and `devops ci test` with the test modules that cover the changed Python files of `src/` and `tests/`. Above 30 test modules, which a change to a shared module gives, the tests check runs only the changed test modules, and it does not run when no test covers the change. A failed check starts a fix step, up to `repair_rounds` times for all scoped checks. The Job generates the docs again after each fix. It pushes a finished item only after all of them pass. A stop in this phase (a used budget, a fix step that stops, an error, a command that runs out of time) pushes the commits that passed to the item branch, as any other stop does, and the draft pull request stays a draft (#3645). The comment on the pull request shows the repair rounds of each step, and each run of a scoped check with its seconds. The extra run time of an item is about 10 s of hooks for each step, 9 s for the install, 35 s for the first two scoped checks, and at most about 3.5 minutes for the tests (12 test modules of the roadmap ran in 88 s on 2 CPUs). So it is 2 to 5 minutes in a Job that runs about an hour. The workflow checks `actionlint` and `zizmor` run in the `pre-push` stage only when the push changes a workflow, because the runner image holds no `actionlint`. A failed check of the pull request after the push gets a fix step, a push and a new watch, up to `repair_rounds` times, with a comment on the pull request for each round. -17. Each repository has three lanes, and each lane runs one round at a time in its own clone (#1532, #1534). The status lane runs the rows `metrics`, `implement`, `stage_ready`, `release_comments`, `github_status`, `cloudflare_status` and `pr_conflicts` in the clone `clone`. The row `metrics` reads the project metrics. The rows `github_status` and `cloudflare_status` each read one status page, need no clone, and are due every 13 minutes and on a first run (#4052). A read that fails fails its own row: the row counts `error` in `devops_cli_service_jobs_total`, writes no stamp to `schedule.json`, and the alert `RoadmapServiceJobsFailing` names the row when every round of the row failed for 1 hour. The other rows are not affected. The triage lane runs the row `intake` in the clone `triage-clone`. The model lane runs the rows `retitle`, `stage`, `fix_plan`, `refine` and `alternatives`, in that order, in the clone `model-clone`. A webhook makes a row due when its `batch_keys` hold the key: `refine` takes `edited`, `labeled` and `unlabeled`, `retitle` takes `edited`, and `stage` and `implement` take `labeled`, `unlabeled` and `closed` (#4412). The ConfigMap sets the same chat model for both lanes (item 19). A poll and a webhook go to all three lanes. The lanes share the file `schedule.json` of the repository, the ledger `service-failures.json` and the lock that each write of an item's job record takes (#2757). When intake places a critical fix or P0 item, it writes a `refine_due` timestamp to `schedule.json` so refinement becomes due in the next model-lane round; the timestamp is written even when the write of another candidate of the same round failed. An Item that a person changed between the plan and the write of intake is not a failed placement: nothing is written for it, the round does not fail, and the next round decides the candidate again (#4042). A `schedule.json` that exists and cannot be read fails the round with an error that names the file, and no row runs. A person repairs or removes the file; a removed file makes every row due once (#4042). The label `lane` of `devops_cli_service_jobs_total`, `devops_cli_service_job_seconds_total` and `devops_cli_service_queue_depth` is `status`, `triage` or `model`. The label `row` of `devops_cli_service_jobs_total` is the name of the row that ended, and the label `result` is `success`, `error` or `stopped` (the stop of the Service ended the row). The label `row` of `devops_cli_github_requests_total`, `devops_cli_service_job_suspended` and `devops_cli_service_job_retry_after_seconds` is the name of the row; the two gauges of the ledger have no label `lane`, as row names are unique. A model-lane round that has not ended does not delay a status-lane or triage-lane round. +17. Each repository has three lanes, and each lane runs one round at a time in its own clone (#1532, #1534). The status lane runs the rows `metrics`, `implement`, `stage_ready`, `stage`, `release_comments`, `github_status`, `cloudflare_status` and `pr_conflicts` in the clone `clone`. The row `metrics` reads the project metrics. The rows `github_status` and `cloudflare_status` each read one status page, need no clone, and are due every 13 minutes and on a first run (#4052). A read that fails fails its own row: the row counts `error` in `devops_cli_service_jobs_total`, writes no stamp to `schedule.json`, and the alert `RoadmapServiceJobsFailing` names the row when every round of the row failed for 1 hour. The other rows are not affected. The triage lane runs the row `intake` in the clone `triage-clone`. The model lane runs the rows `retitle`, `fix_plan`, `refine` and `alternatives`, in that order, in the clone `model-clone`. A webhook makes a row due when its `batch_keys` hold the key: `refine` takes `edited`, `labeled` and `unlabeled`, `retitle` takes `edited`, and `stage` and `implement` take `labeled`, `unlabeled` and `closed` (#4412). The ConfigMap sets the same chat model for both lanes (item 19). A poll and a webhook go to all three lanes. The lanes share the file `schedule.json` of the repository, the ledger `service-failures.json` and the lock that each write of an item's job record takes (#2757). When intake places a critical fix or P0 item, it writes a `refine_due` timestamp to `schedule.json` so refinement becomes due in the next model-lane round; the timestamp is written even when the write of another candidate of the same round failed. An Item that a person changed between the plan and the write of intake is not a failed placement: nothing is written for it, the round does not fail, and the next round decides the candidate again (#4042). A `schedule.json` that exists and cannot be read fails the round with an error that names the file, and no row runs. A person repairs or removes the file; a removed file makes every row due once (#4042). The label `lane` of `devops_cli_service_jobs_total`, `devops_cli_service_job_seconds_total` and `devops_cli_service_queue_depth` is `status`, `triage` or `model`. The label `row` of `devops_cli_service_jobs_total` is the name of the row that ended, and the label `result` is `success`, `error` or `stopped` (the stop of the Service ended the row). The label `row` of `devops_cli_github_requests_total`, `devops_cli_service_job_suspended` and `devops_cli_service_job_retry_after_seconds` is the name of the row; the two gauges of the ledger have no label `lane`, as row names are unique. A model-lane round that has not ended does not delay a status-lane or triage-lane round. 18. The row `stage_ready` follows `implement` on the status lane (#2865). It calls no model and needs no clone. It is due every 3 minutes and on a first run. A round reads the open items whose record holds `stage.pr` and no `stage.ready` of the same number and no `implement.job`; with no such item it sends no request of its own, since the listing of the issues is the one that `metrics` and `implement` read in the round. For each such item it reads the pull request (`GET pulls/`). A pull request that is not an open draft is only recorded in `stage.ready`. An open draft goes to the function `draft_readiness` with its check runs (`GET commits//check-runs`): when every check ended and passed, the row marks the pull request ready with `gh pr ready` (the same function as the implement job) and records `stage.ready`. A draft with a failed, cancelled or running check, or with no check, stays a draft, and the row does not retry a check. The row reads only the pull request that the stage job recorded, and never the draft of a person. It reads the check runs and not the commit statuses, because the App token holds `checks: read` and no `statuses` permission. A draft that waits for its checks costs 2 requests a round (12 an hour) of `service.github_requests_per_hour`; a pull request that the row marks costs 2 more for `gh pr ready` and 2 to record it, once. A refusal of `gh pr ready` fails the round, names the item, and the ledger of failed rounds suspends the row after three rounds in a row: check that the App holds `pull_requests: write` and `contents: write` (ADR 0015). A pull request that the row marked ready is no longer a draft, so the implement job leaves its item until a person merges the plan and the item is Planned. The row counts under `row="stage_ready"` in `devops_cli_github_requests_total`. -19. The model of each stage comes from the settings `ai.tasks..model` of the ConfigMap `devops-cli-config` (#3155). The slot `analysis` serves the model lane: the stage job (planning), refine and the alternatives check. The slot `verification` names the model that reviews a plan; no code reads it before the verification pass of #3153 is built. The slots `chat` and `triage` and the default `ai.model` serve the other calls of the Service, such as intake and the retitle row. The slot `implement` serves every step of the implement job, and `roadmap.implement.ladder` names the same group as the one tier of each step class (#3573). By the owner decision of 2026-11-07 (#3874), the ConfigMap sets `deepseek-v4.1-flash-1017` for every chat slot: `ai.model`, `analysis`, `stage`, `implement`, `verification`, `chat` and `triage`. The slots `analysis` and `stage` set `context_window` 256,000. The slot `analysis` named `claude-sonnet-5-5` from 2026-11-09 (#4204), because the stage job staged nothing with DeepSeek then. By the owner decision of 2026-11-10 (#4369) it names DeepSeek again, because Sonnet cost about 67 USD a week in that slot. A later trial of Sonnet in `analysis` needs `context_window` 200,000, and the slot `stage` keeps the job on DeepSeek. The embedding slot stays `qwen3-embedding:0.6b`, because a chat model cannot embed. By the owner decision of 2026-11-09 (#4241), the ConfigMap also sets `ai.reference_model: qwen3.8:27b` and `ai.reference_embedding_model: qwen/qwen3-embedding-8b`, so the spend reports of the Service value local tokens at the hosted prices of those two models (0.035 USD input and 1.50 USD output, and 0.01 USD, per million tokens). genai-prices does not know both names, so the ConfigMap also holds their prices in `ai.price_overrides` (#4242), and a new volume needs no hand step. A price that `devops ai cost set-price` saved in the file `pricing_overrides.json` of the data volume wins over the price in the ConfigMap for the same model. `ai.price_overrides` is a declared key of the section `ai`, which refuses an unknown key, so an image that is older than #4242 does not start with this key in its ConfigMap: apply the key after the new image runs or at the same time. The choice of slot models is temporary: undo it when most steps of the roadmap jobs work most of the time, and then name a model for each slot again. The prompts of intake and chat hold the titles and bodies of the issues of the repositories of the Service, and they leave the cluster to OpenRouter too (SECURITY.md rule 13). The window of `implement` is 256,000 tokens: the smallest that an fp8 provider of the group offers, where the group allows 1,048,576. A step has one tier, so a failure that selects `change_tier` ends the step; the item stops and waits for a retry. The prompts of a step hold the code of the repository, so they leave the cluster to OpenRouter (SECURITY.md rule 13). No slot and no ladder tier of the template names `claude-sonnet-5-5`. By the owner decision of 2026-11-10 (#4371), the ladders of `edit` and `repair` use DeepSeek first, as the live ConfigMap does. The code supports more tiers for each class (#4274), and a Sonnet tier is a later trial after a Sonnet investigation. A prompt of that tier would leave the cluster to Anthropic (SECURITY.md rule 13). A live run of `devops roadmap eval implement --model deepseek-v4.1-flash-1017 -F 2152-numeric-host-doubles` on 2026-11-05 passed every property in 281 s, with 42 model requests, 2,126,241 input tokens (the sum over the 42 requests) and 11,590 output tokens. The evaluation of 2026-11-02 chose them: on 16 golden cases the local `qwen3.8:27b` passed the stage gates in 3, `claude-sonnet-5-5` in 7 and `deepseek-v4.1-flash-1017` in 11, at about 0.002 USD a call for DeepSeek; in the review of 12 golden plans with 82 known defects, Sonnet 5.5 found 56% (68% of the major ones), DeepSeek 38% and the local models 22 to 23%. The plans of every model still need fixes, because the planner cannot read code (#3037). A failed Sonnet call falls back to DeepSeek at the gateway (#3152). The ConfigMap is not under Argo CD: change it with `kubectl -n devops patch configmap devops-cli-config`, then `kubectl -n devops rollout restart deployment/roadmap-service`; the CronJobs read it at each run. Measure a change of model with `devops roadmap eval stage --model `. +19. The model of each stage comes from the settings `ai.tasks..model` of the ConfigMap `devops-cli-config` (#3155). The slot `analysis` serves the stage Jobs (planning) and the model lane: refine and the alternatives check. The slot `verification` names the model that reviews a plan; no code reads it before the verification pass of #3153 is built. The slots `chat` and `triage` and the default `ai.model` serve the other calls of the Service, such as intake and the retitle row. The slot `implement` serves every step of the implement job, and `roadmap.implement.ladder` names the same group as the one tier of each step class (#3573). By the owner decision of 2026-11-07 (#3874), the ConfigMap sets `deepseek-v4.1-flash-1017` for every chat slot: `ai.model`, `analysis`, `stage`, `implement`, `verification`, `chat` and `triage`. The slots `analysis` and `stage` set `context_window` 256,000. The slot `analysis` named `claude-sonnet-5-5` from 2026-11-09 (#4204), because the stage job staged nothing with DeepSeek then. By the owner decision of 2026-11-10 (#4369) it names DeepSeek again, because Sonnet cost about 67 USD a week in that slot. A later trial of Sonnet in `analysis` needs `context_window` 200,000, and the slot `stage` keeps the job on DeepSeek. The embedding slot stays `qwen3-embedding:0.6b`, because a chat model cannot embed. By the owner decision of 2026-11-09 (#4241), the ConfigMap also sets `ai.reference_model: qwen3.8:27b` and `ai.reference_embedding_model: qwen/qwen3-embedding-8b`, so the spend reports of the Service value local tokens at the hosted prices of those two models (0.035 USD input and 1.50 USD output, and 0.01 USD, per million tokens). genai-prices does not know both names, so the ConfigMap also holds their prices in `ai.price_overrides` (#4242), and a new volume needs no hand step. A price that `devops ai cost set-price` saved in the file `pricing_overrides.json` of the data volume wins over the price in the ConfigMap for the same model. `ai.price_overrides` is a declared key of the section `ai`, which refuses an unknown key, so an image that is older than #4242 does not start with this key in its ConfigMap: apply the key after the new image runs or at the same time. The choice of slot models is temporary: undo it when most steps of the roadmap jobs work most of the time, and then name a model for each slot again. The prompts of intake and chat hold the titles and bodies of the issues of the repositories of the Service, and they leave the cluster to OpenRouter too (SECURITY.md rule 13). The window of `implement` is 256,000 tokens: the smallest that an fp8 provider of the group offers, where the group allows 1,048,576. A step has one tier, so a failure that selects `change_tier` ends the step; the item stops and waits for a retry. The prompts of a step hold the code of the repository, so they leave the cluster to OpenRouter (SECURITY.md rule 13). No slot and no ladder tier of the template names `claude-sonnet-5-5`. By the owner decision of 2026-11-10 (#4371), the ladders of `edit` and `repair` use DeepSeek first, as the live ConfigMap does. The code supports more tiers for each class (#4274), and a Sonnet tier is a later trial after a Sonnet investigation. A prompt of that tier would leave the cluster to Anthropic (SECURITY.md rule 13). A live run of `devops roadmap eval implement --model deepseek-v4.1-flash-1017 -F 2152-numeric-host-doubles` on 2026-11-05 passed every property in 281 s, with 42 model requests, 2,126,241 input tokens (the sum over the 42 requests) and 11,590 output tokens. The evaluation of 2026-11-02 chose them: on 16 golden cases the local `qwen3.8:27b` passed the stage gates in 3, `claude-sonnet-5-5` in 7 and `deepseek-v4.1-flash-1017` in 11, at about 0.002 USD a call for DeepSeek; in the review of 12 golden plans with 82 known defects, Sonnet 5.5 found 56% (68% of the major ones), DeepSeek 38% and the local models 22 to 23%. The plans of every model still need fixes, because the planner cannot read code (#3037). A failed Sonnet call falls back to DeepSeek at the gateway (#3152). The ConfigMap is not under Argo CD: change it with `kubectl -n devops patch configmap devops-cli-config`, then `kubectl -n devops rollout restart deployment/roadmap-service`; the CronJobs read it at each run. Measure a change of model with `devops roadmap eval stage --model `. 20. The row `release_comments` follows `stage_ready` on the status lane (#2917). It calls no model and needs no clone. It is due every 11 minutes and on a first run. A round reads the 30 newest releases and takes those that are published in the last 12 hours and are neither a draft nor a prerelease. For each one it takes the pull requests that the release body links as `([#N](url))`, reads the body of each pull request, and takes the closed issues that follow `Closes`, `Fixes` or `Resolves` at the start of a line. It posts `Released in ` on each such issue, and `Live since