Skip to content

feat(roadmap): make the attempt limits of the failing jobs settings - #5490

Merged
dan-petty merged 4 commits into
mainfrom
feat/5440-job-limit-settings
Nov 13, 2026
Merged

dan-petty merged 4 commits into
mainfrom
feat/5440-job-limit-settings

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

The stage, implement and fix-plan jobs kept the limits that end an attempt as constants. So a person could not change them without a release, and the ceiling 3 of roadmap.stage.gate_returns stopped a doubled value. Now each limit is a setting of its job section, with the old constant as its default, so no configuration gives the same behavior. A job reads the settings at each round, step or selection, so a changed ConfigMap needs no restart.

The settings load refuses a value above 4 times the default and names the setting. It also refuses an inner limit above its outer limit and names both settings. The Job deadline keeps its cap of 14400 s from the admission policy. The plan and review prompts get their call budget from the settings, and the file tools of the harness take roadmap.implement.tool_retries.

The Service and the runner image read the new settings, so a release is needed.

Closes #5440

Change: openspec/changes/archive/2026-11-13-5440-job-limit-settings/

The owner asked on 2026-11-13 to double each limit of the roadmap jobs
below 80 % success and to try values until one works. Many limits that
end an attempt were constants, so each try needed a release, and the
ceiling of roadmap.stage.gate_returns (3) refused a doubled value.

Each listed limit is now a setting of its job section, with the old
constant as its default, read when the round, the step or the
selection starts:

- roadmap.stage: gate_return_extensions, verify_repair_rounds_ceiling,
  plan_defect_limit, max_requests, max_tool_calls, plan_calls_advised,
  plan_calls_notice, review_calls_advised, review_calls_notice
- roadmap.implement: max_requests, max_tool_calls, tool_retries,
  max_refusals, max_consecutive_refusals, model_resends,
  extension_calls, extension_max_refused
- roadmap.fix_plan: head_attempts, revisions

The settings load refuses a value above 4 times the default
(CONST_ROADMAP_LIMIT_CEILING_FACTOR) with the setting name, and an
inner limit above its outer limit with both names. The Job deadline
keeps its cap of 14400 s, which the admission policy sets. The file
tools of the harness take tool_retries in place of the 5 of Coder. The
stage prompts get the call budget from the settings.

Closes #5440
The description of roadmap.implement.step_token_ceiling gave the window
and the refused commands of the rule implement.extension as 20 and 3.
These are now the settings extension_calls and extension_max_refused, so
the text names them.
The test of the declared variables lists each setting that came after
the declaration moved onto the fields. The 19 settings of #5440 were
not in the list, so the test failed.
@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

Test results and review notes

Render diff. None. The branch changes no path under k8s/, so no kustomize or helm render changes and no workload restarts. Nobody applied anything to the cluster.

Checks. The branch is rebased on origin/main 2b79f35, which holds #5413 (94a1999). The two later commits of main change only infra code and the SRE documents.

  • uv run devops ci --check --only lint,format,domain,docs,openspec,typecheck: pass (mypy strict).
  • uv run devops ci test with the tests that cover the changed modules (the 18 changed source modules, tests/roadmap/stage, tests/roadmap/implement, tests/roadmap/steps, tests/commands/test_roadmap_step_fix_plan.py, tests/roadmap/test_attempt_kill.py, tests/config, tests/security, tests/docs, tests/telemetry and the invariants of the specs, change folders, ADRs and the workflow document): 16284 passed and 2 skipped for the source modules with tests/roadmap/stage and tests/roadmap/implement; 2104 passed for tests/security, tests/docs and tests/telemetry; 5527 passed for the fix-plan, config and invariant tests, where the one failure of tests/security/test_config_declarations.py led to fix 1 below. After the last rebase, the static rows and the settings, fix-plan bounds and declarations tests (65) passed again.
  • uv run devops openspec check: pass.
  • Builder run, before the rebase: uv run devops ci fail-to-pass --base origin/main gave 69 tests that fail on the base and pass on the head, among them tests/config/test_roadmap_job_limit_settings.py and tests/roadmap/steps/test_roadmap_fix_plan_bounds.py.

Fixes in review:

  1. tests/security/test_config_declarations.py failed: the 19 new variables (DEVOPS_CLI_ROADMAP_STAGE_*, DEVOPS_CLI_ROADMAP_IMPLEMENT_*, DEVOPS_CLI_ROADMAP_FIX_PLAN_HEAD_ATTEMPTS and _REVISIONS) were not in the list of later settings. Added them.
  2. The description of roadmap.implement.step_token_ceiling (and docs/ENV_VARS.md) still gave the rule of the extension as "last 20 tool calls" and "at most 3 refused commands". It now names extension_calls and extension_max_refused.
  3. Four requirements of the living spec roadmap-implement-step/budgets still gave 20 calls and 3 refused commands as fixed values. They now name the settings with their defaults, and the archived delta holds them as MODIFIED.
  4. Rebase on fix(roadmap): a named fix-plan run can skip the 6-hour wait #5413, which merged first: _pull_reason keeps the --skip-wait exception of fix(roadmap): a named fix-plan run can skip the 6-hour wait #5413 and reads roadmap.fix_plan.head_attempts; _extra reads the same setting in place of the removed constant. The help of --skip-wait, docs/commands/roadmap.md, docs/CLUSTER.md, docs/ROADMAP_WORKFLOW.md, docs/roadmap/stage.md, the ADR 0021 Status History and the living requirement "A named run with skip_wait skips the wait" name the two settings.

Scope decisions of the builder, kept:

  • No new time order check (tool time below step time below item time). A check of command_timeout_seconds and step_time_limit_seconds refuses values that tests use today (a step limit of 60 s). The existing check item_time_limit_seconds must not be above deadline_ceiling_seconds stays, and the elapsed time of an item is never below that of its step, so the item stop comes before the Job deadline.
  • CONST_ROADMAP_STAGE_VERIFY_REPAIR_ROUNDS_CEILING became the setting roadmap.stage.verify_repair_rounds_ceiling (default 4, at most 16). verify_repair_rounds must not be above it. The live value verify_repair_rounds: 4 loads with the default ceiling, so the release does not crash-loop the Service.
  • _tune gives the FileSystem capability of Coder roadmap.implement.tool_retries, because Coder sets its own max_retries 5 on the file tools.
  • The stage prompts say "From call number N" in place of "From the Nth call", so the plan cache key changes one time.

Steps after the release (a person or an agent, not this pull request):

  • Set the doubled values of the new settings in the ConfigMap devops-cli-config, for example roadmap.stage.gate_returns: 6, gate_return_extensions: 2, verify_repair_rounds_ceiling: 8, plan_defect_limit: 6, roadmap.implement.max_refusals: 60, max_consecutive_refusals: 6, roadmap.fix_plan.head_attempts: 4 and revisions: 6. Keep each inner limit at or below its outer limit.
  • Then read the next stage, implement and fix-plan result lines for runs past the old limits, such as gate_returns=4 or more (the last criterion of feat(roadmap): make the attempt limits of the failing jobs settings #5440).

Known outer limits that no settings check sees (also in a comment on #5440): the live roadmap.fix_plan.time_budget_seconds 7200 is equal to the 7200 s deadline of the CronJob template of devops k8s run-job, and the live roadmap.implement.request_timeout_seconds 2400 is above the 1500 s timeout of the gateway router. This pull request does not change them.

@dan-petty
dan-petty marked this pull request as ready for review November 13, 2026 17:44
@dan-petty
dan-petty merged commit a13e520 into main Nov 13, 2026
24 checks passed
@dan-petty
dan-petty deleted the feat/5440-job-limit-settings branch November 13, 2026 17:45
dan-petty pushed a commit that referenced this pull request Nov 13, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.130.0](v0.129.1...v0.130.0)
(2026-11-13)


### Features

* **k8s:** add RuntimeClass gvisor for the runsc nodes
([#5436](#5436))
([0d9ffa1](0d9ffa1))
* **roadmap:** make the attempt limits of the failing jobs settings
([#5490](#5490))
([a13e520](a13e520)),
closes [#5440](#5440)


### Bug Fixes

* **infra:** a plan shows a skip by a check-mode when as unchecked
([#5442](#5442))
([499b42c](499b42c))
* **infra:** the apply gate leaves out alerts of offline nodes
([#5478](#5478))
([3f0d0f0](3f0d0f0))
* **roadmap:** a named fix-plan run can skip the 6-hour wait
([#5459](#5459))
([94a1999](94a1999)),
closes [#5413](#5413)
* **roadmap:** a review finding must name a part of the plan
([#5418](#5418))
([34cdf12](34cdf12))
* **roadmap:** the stage gate log names each refused finding
([#5441](#5441))
([47b1ec5](47b1ec5))

---
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): make the attempt limits of the failing jobs settings

1 participant