Repository navigation
Description
Problem
The move-reference gate of the stage job treats a plan as a move of a module when it is no move, and it asks a plan to edit files that nobody edits.
moved_modules in src/devops_cli/roadmap/stage/stage_change.py calls a Python module "moved" when a task group lists it in changes and the group creates any file (#3373). A group that changes stage_change.py and creates a test file is then a move. The job greps the whole staged commit for the path and the dotted name of each such module (_probe_references in src/devops_cli/roadmap/stage/stage.py). _move_reference_problems then refuses the plan for each hit that no group changes, with no regard for the kind of file.
Two kinds of hit can never be edited by a task group:
CHANGELOG.mdis written by release-please only (AGENTS.md; classtool-ownedinCONST_DOCS_INVENTORY).openspec/changes/**/*.mdare records of other changes (classrecordin the same inventory), and the plan rule says that no group edits a file of a change folder.
Evidence: the Service logs of the stage job (Loki, 7 days). Four items failed with this gate in 24 hours, with 2248 sentences of one shape. Items #3599, #3398, #3443 and #3592. Word for word, from #3599: "The move plan leaves out CHANGELOG.md. Add a task group that changes it or mark it unchanged with a reason. The move plan leaves out openspec/changes/3253-map-all-issue-requirements-to-a/proposal.md. Add a task group that changes it or mark it unchanged with a reason." The failure text of #3599 is 88 000 characters long. The model cannot answer 500 such sentences, so the item fails.
The paths gate counted 11.8 refusals in the last 6 hours.
Expected
- A group moves a module only when it creates the same module in another place: a created module of the same name, or a created module under the sub-package that the name prefix gives (
stage_probe.pytostage/probe.py). A group that changes a module and creates a test, a document or a module of another name moves nothing. - A hit in a file of class
tool-ownedorrecordinCONST_DOCS_INVENTORYneeds no task group and nounchangedentry. - Any other hit (a caller, a test, a hand-written document) still needs a task group or an
unchangedentry with a reason.
Acceptance criteria
-
uv run devops ci test tests/roadmap/stage/test_roadmap_stage_move_references.pypasses. It fails on the base. -
uv run devops roadmap eval stage --replaykeeps its result: every gate refuses what it must refuse, and 5 of 5 good plans pass. The case3412-a-move-plan-leaves-a-test-referencestill refuses.
Existing tool considered
explicit_classes of src/devops_cli/docs/inventory.py already classes the files, and PurePosixPath.full_match reads the globs. The change adds no parser. Cost: about 25 000 tokens to build, 3 000 to keep, and 1 hour.
Proposed design
Problem statement
The move-reference gate of the stage job treats a plan as a move of a module when it is no move. It then asks a plan to edit files that no task group can edit: CHANGELOG.md and files in openspec/changes. This makes the failure text very long, and the item fails.
Acceptance criteria
Requirement: A move needs a created module of the same place
The function moved_modules SHALL report a module as moved only when the same group creates a module of the same name, or a module under the sub-package that the name prefix gives.
Scenario: A group changes a module and creates a test
- WHEN A group lists src/devops_cli/roadmap/stage/stage_change.py in changes and creates tests/roadmap/stage/test_roadmap_stage_move_references.py
- THEN moved_modules returns an empty list for that group.
Requirement: A real move is still found
The function moved_modules SHALL report a module as moved when a group creates the module under the sub-package that its name prefix gives.
Scenario: A prefix move
- WHEN A group changes src/devops_cli/roadmap/stage_probe.py and creates src/devops_cli/roadmap/stage/probe.py
- THEN moved_modules returns the old path and the dotted name of stage_probe.
Requirement: A same-name move is found
The function moved_modules SHALL report a module as moved when the group creates a module of the same name in another folder.
Scenario: Same name in another folder
- WHEN A group changes src/devops_cli/a/foo.py and creates src/devops_cli/b/foo.py
- THEN moved_modules returns the old path of foo.py.
Requirement: Tool-owned and record files need no group
The function _move_reference_problems SHALL NOT refuse a reference hit in a file of class tool-owned or record in CONST_DOCS_INVENTORY.
Scenario: Hits in CHANGELOG.md and a change folder
- WHEN The references list CHANGELOG.md and openspec/changes/3253-map-all-issue-requirements-to-a/proposal.md and no group changes them
- THEN _move_reference_problems returns no problem.
Requirement: Other hits still need a group or an unchanged entry
The function _move_reference_problems MUST refuse a reference hit in any other file that no group changes and no unchanged entry covers.
Scenario: A caller is left out
- WHEN The references list a caller module and a test that no group changes
- THEN _move_reference_problems returns one problem for each of these paths.
Requirement: The replay keeps its result
The replay of the stage eval SHALL keep every gate refusal and pass 5 of 5 good plans, and the case 3412-a-move-plan-leaves-a-test-reference MUST still refuse.
Scenario: Replay of the golden set
- WHEN uv run devops roadmap eval stage --replay runs after the change
- THEN The result equals the result before the change and the case 3412 still refuses.
Existing Tool Considered
The inventory function explicit_classes in src/devops_cli/docs/inventory.py already classes the files, and PurePosixPath.full_match reads the globs. The change adds no parser and no new dependency. It builds a small filter in stage_change.py. Cost of this own code: about 25000 tokens to build, 3000 tokens to keep, and 1 hour of elapsed time.
Key questions
- Which files may a move plan skip without a task group or an unchanged entry?: Files of class tool-owned or record in CONST_DOCS_INVENTORY: CHANGELOG.md and openspec/changes/**/*.md. The gate reads the class from the existing inventory and does not keep its own list. (best practice) [sources: src/devops_cli/docs/inventory.py, src/devops_cli/config/constants.py]
- Chosen: Reuse the class of CONST_DOCS_INVENTORY through explicit_classes. The body names this inventory as the single source and it adds no second list.
- Rejected: Hard-code CHANGELOG.md and openspec/changes in the gate. A second list can drift from the inventory.
- Where does the gate learn that a file is tool-owned or record?: The function _move_reference_problems in stage_change.py filters the hits with the inventory class before it builds problems. The probe in stage.py stays as it is. [sources: src/devops_cli/roadmap/stage/stage_change.py, src/devops_cli/roadmap/stage/stage.py, src/devops_cli/docs/inventory.py]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 9, 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.Four items failed in 24 hours with 2248 sentences of refusal text, blocking active work.The gate blocks valid plans from passing CI, stalling multiple items.The body states about 25 000 tokens to build and 1 hour of work.Both work on the move-reference gate in stage_change.py and stage.py; #3373 adds the gate, this candidate fixes its false move detection and skips tool-owned and record files.devops-cli-service commentedon Nov 10, 2026
Status set to Ready at 6c1a629 (see proposed design in issue body).
fix(roadmap): a move plan leaves out files of a tool
fix(roadmap): a move plan leaves out files of a tool
fix(roadmap): a move plan leaves out files of a tool
devops-cli-service commentedon Nov 10, 2026
Released in v0.103.3: https://github.com/dan-petty/devops-cli/releases/tag/v0.103.3
devops-cli-service commentedon Nov 10, 2026
Live since 2026-11-10 01:54 UTC