Repository navigation
Description
What happened
On 2026-10-31 devops roadmap stage --plan leaves out four P1 bugs because one task group of each is over the budget of 40000 tokens:
- fix(security): the subprocess environment guard accepts LESS, which makes less run a program #2735: 41179 tokens (group "Add LESS to the refused environment patterns").
- fix(security): the subprocess environment guard accepts GH_TELEMETRY_ENDPOINT_URL, which sends gh telemetry to a caller URL #2739: 41463 tokens (group "Add data-egress constant and write failing test").
- fix(k8s): the volumes of grafana, the prometheus server and loki move off the control-plane node, and their placement exemptions go #2147: 42236 tokens (group "Add control-plane affinity to grafana-values.yaml").
- fix(security): the subprocess environment guard accepts the pytest and npm keys that make a child write a file #2747: 48286 tokens (group "Add PYTEST_ADDOPTS to the subprocess environment guard").
Each message says "A person decides, or runs the job with --item N". The three groups at 41 to 42 thousand tokens are over by 3% to 5%. Planner._fit in src/devops_cli/roadmap/stage.py asks the model for one split of the groups (self._split_asked). A group that is still over the budget after that split stops the item, and the job does not try again. The measure of a group is measure_groups in stage_change.py: the item and the change folder files (shared), the group text, and the packed files that the group reads and changes.
The four items wait for a person, so the stage job does not reach the default filter's goal: staging every Ready P0 and P1 bug.
What should happen
- The split is tried more than once. The second ask gets the measured tokens of the groups of the first split and the list of the files that make the most of them, so the model can move a file to another group or drop a read that the group does not need. The number of asks is a constant with a small value, and the job stops the item after the last one, as it does today.
- Before a new ask, check whether a group can shrink with no model call: a group that reads many files counts each file packed to at most
CONST_ROADMAP_IMPLEMENT_FILE_MAX_TOKENS. State in the proposal how many tokens the shared part (item body and change files) costs per group, and whether the shared part, which every group pays, is what keeps the groups over (for fix(security): the subprocess environment guard accepts LESS, which makes less run a program #2735 the item body carries a long refine block). - The four items stage without a person.
Evidence
uv run devops roadmap stage --planon 2026-10-31 (the Left out section).Planner._fitandmeasure_groups.- The owner decision of 2026-10-29: a step budget of 40000 tokens of inputs per group.
Acceptance criteria
- A group that is over the budget after the first split gets a second ask with the measured tokens, and a group that is within the budget after it ends the item staged. A test replays this with a scripted model.
- After the last ask, an item with a group over the budget stops as before, with the group named.
- The proposal states how many tokens the shared part of a group costs for fix(security): the subprocess environment guard accepts LESS, which makes less run a program #2735 and fix(security): the subprocess environment guard accepts GH_TELEMETRY_ENDPOINT_URL, which sends gh telemetry to a caller URL #2739.
-
devops roadmap stage --planlists at least three of the four items as stageable. -
uv run devops cipasses.
Proposed design
Problem statement
The stage job stops an item when a task group is over the 40000-token budget after one split ask. Groups that are 3% to 5% over the budget require a person to intervene. This blocks the default filter goal of staging every Ready P0 and P1 bug. Four items (#2735, #2739, #2147, #2747) wait for a person on 2026-10-31.
Acceptance criteria
Requirement: Second split ask
The job SHALL make a second split ask when a group is over the budget after the first split, providing the measured tokens and the top files by token count.
Scenario: Group over budget after first split
- WHEN A group measures over the budget after the first split ask
- THEN The job makes a second split ask with the measured tokens and the list of files that contribute the most tokens
Requirement: Stop after last ask
The job SHALL stop the item and name the group when a group is still over the budget after the last split ask.
Scenario: Group over budget after last ask
- WHEN A group measures over the budget after the last split ask
- THEN The job stops the item and the comment names the group and its token count
Requirement: Deterministic shrink check
The job SHALL check whether capping each file to CONST_ROADMAP_IMPLEMENT_FILE_MAX_TOKENS brings a group under the budget before making a new split ask.
Scenario: Group shrinks under cap
- WHEN A group is over the budget but capping its files to 3000 tokens each brings it under the budget
- THEN The job uses the capped measurement without a model call
Requirement: Shared part cost in proposal
The proposal SHALL state the token cost of the shared part (item body and change files) for each group.
Scenario: Proposal includes shared cost
- WHEN The job measures a group
- THEN The proposal output includes the shared part token count for that group
Requirement: Items stage without person
The job SHALL stage at least three of the four items (#2735, #2739, #2147, #2747) without a person deciding.
Scenario: Default filter stages items
- WHEN The job runs with the default filter on 2026-10-31 data
- THEN At least three of the four items appear in the ready list
Requirement: CI passes
The change SHALL pass uv run devops ci.
Scenario: CI check
- WHEN
uv run devops ciruns on the change - THEN All checks pass
Existing Tool Considered
No check has run. No open, maintained tool or library covers this need. The change modifies the existing split logic in src/devops_cli/roadmap/stage.py and the measurement in src/devops_cli/roadmap/stage_change.py. The cost is the tokens to build, keep and fix the multi-ask split loop and the deterministic shrink check in these two files.
Key questions
- How many split asks should the job make for one item?: Two. The constant CONST_ROADMAP_STAGE_SPLIT_ASKS is 2. The first ask is the current behavior. The second ask gets the measured tokens and the top files. After the second ask, the job stops the item as it does today. (best practice) [sources: src/devops_cli/roadmap/stage.py, src/devops_cli/config/constants.py]
- Rejected: One split ask (current). Rejected. It stops items that are 3% to 5% over the budget and requires a person.
- Rejected: Two split asks. Chosen. The second ask gets measured data and the top files, so the model can move a file or drop a read. The cost is one extra model call per item that needs it.
- Rejected: Three split asks. Rejected. The body says a small value. Two asks cover the 3% to 5% overage. A third ask adds cost with little gain.
- Should the job check for a deterministic shrink before each new split ask?: Yes. Before a new ask, the job caps each file in the group to CONST_ROADMAP_IMPLEMENT_FILE_MAX_TOKENS (3000 tokens) and re-measures. If the group is under the budget, the job uses the capped measurement and skips the ask. (best practice) [sources: src/devops_cli/config/constants.py:2985, src/devops_cli/roadmap/implement_step.py:284]
- Rejected: No shrink check. Rejected. It wastes a model call when a deterministic cap would fix the group.
- Rejected: Shrink check with file cap. Chosen. It is deterministic, costs no model call, and uses the existing constant that the implement job already applies.
- What is the shared part token cost for fix(security): the subprocess environment guard accepts LESS, which makes less run a program #2735 and fix(security): the subprocess environment guard accepts GH_TELEMETRY_ENDPOINT_URL, which sends gh telemetry to a caller URL #2739?: The shared part is the item body plus the change folder files. For fix(security): the subprocess environment guard accepts LESS, which makes less run a program #2735 the item body carries a long refine block. The exact token count is measured by the job at run time and stated in the proposal output. Refine must run the job to record the number. [sources: src/devops_cli/roadmap/stage.py, src/devops_cli/roadmap/stage_change.py:451]
- Should the second split ask include the list of files that contribute the most tokens?: Yes. The body states that the second ask gets the measured tokens of the groups and the list of the files that make the most of them, so the model can move a file to another group or drop a read. (best practice) [sources: src/devops_cli/roadmap/stage.py]
- Rejected: Tokens only. Rejected. The model cannot decide which file to move without knowing which files cost the most.
- Rejected: Tokens plus top files. Chosen. The body requests it. It lets the model move a file or drop a read that the group does not need.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Oct 31, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
fixprefix of the title gives the type.(roadmap)scope of the title gives the scope.devops-cli-service commentedon Oct 31, 2026
Status set to Ready at 506f769 (see proposed design in issue body).
devops-cli-service commentedon Oct 31, 2026
The stage job stopped. The inputs of the step of the task group "Add CONST_ROADMAP_STAGE_SPLIT_ASKS constant" hold 42879 tokens, over the budget of 40000 tokens, also after the model split the groups once. A person decides how to split the item. The job stages the item again when a person runs it with --item 2838.
The task groups:
dan-petty commentedon Oct 31, 2026
Evidence for the fix in pull request #2847. The pull request does not build the second split ask, and it replaces the first two acceptance criteria.
src/devops_cli/config/constants.pyas 38159 tokens. The implement step reads 1847 tokens of it. After a split, each new group that named this file still measured 41598 to 42242 tokens. A split moves files between groups and cannot make a file smaller, so a second ask fixes none of the four items.Reads:line) and skipped files that a task names. The pull request makes the measure count what the step reads.stage.file_capmakes them void, so the default plan takes them without a person.devops roadmap stage --planlists fix(k8s): the volumes of grafana, the prometheus server and loki move off the control-plane node, and their placement exemptions go #2147, fix(security): the subprocess environment guard accepts LESS, which makes less run a program #2735 and fix(security): the subprocess environment guard accepts GH_TELEMETRY_ENDPOINT_URL, which sends gh telemetry to a caller URL #2739 as stageable. The limit of 3 leaves fix(security): the subprocess environment guard accepts the pytest and npm keys that make a child write a file #2747 for the next round.chore(main): release 0.26.0 (#2837)