Skip to content

fix(roadmap): default the step ceiling to twice the budget - #4556

Merged
dan-petty merged 3 commits into
mainfrom
fix/4505-ceiling-follows-budget
Nov 11, 2026
Merged

dan-petty merged 3 commits into
mainfrom
fix/4505-ceiling-follows-budget

Conversation

@dan-petty

@dan-petty dan-petty commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

roadmap.implement.step_token_ceiling had a fixed default, twice the default step budget, and the validator refuses a ceiling below the budget. So a config file or a variable that set only step_token_budget above that value did not load, and the Service and the runner could not start. A budget of 12000000 got its extension cut to 16000000, not 18000000.

  • step_token_ceiling is int | None. The property token_ceiling gives the setting, or twice the loaded budget when no source sets it.
  • The settings do not store the twice value, so devops config set of the budget moves the ceiling and writes no ceiling.
  • CONST_ROADMAP_IMPLEMENT_CEILING_FACTOR (2) replaces DEFAULT_ROADMAP_IMPLEMENT_STEP_TOKEN_CEILING.
  • An explicit ceiling below the budget is still refused.

Closes #4505

Change: openspec/changes/archive/2026-11-11-4505-default-the-step-ceiling-to-twice/

step_token_ceiling had a fixed default, twice the default step budget.
A config that set only step_token_budget above it did not load, and a
budget of 12000000 got a cut extension. The default now follows the
loaded step budget through a pydantic default factory.

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

Copy link
Copy Markdown
Owner Author

fail-to-pass

uv run devops ci fail-to-pass --base origin/main (58 s): 5 tests fail on the base and pass on this branch, 0 errored, 59 changed tests pass on both.

  • test_with_no_ceiling_set_the_ceiling_is_twice_the_configured_step_budget and test_a_variable_that_sets_only_the_step_budget_gives_twice_it_as_the_ceiling: on the base, a budget of 17000000 with no ceiling fails the load with a ValidationError.
  • test_a_step_budget_with_no_ceiling_set_gets_its_whole_extension: on the base, a budget of 12000000 extends to 16000000 with ceiling=True; on this branch to 18000000.
  • test_every_numeric_limit_of_the_roadmap_jobs_has_a_class and test_a_removed_limit_does_not_come_back[DEFAULT_ROADMAP_IMPLEMENT_STEP_TOKEN_CEILING]: the table of the roadmap limits.

Other checks: pytest tests/roadmap/implement/test_roadmap_implement_extension.py tests/roadmap/implement/test_roadmap_implement_limits.py tests/roadmap/test_roadmap_limit_classes.py tests/config tests/security/test_config_declarations.py: 361 passed. uv run devops docs generate --sync-readme leaves no diff.

Live cluster

No change is needed for this item. The live ConfigMap sets step_token_budget: 12000000 and no ceiling, so its ceiling becomes 24000000 and the extension reaches 18000000.

Order with #4553

#4553 (#4387) changes the unit and the defaults of the same settings and touches the same lines of settings.py, defaults.py, docs/ROADMAP_WORKFLOW.md and the requirement "The ceiling of a step budget is a setting". The pull request that merges second needs a rebase, and I resolve it. With this change merged first, the live value of 12000000 still loads after #4553, but the live step of #4553 (delete the line) still applies.

@dan-petty
dan-petty marked this pull request as ready for review November 11, 2026 09:00
The default factory set the ceiling one time, at load. devops config set of a
step budget above that ceiling was refused. The ceiling is now int | None, and
the property token_ceiling gives twice the budget when no source sets it, so
the config file gets no derived ceiling.
@dan-petty
dan-petty force-pushed the fix/4505-ceiling-follows-budget branch from 6c1ca4b to 7af6808 Compare November 11, 2026 09:41
@dan-petty

Copy link
Copy Markdown
Owner Author

Review findings

  1. major, src/devops_cli/config/settings.py: the ceiling default was set one time, at load, so devops config set of a budget above it was refused. Confirmed. On the old head 6c1ca4b with no config: load_settings() gave budget 8000000 and ceiling 16000000. Then dotted_set(s, "roadmap.implement.step_token_budget", "20000000") raised ValueError roadmap.implement: step_token_ceiling must not be below step_token_budget. RoadmapImplementConfig(step_token_budget=1000) followed by c.step_token_budget = 5000 raised the same error.
    • Fixed in 1b71219. step_token_ceiling is int | None with the default None. The property token_ceiling gives the setting, or twice the loaded step_token_budget when no source sets it. StepBudget reads the property. The validator compares only a ceiling that a source sets.
    • I did not use the proposed fix (write the ceiling again in _token_settings_agree). save_settings writes each key whose value changed after the load. A ceiling that the validator writes again thus goes into the config file on devops config set, and the next change of the budget above it fails again. With None in the settings, the command writes only the budget.
    • New test: test_config_set_of_a_step_budget_above_the_loaded_ceiling_moves_the_ceiling. devops config set roadmap.implement.step_token_budget 20000000 exits 0, the config file gets only the budget, and token_ceiling is 40000000.
    • The design, the proposal, the tasks and the requirement "The ceiling of a step budget is a setting" (one new scenario) record the change. The archive is the last commit (7af6808).

fail-to-pass

  • uv run devops ci fail-to-pass --base origin/main (15 s): 7 tests fail on the base and pass on this branch, 0 errored, 58 changed tests pass on both. The new test fails on the base with KeyError: 'roadmap': the command refused the budget, so it wrote nothing.
  • uv run devops ci fail-to-pass --base b45f203c (the code commit before this fix): 4 tests fail on that commit, the new test among them for the same cause.

Other checks

  • pytest tests/roadmap/implement tests/roadmap/test_roadmap_limit_classes.py tests/security/test_config_declarations.py tests/config tests/commands/test_config.py tests/commands/test_config_cmd.py: 1991 passed.
  • uv run devops docs generate --sync-readme: docs/CONFIGURATION.md now shows step_token_ceiling=None, and docs/ENV_VARS.md has the new description. devops ci --check --only constructs,docs,openspec passes.

Live cluster

No change. The live ConfigMap sets step_token_budget: 12000000 and no ceiling, so token_ceiling is 24000000 and the extension reaches 18000000.

Order with #4553

#4553 and this pull request change the same lines (the field step_token_ceiling, defaults.py, the table of the roadmap limits, and test_the_ceiling_is_twice_the_default_step_budget). The pull request that merges second needs a rebase: keep token_ceiling from this change and the new default values of #4553.

CI

The first run of "Tests & Coverage (shard 3 of 4)" stopped its output after about 4300 of 5461 tests and was cancelled at its 30-minute timeout. This is the hang of #4513 (comment added there). The failed jobs ran again, and all 38 checks pass.

@dan-petty
dan-petty merged commit 1dfb6c8 into main Nov 11, 2026
59 of 61 checks passed
@dan-petty
dan-petty deleted the fix/4505-ceiling-follows-budget branch November 11, 2026 11:59
dan-petty pushed a commit that referenced this pull request Nov 11, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.112.0](v0.111.0...v0.112.0)
(2026-11-11)


### Features

* **k8s:** export gateway spans without key metadata
([#4520](#4520))
([7234d71](7234d71))
* **k8s:** set the homelab domain in container env values
([#4608](#4608))
([a3bcf7c](a3bcf7c))
* **telemetry:** send pydantic-ai spans through the exporter seam
([#4538](#4538))
([fcf2a7a](fcf2a7a))


### Bug Fixes

* **ai:** price cached prompt tokens of chat calls
([#4584](#4584))
([f84bbe6](f84bbe6))
* **devcontainer:** stop uv noise lines in agent shells
([#4592](#4592))
([9ba375c](9ba375c))
* **k8s:** delete gateway management bodies from spans
([#4551](#4551))
([b835d3c](b835d3c))
* **k8s:** set the kube context and namespace on devops pods
([#4514](#4514))
([9087b39](9087b39))
* **roadmap:** a refused spec after the archive is a plan defect
([#4549](#4549))
([1db29f7](1db29f7))
* **roadmap:** count and log the reason of a left-out stage item
([#4541](#4541))
([5600179](5600179))
* **roadmap:** default the step ceiling to twice the budget
([#4556](#4556))
([1dfb6c8](1dfb6c8))
* **roadmap:** explain --trace shows the argument digest
([#4526](#4526))
([c92195f](c92195f))
* **roadmap:** explain totals count dropped model events
([#4543](#4543))
([fe0e979](fe0e979))
* **roadmap:** give each eval verify run its own report file
([#4534](#4534))
([ad27f2d](ad27f2d))
* **roadmap:** one event loop and a time limit for decide_all
([#4585](#4585))
([ec51e01](ec51e01))
* **roadmap:** scoped updates send requests with no row scope
([#4531](#4531))
([5f75d25](5f75d25))
* **roadmap:** the caller gate reads an added parameter span
([#4548](#4548))
([1ba07c1](1ba07c1))
* **roadmap:** the implement shell waits for its command
([#4536](#4536))
([571e044](571e044))
* **roadmap:** the module-test and caller gates read imports and calls
([#4490](#4490))
([8a22e82](8a22e82))
* **service:** put trace ids on Service JSON log lines
([#4511](#4511))
([0d7a0d2](0d7a0d2))


### Performance Improvements

* **ai:** keep intake embeddings between CLI runs
([#4546](#4546))
([812871e](812871e))
* **roadmap:** intake reads only the issues that changed
([#4552](#4552))
([7dfd155](7dfd155))

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

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

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(roadmap): default the step ceiling to twice the budget

1 participant