Repository navigation
Description
Problem or Motivation
A task group names the files it reads, changes and creates in reads, changes and creates. It also names paths in the code spans of its task text. path_problems in src/devops_cli/roadmap/stage_paths.py checks each task path against the files of the staged commit and against the creates of the groups. It does not check that the path is in the group's own reads, changes or creates.
A task can therefore name a file that exists but that the group does not list. The rendered Impact omits the file, the implement step does not pack it, and every gate accepts the plan. This is the same gap that #3411 closes for What Changes, on the text of the tasks.
The plan of PR #3436 for #3411 is the case. Group 3 changes only tests/roadmap/test_roadmap_stage_eval_run.py, but its task adds a golden case (four fixture files) and updates tests/roadmap/test_roadmap_stage_eval_cases.py. The task names no fixture path in a code span, so path_problems sees no path to check. The group lists omit the files the task creates, and the verification would fail on the count test.
Proposed Solution & Architectural Design
In check_proposal, read each path in a code span of a group's task text with the shared code-span path rule, and refuse a path that the group lists in neither reads, changes nor creates. Accept a path under the change folder and the living spec folder, because the stage job writes the change and openspec archive writes the living spec. Accept a folder that holds a created path.
Add the message to RoadmapMessages in src/devops_cli/lang/en/messages.py and a case to tests/roadmap/test_roadmap_stage_content.py. The check reads the reply alone, and check_proposal holds the staged tree, so it makes no git call.
Target Subsystem
src/devops_cli/roadmap/stage_change.py, src/devops_cli/roadmap/stage_paths.py
Existing Tool Considered
path_problems already reads the code spans of the tasks, so the change extends that rule rather than builds a new parser. The cost is about 2k tokens to build, keep and fix, and 30 minutes.
Source: #3436
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)
Proposed design
Problem statement
A task group can name a file in its task text that the group lists in no reads, changes or creates field. The stage job then renders an Impact that omits the file and packs no file for the implement step. The change makes the stage proposal check refuse that task path.
Acceptance criteria
Requirement: Unlisted task path is refused
The stage proposal check SHALL refuse a path in a group's task code span when the group lists the path in neither reads, changes nor creates.
Scenario: Task names an existing file that the group omits
- WHEN A group names
tests/roadmap/test_roadmap_stage_eval_cases.pyin a task code span, and the same group lists that path in no group field. - THEN
check_proposalreturns a problem that names the group andtests/roadmap/test_roadmap_stage_eval_cases.py.
Requirement: Listed task path is accepted
The check SHALL accept a path in a group's task code span when the same group lists the path in reads, changes or creates.
Scenario: Task names a file that the group changes
- WHEN A group names
tests/roadmap/test_roadmap_stage_content.pyin a task code span and lists the same path inchanges. - THEN
check_proposalreturns no problem for that path.
Requirement: Write-folder task path is accepted
The check SHALL accept a task code-span path under openspec/changes/ or openspec/specs/ even when the group lists the path in no group field.
Scenario: Task names a change file and a living spec file
- WHEN A group names
openspec/changes/3446-the-stage-job-refuses-a-task-path/tasks.mdandopenspec/specs/roadmap-stage/spec.mdin task code spans. - THEN
check_proposalreturns no problem for either path.
Requirement: Folder of a created path is accepted
The check SHALL accept a task code-span folder when the same group lists a path under that folder in creates.
Scenario: Task names the folder of a created test
- WHEN A group lists
tests/roadmap/test_new_case.pyincreatesand namestests/roadmap/in a task code span. - THEN
check_proposalreturns no problem fortests/roadmap/.
Requirement: Refusal uses a roadmap message
The new refusal SHALL use a message field in RoadmapMessages in src/devops_cli/lang/en/messages.py.
Scenario: Unlisted task path produces the catalog message
- WHEN A group names an unlisted path in a task code span.
- THEN The returned problem is the
RoadmapMessagestext with the group and the path filled in.
Requirement: Held tree is used with no git call
The check SHALL use the staged tree that check_proposal holds and SHALL make no git call.
Scenario: Path check runs on a held tree
- WHEN
check_proposalchecks a proposal with a staged tree. - THEN The path check reads the tree and runs no
gitcommand.
Existing Tool Considered
No alternatives check has run. No open, maintained tool or library is known to cover this need. The change extends the existing path_problems and code_spans rule in src/devops_cli/roadmap/stage_paths.py; it builds no new parser. The written cost is about 2k tokens to build, keep and fix, and 30 minutes.
Key questions
- Where should the new rule live?: Extend
path_problemsinsrc/devops_cli/roadmap/stage_paths.py.check_proposalalready calls it and passes the staged tree. (best practice) [sources: src/devops_cli/roadmap/stage_paths.py, src/devops_cli/roadmap/stage_change.py]- Chosen: Extend
path_problems. It already reads the task code spans and receives theStagedTree. - Rejected: Add a separate loop in
check_proposal. It duplicates the path reading and the problem formatting.
- Chosen: Extend
- Which rule reads paths from the task text?: Use the shared
code_spansandStagedTree.paths_inrule insrc/devops_cli/roadmap/stage_paths.py. Do not add a new parser. (best practice) [sources: src/devops_cli/roadmap/stage_paths.py, src/devops_cli/roadmap/step_files.py]- Chosen: Shared code-span rule.
_namedalready reads the task code spans, andstep_files.code_spansis the one rule. - Rejected: New parser. It duplicates the shared rule and adds a second path grammar.
- Chosen: Shared code-span rule.
- Which paths must a group list for a task code-span path?: The same group must list the path in
reads,changesorcreates. Accept a path underopenspec/changes/oropenspec/specs/, and accept a folder that holds a path in the group'screates. (best practice) [sources: src/devops_cli/roadmap/stage_paths.py, CONTEXT.md, src/devops_cli/roadmap/stage_change.py]- Chosen: Own group's lists plus the two write folders. The implement step packs the files of the group, and the stage job or archive writes those folders.
- Rejected: Any earlier group's
creates. A task must name a file that its own step packs. - Rejected: Every group's lists. A later group does not pack the file for this step.
- Should the check make a git call?: No.
check_proposalholds the staged tree, so the check reads the reply and the tree only. (best practice) [sources: src/devops_cli/roadmap/stage_change.py, src/devops_cli/roadmap/stage_paths.py]- Chosen: Use the held
StagedTree. The tree is already at the staged commit. - Rejected: Run
git ls-filesin the check. It repeats a read that the caller already made.
- Chosen: Use the held
- Should the new refusal use the message catalog?: Yes. Add the message to
RoadmapMessagesinsrc/devops_cli/lang/en/messages.py. (best practice) [sources: src/devops_cli/lang/en/messages.py, tests/roadmap/test_roadmap_stage_content.py]- Chosen: Message field in
RoadmapMessages. The project keeps user-facing text in the catalog. - Rejected: Inline string in
stage_paths.py. It breaks the message catalog rule.
- Chosen: Message field in
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 4, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
featprefix of the title gives the type.(roadmap)scope of the title gives the scope.The gap lets invalid plans pass the stage gate, but it is one of several checks and does not block the pipeline.It catches a specific class of unlisted paths in task text, improving plan correctness.The body states about 2k tokens and 30 minutes of work, extending an existing code-span rule.Both validate that a path named in stage output is listed by a group, but #3411 targets the What Changes section and the candidate targets task text code spans.devops-cli-service commentedon Nov 4, 2026
Status set to Ready at 53cffca (see proposed design in issue body).
devops-cli-service commentedon Nov 4, 2026
Staged: branch
feat/3446-the-stage-job-refuses-a-task, draft pull request #3468. The pull request plans the item and closes no issue.The task groups, with the tokens of the inputs of each step, for a budget of 40000 tokens:
The plan run made 4 model request(s), and used 316716 input tokens and 21533 output tokens. The model made no tool call.
The stage job read the open pull requests and their files in 1 GraphQL request(s).
docs(openspec): name no folder path in What Changes of #3446
docs(openspec): plan #3446 refuse a task path that no group lists (#3468
devops-cli-service commentedon Nov 5, 2026
Stopped at group 1.
Failure class:
plan_defect.Action taken: none.
Action left:
wait: wait for a person.Reason:
Last message of the agent (a claim that no check verified): I found a defect in the plan of group 1. I applied the rule of task 1.2 in
stage_paths.pyandmessages.pyto measure it, then reverted both files. The working tree is clean and no task is ticked. The new refusal also reports task paths of existing test helpers and of one golden case, which the group's Changes list omits. Those files then fail:tests/roadmap/test_roadmap_stage_paths.py(67 failed, 8 passed),tests/roadmap/test_roadmap_stage_form.py(29 failed, 20 passed),tests/roadmap/test_roadmap_stage_plan.py(7 failed, 220 passed) andtests/roadmap/test_roadmap_stage_eval_gates.py(5 failed, 31 passed). The planned verification runs onlytests/roadmap/test_roadmap_stage_content.py, so it cannot see them. ```plan-request { "kind": "scope", "group": 1, "defect": "The group changes only stage_paths.py, messages.py and test_roadmap_stage_content.py. The new refusal also reports a task path of the sample group of three existing test modules and of one golden case plan, so those files must change in the same group: each helper group names a file in a task text and lists it in no field. The planned verification runs one test module and would not see them.", "evidence": "With the rule of task 1.2 applied to the three planned files:uv run devops ci test tests/roadmap/test_roadmap_stage_paths.pygives 67 failed and 8 passed; `uv run devops ci test tests/roadmap/test_roadmap_stage_form.py` gives 29 failed and 20 passed; `uv run devops ci test tests/roadmap/test_roadmThe item is Blocked, and the job will not run it. Fix the cause. Then comment
implement: retry. The Service clears the stop on its own when a new runner image rolls out, but only if a retry can fix the class of the stop and the limits ofroadmap.implement.digest_clears_per_classandroadmap.implement.digest_clears_per_itemallow it.devops-cli-service commentedon Nov 5, 2026
The runner Job devops-cli-runner-20261105-134432-1522 ended: succeeded.
Image digest: sha256:b2a52ba0a1f4efc4eebc6f29bd6b564892a59c122078c7bcdb0bc47d8746759a
The last lines of its log:
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.
dan-petty commentedon Nov 30, 2026
Triage under #6519 (owner instruction of 2026-11-30). This item adds or extends a hand-written gate, refusal, context block or plan-shape rule of the stage job. #6519 found that 263 of about 900 issues in four weeks added gates and none replaced the engine; stage now runs on stock Coder, where the agent reads the repository itself and runs the OpenSpec checks in its loop. 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.