Repository navigation
Description
Problem
The devops roadmap stage job measures task groups with measure_groups. But it does not check if a group changes existing files and packs no file.
Because stage omits this check, it pushes plan pull requests that fail CI Plan Check immediately with group-no-files. For example, pull request #3928 had task groups 3 and 7 that packed no files from the head commit. The stage job accepted the plan, but CI failed.
Expected
The function _settle in src/devops_cli/roadmap/stage/stage.py checks group-no-files with the same logic as plan_check._size_problems. When a group packs no files, _settle returns _Refused with texts.plan_check_group_no_files to the planner model during the revision loop.
Acceptance criteria
- The stage job checks each task group for
group-no-filesduring proposal validation. - A plan with a task group that changes existing files and packs no file is refused during staging.
- Tests prove that
_settlerejects a plan withgroup-no-filesbefore opening a pull request.
Existing tool considered
The existing function measure_groups and plan_check._size_problems already implement the check. No external library is needed.
Related
Proposed design
Problem statement
The stage job measures each task group but accepts a group that changes existing files and packs no file. It can then open a plan pull request that CI Plan Check rejects with group-no-files. The fix makes _settle apply the same check during staging and return the plan to the planner before any draft opens.
Acceptance criteria
Requirement: Stage refuses an empty packed group
The stage job SHALL refuse a task group that changes an existing file and packs no file before it opens a draft pull request.
Scenario: A group changes an existing file and packs no file
- WHEN
_settlereceives a plan whose group changes a file that exists at the staged commit and whose packed files are empty. - THEN
_settlereturns_Refusedwithtexts.plan_check_group_no_files.
Requirement: Stage check matches plan check
The stage job MUST use the same group-no-files logic as plan_check._size_problems.
Scenario: Both checks agree on an empty packed group
- WHEN A plan contains a group that
plan_check._size_problemsreports asgroup-no-files. - THEN
_settlerefuses the plan with the same problem text.
Requirement: Second refusal stops the item
The stage job SHALL return the group-no-files problem to the planner once and SHALL stop the item on a second refusal.
Scenario: The planner repeats the empty packed group
- WHEN The planner returns a second plan with the same
group-no-filesdefect. - THEN The stage job raises
RoadmapStageErrorand opens no draft pull request.
Requirement: Test proves no pull request opens
The change MUST add a test that proves _settle rejects a plan with group-no-files before _open_pull runs.
Scenario: The test observes the refusal
- WHEN The test calls
_settlewith a plan that changes an existing file and packs no file. - THEN The test observes
_Refusedwithtexts.plan_check_group_no_filesand no call to_open_pull.
Existing Tool Considered
No alternatives check has run. No open, maintained external tool or library covers this internal stage-validation need; the project already holds measure_groups and plan_check._size_problems. The change adds a call and tests, about 1,500 tokens and about 1 hour to build, keep and fix, with no external dependency.
Key questions
- Where does the stage job apply the
group-no-filescheck?: In_Planner._settle, after_fitmeasures the final groups and before_plan_bodyor_open_pull. The check returns_Refusedwithtexts.plan_check_group_no_files. (best practice) [sources: src/devops_cli/roadmap/stage/stage.py, src/devops_cli/roadmap/plan_check.py, docs/roadmap/plan-check.md:31]- Chosen: Check in
_Planner._settle._settleholds the final groups and the existing_Refusedreturn path. - Rejected: Check in the
StageProposalschema validator. The schema has no staged commit or packed-file measurement. - Rejected: Leave the check to CI
Plan Check. The stage job then opens a draft that CI rejects, which is the reported defect.
- Chosen: Check in
- Should the stage job reuse the plan-check rule or copy it?: Reuse the
plan_check._size_problemslogic through one shared helper or call. Do not copy the rule intostage.py. (best practice) [sources: src/devops_cli/roadmap/plan_check.py, src/devops_cli/roadmap/stage/stage.py]- Chosen: Reuse the plan-check logic. The issue states that
plan_check._size_problemsalready implements the check. - Rejected: Copy the rule into
stage.py. A copy lets the stage and CI rules diverge.
- Chosen: Reuse the plan-check logic. The issue states that
- Which groups does the stage check judge after a split?: The final groups after
_fitmakes at most one split. The check does not judge the original groups. (best practice) [sources: openspec/changes/archive/2026-10-30-2772-stage-group-files/design.md:13, src/devops_cli/roadmap/stage/stage.py]- Chosen: Final groups after the split. The archived 2772 design says the check runs on the final groups.
- Rejected: Original groups before the split. A split can change which files a group packs.
- What does the stage job do after a second
group-no-filesrefusal?: It raisesRoadmapStageErrorand opens no draft pull request. The first refusal returns the problem to the planner once. [sources: src/devops_cli/roadmap/stage/stage.py]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Alternatives check of 2026-11-09: none.
Tool: none found.
Activity
dan-petty commentedon Nov 7, 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.The defect wastes CI runs but the plan-check gate still catches the error before merge.It prevents draft pull requests that fail immediately, saving reviewer time and CI cost.The check already exists in plan_check._size_problems; only wiring it into _settle and adding a test is needed.the _settle function in stage.py checks group-no-files and refuses the plan when a task group packs no filesas the change that both ask for.Both items ask _settle in stage.py to check group-no-files and refuse the plan before opening a draft pull request.A person closes one of the two if that is so.devops-cli-service commentedon Nov 8, 2026
Status set to Ready at 1f03ee3 (see proposed design in issue body).
devops-cli-service commentedon Nov 9, 2026
Alternatives check: none
Reason: The search found no external tool for this need. It is an internal check in the project's own stage job, and the issue says the existing
measure_groupsandplan_check._size_problemsalready hold the logic. The fix only wires that logic into_settle.Tool: none found
Lacks:
Searches run:
Checked on 2026-11-09. A person decides what this means for the item. The check changes no label and closes no issue.
feat(roadmap): run the plan checks before the stage push (#5416)
dan-petty commentedon Nov 13, 2026
Closed as superseded by #5416 (
feat(roadmap): run the plan checks before the stage push, release v0.129.0, live on the roadmap Service since 2026-11-13 14:23Z).The stage job now runs all the rules of
devops roadmap plan-checkon the files that it writes, before the push (_file_findingsand_plan_checkinsrc/devops_cli/roadmap/stage/stage.py). The rulegroup-no-filesis one of these rules. A plan that a rule refuses goes back to the planner model, as a refusal of any other gate does. So the stage job no longer pushes a plan that CIPlan Checkrefuses forgroup-no-files.If a plan PR from the stage job fails
Plan Checkwithgroup-no-filesafter v0.129.0, file a new bug and link that PR.