Repository navigation
Description
Problem Description
The stage job holds a Ready item for an owner decision when one task group is a little over the step budget after one split. The step budget is a hard cap: no fixable check runs and no bounded extension exists.
Example: #3655 (Ready, all dependencies closed). Stage comment of 2026-11-17T00:02Z: "The inputs of the step of the task group "Create the roadmap pipeline dashboard file" hold 65069 tokens, over the budget of 64000 tokens, also after the model split the groups once. Split the group or raise the budget of the step?" The group is 1.7% over. owner_question.answer is null, so the item has not moved since.
Ready items that the same stop holds on 2026-11-19 (job records, stage.needs_split, stage.file_cap 8000):
| Item | Stop | Group | Tokens | Over 64,000 |
|---|---|---|---|---|
| #1858 | 2026-11-12T15:45Z | Add the changes job and the image caller to ci.yml | 65,323 | 2.1% |
| #3742 | 2026-11-16T07:03Z | Read the source files and refuse an invalid labels file | 64,154 | 0.2% |
| #3907 | 2026-11-17T16:08Z | Request budget, the setting and the ETag cache | 66,549 | 4.0% |
| #3655 | 2026-11-17T00:02Z | Create the roadmap pipeline dashboard file | 65,069 | 1.7% |
| #4059 | 2026-11-18T12:13Z | Correct the pre-move paths of the good-3264 plan | 65,128 | 1.8% |
The code path:
Planner._fit(src/devops_cli/roadmap/stage/stage.py:2716-2740) asks the model for one split. After that split, "a group over the budget stays over it".stage.py:2573-2574returnsOverBudgetwhen a measured group is overself._budget(the settingroadmap.stage.step_tokens, default 64,000,src/devops_cli/config/settings.py:1452-1456)._stop_on_budget(stage.py:4071-4096) posts the owner question and recordsstage.needs_split._recorded_split(stage.py:865-870) then leaves the item out of each round until a person answers.
No soft cap applies here:
- The decision point table registers only
alternatives.reply_fixableandstage.verify_screen(src/devops_cli/roadmap/decision_table.py:25-30). No point covers the step budget. step_tokenshas no hard ceiling (ge=1000only). Other caps of the jobs useCONST_ROADMAP_LIMIT_CEILING_FACTOR(src/devops_cli/config/constants.py:3491) for their ceiling.- A split moves files between groups. It cannot make one file smaller (fix(roadmap): the stage job stops an item whose task group is a few percent over the budget after one split #2838, evidence comment of 2026-10-31). The stage measure adds 32 tokens for each estimated line of a created file (
CREATED_LINE_TOKENS,src/devops_cli/roadmap/stage/stage_change.py:139). So the recommendation of the question, "Split the group" (src/devops_cli/lang/en/messages.py:4575-4577), cannot help a group that creates one large file, such as the dashboard file of feat(roadmap): a dashboard and alerts for the pipeline #3655.
The owner direction of 2026-11-11, quoted word for word in tracker #4843: "keep loosening restrictions and caps, adding dynamic cap extensions using a decision model to judge if progress is being made, and make sure there is a step to identify if something is fixable before being refused or rejected". #4843 covers "the caps, budgets, gates, screens, holds and return rules" of stage. Its child list has no child for this stop, and it keeps the value roadmap.stage.step_tokens 64000.
One constraint: the CI Plan Check measures the plan with the same setting (src/devops_cli/roadmap/plan_check.py:647). An extension that only the stage job knows makes the CI check refuse the plan that stage pushed (the stage and CI disagreement of #4725).
Reproduction Steps
- Read the job record of feat(roadmap): a dashboard and alerts for the pipeline #3655:
stage.needs_split"Create the roadmap pipeline dashboard file (65069 tokens)",stage.file_cap8000,owner_question.answernull. - Read the job records of ci(image): move the image checks to one path-filtered workflow #1858, feat(roadmap): onboard writes labels.yml and clear-status.yml from --from #3742, feat(research): watch upstream releases of the pins #3907 and test(invariants): validate stage eval fixtures against schema and tree #4059: each holds
stage.needs_splitwith a group of 64,154 to 66,549 tokens,stage.file_cap8000 and no answer._recorded_split(stage.py:865-870) leaves each item out of every stage round while the record stays. - Read
src/devops_cli/roadmap/decision_table.py:25-30: no point for the step budget.
Expected vs Actual Behavior
Expected:
- At the step budget, the stage job first runs a fixable check. Then a rule, or the soft-cap chain of feat(roadmap): add the soft-cap and fix-check chain to decision points #4847, grants a bounded extension for a group a little over the budget, up to a hard ceiling. The job records the extension and counts each decision.
- The plan records the extension, so the CI Plan Check measures the group with the same limit.
- Only a group over the hard ceiling makes an owner question.
Actual: a group 0.2% to 4.0% over the budget stops the item and waits for a person. 5 Ready items wait for this reason, the oldest since 2026-11-12.
Environment Diagnostics
- DevOps CLI Version: 0.180.0 (
origin/main0d90de5) - Python Version: 3.14.10
- Execution Environment: the stage job of the roadmap Service in the cluster; the records were read from the issue bodies.
Logs, Traces, or Terminal Output
# Stage comment on #3655, 2026-11-17T00:02:46Z
**Owner question:** The inputs of the step of the task group "Create the roadmap pipeline
dashboard file" hold 65069 tokens, over the budget of 64000 tokens, also after the model split
the groups once. Split the group or raise the budget of the step?
**Recommendation:** Split the group: the plan check keeps the budget of the step.
# Job records, 2026-11-19 (stage.needs_split | stage.file_cap | owner_question.answer)
#4059 Correct the pre-move paths of the good-3264 plan (65128 tokens) | 8000 | None
#3907 Request budget, the setting and the ETag cache (66549 tokens) | 8000 | None
#3742 Read the source files and refuse an invalid labels file (64154 tokens) | 8000 | None
#3655 Create the roadmap pipeline dashboard file (65069 tokens) | 8000 | None
#1858 Add the changes job and the image caller to ci.yml (65323 tokens) | 8000 | NonePre-Submission Checklist
- I have verified that no sensitive credentials, private keys, or internal tokens are contained in this issue report.
- I have checked existing issues and pull requests to ensure this is not a duplicate. Searches: "soft cap" (title), "step budget" (title), "stage budget" (title), "task group budget" (title), "over the budget" (title), "raise the budget", "budget stop" (title), "cap extension" (title), "fixable" (title). fix(roadmap): the stage job stops an item whose task group is a few percent over the budget after one split #2838 (closed 2026-10-31) fixed the measure of a file, not the stop. feat(roadmap): extend a step budget when the run makes progress #4394 and feat(roadmap): extend a step budget when the run makes progress #4464 (closed) extend the implement step budget, not the stage step budget. feat(roadmap): add the soft-cap and fix-check chain to decision points #4847 (open, status/ready) builds the soft-cap chain with
implement.extensionas its first point. feat(roadmap): run a fixable check before a decision point refuses #5840 (open) runs a fixable check before a decision point refuses. feat(roadmap): track progress-aware caps and fix-before-refuse #4843 (open tracker) lists no child for this stop. No open issue covers this case.
Acceptance Criteria
- A test replays feat(roadmap): a dashboard and alerts for the pipeline #3655: a group of 65,069 tokens against a budget of 64,000 after one split stages the item with a recorded extension and no owner question.
- A test: a group over the hard ceiling still stops the item with the owner question of today.
- A test: the CI Plan Check (
plan_check.py) accepts a group that the stage job staged with an extension, and refuses the same group without the extension record. - A test: the fixable check runs before the extension or the stop, and each decision adds one count to a bounded counter.
- Live proof: after the merge and the release, feat(roadmap): a dashboard and alerts for the pipeline #3655, ci(image): move the image checks to one path-filtered workflow #1858, feat(roadmap): onboard writes labels.yml and clear-status.yml from --from #3742, feat(research): watch upstream releases of the pins #3907 and test(invariants): validate stage eval fixtures against schema and tree #4059 stage without a person answer, or each gets one owner question that names the hard ceiling. A comment gives the result of each item.
Dependencies
-
chore(roadmap): hold incremental stage and implement work #6521 (hold: incremental work on the stage, implement and fix-checks jobs waits for the re-architecture)
-
feat(roadmap): add the soft-cap and fix-check chain to decision points #4847 (open, status/ready) for the decision-model step of the extension. A rule with a hard ceiling can come first, in mode rule.
-
Tracker feat(roadmap): track progress-aware caps and fix-before-refuse #4843: a candidate child of its ordered list.
Alternatives check of 2026-11-29: none.
Tool: none found.
Reason: Searches returned no tool that measures or extends a stage step budget; OpenSpec is already the project's change-proposal layer and only holds the metadata file. The budget extension, hard ceiling, fixable check and plan-check limit are project code.
Covers:
- Holds the change proposal and metadata file that travel with the plan
- Accepts tool-specific x- keys in its metadata file
- Validates proposal structure and strict change schemas
Lacks:
- No token measure of a task group or step
- No budget, extension or hard ceiling setting
- No fixable check before a stop, no decision counter
Proposed design
Problem statement
Add a bounded extension with a hard ceiling to the stage step budget. The stage job runs a fixable check first. It grants the extension for a group a little over the budget and records it in .openspec.yaml. The CI Plan Check uses the same limit, and a counter records each decision. #6521 must merge first. A person must run the live proof on the five items after the release.
Acceptance criteria
Requirement: Group within the extension
The stage job SHALL grant a bounded extension to a group over the step budget and within the hard ceiling, and record it in .openspec.yaml.
Scenario: Replay #3655
- WHEN A test runs the stage job on one group that creates one file and holds 65,069 tokens, with a step budget of 64,000 and an extension of 16,000.
- THEN The test asserts that the item is staged,
.openspec.yamlholds anx-step-budget-extensionentry of 16,000 tokens for that group, and no owner question is posted.
Requirement: Group over the hard ceiling
The stage job MUST post the owner question for a group over the hard ceiling and MUST name the ceiling in the question.
Scenario: Group over the hard ceiling
- WHEN A test runs the stage job on a group of 80,001 tokens with a step budget of 64,000 and an extension of 16,000.
- THEN The test asserts that the item is stopped, the owner question names the hard ceiling of 80,000, and
.openspec.yamlrecords no extension for that group.
Requirement: Plan check reads the extension
The plan check MUST apply each recorded extension to the group that the entry names and MUST refuse the group without the entry.
Scenario: Group with and without the extension record
- WHEN A test runs the plan check on a group of 65,069 tokens with an
x-step-budget-extensionentry of 16,000, once with and once without the entry. - THEN The test asserts that the check passes with the entry and reports the group over the budget without it.
Requirement: Extension covers only its group
The plan check MUST refuse a group over the step budget that no extension entry names.
Scenario: Second group over the budget
- WHEN A test runs the plan check on a change folder whose extension entry names group 1, while group 2 is over the step budget.
- THEN The test asserts that the check reports group 2 over the budget.
Requirement: Fixable check and counter
The stage job MUST run the fixable check first and MUST add one count to the step-budget counter for each decision.
Scenario: Fixable, extended and flagged groups
- WHEN A test runs the stage job on a fixable group, a non-fixable group within the extension and a group over the hard ceiling.
- THEN The test asserts that the fixable check ran first and
devops_cli_roadmap_stage_step_budget_totalshows onefixed, oneextendedand oneflagged.
Requirement: Extension ceiling
The settings load MUST refuse a roadmap.stage.step_tokens_extension above CONST_ROADMAP_LIMIT_CEILING_FACTOR times its default with an error that names the setting.
Scenario: Extension above the ceiling
- WHEN A test loads the settings with
DEVOPS_CLI_ROADMAP_STAGE_STEP_TOKENS_EXTENSIONset to one token aboveCONST_ROADMAP_LIMIT_CEILING_FACTORtimes the default. - THEN The test asserts that the load fails with an error that names
roadmap.stage.step_tokens_extension.
Requirement: Plan check bounds the extension
The plan check MUST refuse an x-step-budget-extension entry above roadmap.stage.step_tokens_extension.
Scenario: Extension entry above the setting
- WHEN A test runs the plan check on a group of 65,069 tokens with an
x-step-budget-extensionentry of 16,001 tokens whileroadmap.stage.step_tokens_extensionis 16,000. - THEN The test asserts that the check reports the entry over the extension limit.
Requirement: Pending a person after the merge
After #6521 merges and a release ships, a person MUST run the stage job on #3655, #1858, #3742, #3907 and #4059 and MUST comment the result of each item.
Scenario: Live proof on the five items
- WHEN After chore(roadmap): hold incremental stage and implement work #6521 merges and a release ships, a person runs
devops roadmap stageon the five items. - THEN Each item stages with no owner question, or gets one owner question that names the hard ceiling of 80,000 tokens, and the comment gives the result of each item.
Existing Tool Considered
The alternatives check of 2026-11-23 records the verdict none and names no tool. See the alternatives block in the issue body for what it lacks. The change builds its own code: about 40,000 tokens to build, about 8,000 tokens for each of 2 fixes, and about 2 days elapsed.
Key questions
- What is the hard ceiling for a task group over the step budget, and how much may the extension add?: Add
roadmap.stage.step_tokens_extension, default 16,000 tokens. The hard ceiling isroadmap.stage.step_tokensplus the extension, 80,000 at the defaults. The settings load refuses an extension aboveCONST_ROADMAP_LIMIT_CEILING_FACTORtimes its default with an error that names the setting. (best practice) [sources: src/devops_cli/config/settings.py:1452, src/devops_cli/config/constants.py:3756, src/devops_cli/roadmap/stage/stage.py:2573]- Chosen: A fixed extension setting. The project caps each limit with
CONST_ROADMAP_LIMIT_CEILING_FACTORtimes its default. 16,000 covers the five items. - Rejected: Four times the step budget. 256,000 tokens hides a bad plan and is not a little over the budget.
- Rejected: A percentage with no setting. The project holds each cap as a setting with a ceiling.
- Chosen: A fixed extension setting. The project caps each limit with
- How does the plan record the extension so the CI Plan Check measures the task group with the same limit?: The stage job writes a tool-specific
x-step-budget-extensionlist into the change folder's.openspec.yaml. Each entry gives the group title and the token allowance. The plan check reads the list from the checkout at the pull request head and adds the allowance to the step budget of the named group only. (best practice) [sources: src/devops_cli/roadmap/plan_check.py:647, src/devops_cli/roadmap/stage/stage_change.py, docs/adr/0010-openspec-is-the-spec-and-change-proposal-layer.md]- Chosen: A tool-specific key in
.openspec.yaml. The metadata file travels with the plan, the plan check reads it at the head, and ADR 0010 accepts a tool-specificx-key. - Rejected: A hidden line in
tasks.md.tasks.mdis the rendered task file, not the metadata file, and a later edit can drop the record. - Rejected: Raise the global setting for the item. It changes the limit for every item and breaks the plan check of other items.
- Rejected: Read the item job record in the plan check. The plan check runs in CI and does not read the item's marks.
- Chosen: A tool-specific key in
- Where does the fixable check come from?: A rule makes a group fixable when it names more than one file and no single file alone is over the step budget. The stage asks the model for one more split for a fixable group. A group with one file, or with one file alone over the budget, is not fixable and gets the extension. (best practice) [sources: src/devops_cli/roadmap/stage/stage.py:2716, src/devops_cli/roadmap/stage/stage_change.py:143]
- Chosen: A rule in the stage job. A split moves files. A group with one file cannot become smaller. The rule needs no model call.
- Rejected: Wait for feat(roadmap): run a fixable check before a decision point refuses #5840. The body lists feat(roadmap): run a fixable check before a decision point refuses #5840 as related, not as a dependency. The rule is small.
- Rejected: A model call. A model call costs tokens and can refuse a fixable group.
- What counter records each budget decision?: A Prometheus counter
devops_cli_roadmap_stage_step_budget_totalwith a closedresultlabel:fixed,extendedandflagged. Each decision adds one. The counter sits beside the existing stage counters and is described indocs/TELEMETRY.md. (best practice) [sources: src/devops_cli/roadmap/stage/stage.py:4071, docs/TELEMETRY.md]- Chosen: A counter with a closed
resultlabel. The label set is bounded and each decision adds one. - Rejected: A log line only. The project counts each decision for the dashboard.
- Rejected: A gauge. A gauge shows a level, not a count of decisions.
- Chosen: A counter with a closed
- Does the rule-based extension need feat(roadmap): add the soft-cap and fix-check chain to decision points #4847 done first?: No. The rule ships as the stage job's behavior now: it grants the bounded extension and needs no model call. Registering the decision point
stage.step_budgetwaits for the soft-cap chain of feat(roadmap): add the soft-cap and fix-check chain to decision points #4847 and for a row in the catalogue of ADR 0020. feat(roadmap): add the soft-cap and fix-check chain to decision points #4847 later adds the point and turns it on. (best practice) [sources: docs/adr/0020-a-decision-point-is-a-unit-of-a-workflow-with-a-resolver-chain-and-a-rule-goes-before-a-decision-model.md, src/devops_cli/roadmap/decision_table.py:22, src/devops_cli/roadmap/stage/stage.py:2716]- Chosen: Build the rule now, register the point in feat(roadmap): add the soft-cap and fix-check chain to decision points #4847. The rule needs no model call and the body permits it. ADR 0020 starts a new point in
shadowuntil a person turns it on, so the point cannot grant the extension in this issue. - Rejected: Register
stage.step_budgetnow inon. ADR 0020 starts a new point inshadow, its catalogue holds nostage.step_budgetrow, and the modeonneeds a cuts file in the repository. - Rejected: Wait for feat(roadmap): add the soft-cap and fix-check chain to decision points #4847. It leaves the five items blocked and the rule adds no model call.
- Chosen: Build the rule now, register the point in feat(roadmap): add the soft-cap and fix-check chain to decision points #4847. The rule needs no model call and the body permits it. ADR 0020 starts a new point in
Fit
Fits in one pull request.
Suspected block
None.
Activity
dan-petty commentedon Nov 19, 2026
Five Ready items have been blocked since 2026-11-12 and each needs a manual owner decision to unblock.Both address the stage hard-stopping items slightly over the step budget after one split, but #2838 targeted the 40,000-token era and is closed while the candidate targets the 64,000-token level.devops-cli-service commentedon Nov 19, 2026
Owner question: See the first point of Open questions in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence
dan-petty commentedon Nov 20, 2026
Frozen on 2026-11-20. The stage, implement and fix-checks jobs grade under 60%, so the owner rule asks for a re-architecture before more fixes inside the current design (tracker #6519). This item is incremental work on those jobs, so its Dependencies section now names #6521 first. Stage and implement leave this item while #6521 is open. When the experiments of #6519 decide, a person closes #6521 (this item can then continue) or closes this item as not planned.
devops-cli-service commentedon Nov 20, 2026
Owner question: See the first point of Open questions in the section Proposed design of the body.
Options
Recommendation: Decide the question: only a person can answer it.
Evidence
devops-cli-service commentedon Nov 20, 2026
Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies in the section Proposed design of the body.
devops-cli-service commentedon Nov 23, 2026
The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.
Searches (8)
Tools considered:
Searches run:
Sources:
devops-cli-service commentedon Nov 25, 2026
Next step: the open items close, or a person replies in a comment or edits the body. See Dependencies in the section Proposed design of the body.
dan-petty commentedon Nov 30, 2026
Triage under #6519 (owner instruction of 2026-11-30), before the hold #6521 closes. This item adds or extends a gate, refusal, screen, cap, limit, retry, result line, shell allowlist, tool catalog or plan-shape rule of the stage, implement or fix-checks job. #6519 found that 263 of about 900 issues in four weeks added such rules and none replaced the engine. Stage now runs on stock Coder (grade 60 on 30 graded attempts), where the agent reads the repository, runs the checks in its loop and has a real shell; implement follows (#6527). The code paths that this item names have also moved. If the failure class still shows in graded attempts, file a new item from that evidence. Closed as not planned; a person may reopen it.