Skip to content

feat(roadmap): extend a step budget when the run makes progress - #4464

Merged
dan-petty merged 3 commits into
mainfrom
feat/4394-extend-step-budget-on-progress
Nov 11, 2026
Merged

dan-petty merged 3 commits into
mainfrom
feat/4394-extend-step-budget-on-progress

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

A step of the implement job that reaches roadmap.implement.step_token_budget gets one extension of 50% of the budget when its last 20 tool calls hold at least 1 successful edit and at most 3 refused commands. The tool log of the step gives the counts. A missing or failing digest, a ceiling with no room and a second arrival at the limit stop the step with limit_reached, as before. The new setting roadmap.implement.step_token_ceiling (default 16000000) caps the extension. The item budget still holds. The ready and stop comments show each extension with its counts, and devops_cli_roadmap_implement_extension_total counts each decision (2 series).

In pilot 3, a person finished 16 of the 20 steps that stopped at the budget, and each of the 16 passes the rule. This is the decision point implement.extension of ADR 0020: the rule is its resolver, with no decision model.

Closes #4394

Change: openspec/changes/archive/2026-11-11-4394-extend-a-step-budget-when-the/

@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 11, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Replay of the rule on the pilot 3 data

Data: the runner logs of 14 days (2026-10-27 to 2026-11-10, 36444 log lines of 420 pods) and the job records of 77 items. For each stop with a class, a script gives the tool calls before the stop to progress_digest and extends of this branch, and writes the decision. The counts are (successful edits, refused commands) in the last 20 tool calls.

Stops with the class limit_reached (20)

Label Extended Halted
A person finished the item later 16 0
End not known 3 1
Item Label Input tokens at the stop Counts Decision
#3075 finished later 8024412 (2, 2) extended
#3217 finished later 19015622 (2, 1) extended
#3247 finished later 8022108 (1, 1) extended
#3251 finished later 8068015 (4, 3) extended
#3253 finished later 8014688 (2, 0) extended
#3347 finished later 8076906 (8, 0) extended
#3404 finished later 14687799 (4, 0) extended
#3417 finished later 12174702 (10, 0) extended
#3443 finished later 8050668 (2, 0) extended
#3451 finished later 11733930 (3, 0) extended
#3456 finished later 8097393 (1, 1) extended
#3485 finished later 8002042 (4, 0) extended
#3654 finished later 14265109 (3, 1) extended
#3991 finished later 8084136 (2, 0) extended
#4004 finished later 8011119 (1, 3) extended
#4079 finished later 8032090 (2, 0) extended
#2742 not known 8128228 (6, 0) extended
#3296 not known 8073827 (3, 0) extended
#3427 not known 8012397 (1, 0) extended
#3428 not known 8073658 (0, 0) halted

Result: the rule extends each of the 16 stops that a person finished: 0 errors in 16 (the 95% upper bound of the error rate is about 19%).

Stops of another class above 6.4 million input tokens (15)

These steps did not stop at the budget, so the rule did not act on them. The replay shows what the rule does with their last 20 calls.

The 33 labelled checkpoints

Label Checkpoints What the rule does
Extension was right (finished later) 16 extends all 16
Spinning 5 halts all 5
Finished with no help above 80% of the budget 8 no decision: these steps did not reach the budget
Not known 4 not scored

The tests of tests/roadmap/implement/test_roadmap_implement_extension.py hold the 16 shapes that extend and the 5 shapes that halt, as a table.

@dan-petty

Copy link
Copy Markdown
Owner Author

The live ConfigMap after the merge

The live ConfigMap devops-cli-config sets this line:

roadmap:
  implement:
    step_token_budget: 12000000

This pull request does not change the live cluster. After it merges, a person may delete the line step_token_budget: 12000000. Then the step budget is the default 8000000, and a step that makes progress gets one extension to 12000000, below the default ceiling 16000000.

If a person keeps 12000000, the extension goes to 16000000 (the default ceiling cuts it from 18000000). To give the full 50%, add this line under roadmap.implement:

    step_token_ceiling: 18000000

Caution: the settings refuse a step_token_budget above step_token_ceiling. If a person sets a budget above 16000000, set step_token_ceiling to the same value or higher in the same change. Otherwise the settings do not load and the Service does not start.

@dan-petty

dan-petty commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner Author

Fail-to-pass

Command: uv run devops ci fail-to-pass --base origin/main (local run on the head before the last rebase onto main, which added only the commits of main). The title is feat, so the Fail-to-Pass Check workflow does not run.

Result: 5 failed and 150 passed on the base, 1 errored.

  • tests/roadmap/implement/test_roadmap_implement_extension.py: does not collect on the base (BudgetExtension, ProgressDigest and progress_digest do not exist there).
  • test_roadmap_implement_job_extension.py::test_the_ready_comment_and_the_record_show_the_extension_of_a_step and ::test_the_stop_comment_shows_the_extension_that_the_step_spent: the base has no extension in the record and the comments.
  • test_roadmap_implement_step.py::test_the_agent_of_a_step_runs_its_shell_in_that_environment, test_roadmap_mcp.py::test_implement_step_build_agent_with_mcp and ::test_implement_attempt_builds_mcp_toolset_from_settings: these tests changed because StepBudget now takes the progress of the tool log ('ToolCallLog' object has no attribute 'progress' on the base).

On the head, the 7 affected test files pass: 399 tests.

@dan-petty
dan-petty marked this pull request as ready for review November 11, 2026 03:09
@dan-petty
dan-petty enabled auto-merge (squash) November 11, 2026 03:09
@dan-petty
dan-petty force-pushed the feat/4394-extend-step-budget-on-progress branch from b562e60 to ae12894 Compare November 11, 2026 03:28
A step that reaches roadmap.implement.step_token_budget gets one
extension of 50% of the budget when its last 20 tool calls hold at
least 1 successful edit and at most 3 refused commands. The new
setting roadmap.implement.step_token_ceiling (default 16000000) caps
the extension. The item budget and the time limits get no extension.

The digest comes from the tool log of the step. A missing digest, a
digest that fails the rule, a ceiling with no room and a second
arrival at the limit stop the step with the class limit_reached, as
before. The record implement.spend, the ready comment and the stop
comment show each extension with its counts. The counter
devops_cli_roadmap_implement_extension_total counts each decision
(2 series).
The table of limit classes holds the four numbers of the rule
implement.extension and the setting step_token_ceiling. The list of
later variables holds DEVOPS_CLI_ROADMAP_IMPLEMENT_STEP_TOKEN_CEILING.
The workflow document writes the name of the decision point as plain
text, because a code span of that form names a record key.
@dan-petty

Copy link
Copy Markdown
Owner Author

Review findings after the merge

This pull request merged (c8ed108) before the review fixes. No commit went to its branch. I checked each finding against main. This list gives each finding and the action.

# Severity Finding Check Action
1 major src/devops_cli/config/defaults.py:860: the default ceiling is a fixed 16000000, not 2 times the configured step budget (issue criterion "Ceiling default"). Confirmed. On main, RoadmapImplementConfig(step_token_budget=12_000_000) loads with the ceiling 16000000, so the 50% extension is cut to +33%. RoadmapImplementConfig(step_token_budget=17_000_000) fails with step_token_ceiling must not be below step_token_budget. Before this merge, a budget of 17000000 loaded. Filed #4505: resolve an unset ceiling to 2 times the loaded budget, keep the refusal of an explicit ceiling below the budget, and change the spec and the docs. The live ConfigMap value (12000000) loads today, so this is no outage.
2 major src/devops_cli/config/constants.py:3361: the criteria "Progress setting defaults", "Progress setting validation" and the 110% scenario of "One-time budget extension" are not delivered as written. Confirmed. The rule uses four constants and a share of 50%. There are no settings step_token_progress_calls, step_token_max_refusals or step_token_extension_percent. The archived design.md records this change on purpose (ADR 0020). Posted a comment on #4394 (#4394 (comment)) that gives each changed criterion, the delivered behavior and the reason, with a link to design.md. No follow-up item for the settings: the design rejects them, and a person can file one if they want them.

Minor findings: the review gave none.

No code changed, so no fail-to-pass run applies to this comment. The fix of finding 1 gets its own pull request and its own fail-to-pass run.

dan-petty pushed a commit that referenced this pull request Nov 11, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.111.0](v0.110.0...v0.111.0)
(2026-11-11)


### Features

* **roadmap:** a decision-point registry with a resolver chain
([#4453](#4453))
([b73e97a](b73e97a))
* **roadmap:** eval verify stores each case and resumes
([#4451](#4451))
([7c59565](7c59565))
* **roadmap:** extend a step budget when the run makes progress
([#4464](#4464))
([c8ed108](c8ed108))


### Bug Fixes

* **ai:** a failed model transport names its phase and its error
([#4460](#4460))
([54743c4](54743c4))
* **ai:** price the DeepSeek group and its cached input
([#4454](#4454))
([3b1f6bd](3b1f6bd))
* **roadmap:** stage and refine send no answer count or row
([#4484](#4484))
([d9c8ee8](d9c8ee8))
* **roadmap:** tool docstrings garble the answer format
([#4486](#4486))
([2f6114f](2f6114f))


### Performance Improvements

* **roadmap:** parse only the bodies that hold a job record
([#4455](#4455))
([c653bde](c653bde))
* **tests:** evaluate hour-scale promtool tests every hour
([#4462](#4462))
([0ac2f76](0ac2f76))

---
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): extend a step budget when the run makes progress

1 participant