Repository navigation
Description
What happened
About 8 of 37 plans order their groups so that the test of group N needs code that only a later group makes: #2975 (the ratchet test breaks between groups 1-7 and 8), #2996, #2997 (group 1 needs code from group 2), #2999, #2857, #2980, #2971 and #2958. The prompt says "write groups in the order of the work" and nothing checks it.
What should happen
check_proposal refuses a plan where group N names, in reads or a task code span, a path that only a later group creates.
Acceptance criteria
- A test with a plan in the shape of docs(openspec): plan #2554 Pull sandbox image before deploy #2996 is refused with a problem text that names both groups.
- A plan whose groups create what they read passes.
Source
An evaluation on 2026-11-01 of the 37 docs(openspec): plan #N pull requests (35 merged, 2 open) found 34 that need fixes and 1 to reject. The per-PR reviews are in the comments of tracker #3005's thread and in .data/agent/scratch/plan-review.json of the owner's workstation. Related: #3005 (the kind of a task group: test for behavior, a repeatable check for other changes).
Proposed design
Problem statement
The stage job must refuse a plan where a group reads a path that only a later group creates. About 8 of 37 recent plans have this ordering defect. The check was implemented in #3010 (archived 2026-11-01) as the function path_problems(groups, tree), which validates that every path in reads, changes, task code spans, and verify either exists at the commit or is created by a group at or before the current one. The remaining work is to confirm the check covers the cases listed in this issue and to add the test cases that name both the reading group and the creating group in the problem text.
Acceptance criteria
Requirement: Refuse forward-read plan
The stage job SHALL refuse a plan where group N names a path in reads or a task code span that only a later group M creates, and the problem text SHALL name both group N and group M.
Scenario: Forward-read plan is refused
- WHEN A plan has group 1 reading a path that only group 3 creates
- THEN check_proposal returns a problem that names group 1 and group 3
Requirement: Accept correctly ordered plan
The stage job SHALL accept a plan where every group reads only paths that exist at the commit or are created by an earlier or the same group.
Scenario: Correctly ordered plan passes
- WHEN A plan has group 1 creating path A and group 2 reading path A
- THEN check_proposal returns no path problem for that plan
Existing Tool Considered
No open, maintained tool covers this project-specific validation of plan group ordering. The project builds the check in its own check_proposal function. #3010 (archived) already implements path_problems(groups, tree) for this exact rule. The written cost is one small pure function, two test cases, and the maintenance of the validation logic until it matches the plan format. The cost is already paid by #3010.
Key questions
- Does fix(roadmap): the stage job refuses a plan that names a path that does not exist #3010 already implement the check that this issue asks for?: Yes. fix(roadmap): the stage job refuses a plan that names a path that does not exist #3010 (archived 2026-11-01) adds
path_problems(groups, tree)tocheck_proposal. It checks that every path inreads,changes, task code spans, andverifyeither exists at the commit or is created by a group at or before the current one. This is the same rule this issue states. [sources: openspec/changes/archive/2026-11-01-3010-stage-refuses-missing-paths/proposal.md, openspec/changes/archive/2026-11-01-3010-stage-refuses-missing-paths/design.md] - Which function holds the check and where do the tests go?: The check is the pure function
path_problems(groups, tree)called fromcheck_proposal. Tests go in the existing test file for the stage module, alongside the tests added by fix(roadmap): the stage job refuses a plan that names a path that does not exist #3010. The test for this issue adds a plan shaped like docs(openspec): plan #2554 Pull sandbox image before deploy #2996 (group 1 reads a path that group 2 creates) and asserts the problem text names both groups. (best practice) [sources: openspec/changes/archive/2026-11-01-3010-stage-refuses-missing-paths/design.md]- Chosen: Add tests to the existing stage test file. fix(roadmap): the stage job refuses a plan that names a path that does not exist #3010 already added the check and its tests there. Adding the fix(roadmap): the stage job refuses a plan whose group reads a path that a later group creates #3017 cases beside them keeps the test suite coherent and avoids a new file.
- Rejected: Create a new test file for group-ordering checks. A separate file would split the tests for one function across two locations and add no clarity.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 1, 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 Nov 1, 2026
Status set to Ready at bf69f39 (see proposed design in issue body).
devops-cli-service commentedon Nov 2, 2026
Staged: branch
fix/3017-the-stage-job-refuses-a-plan, draft pull request #3179. 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 9 model request(s), and used 221002 input tokens and 4362 output tokens. The tool calls, in order:
search_code({"text":"path_problems"})search_code({"text":"def check_proposal"})read_file({"path":"src/devops_cli/roadmap/stage_paths.py"})read_file({"path":"tests/roadmap/test_roadmap_stage_paths.py"})read_file({"path":"tests/roadmap/test_roadmap_stage_paths.py","start_line":90})read_file({"path":"src/devops_cli/roadmap/stage_paths.py","start_line":80})search_code({"text":"stage_problem_path"})search_code({"text":"stage_path_places"})read_file({"path":"src/devops_cli/lang/en/messages.py","start_line":2770,"end_line":2820})read_file({"path":"src/devops_cli/roadmap/stage_change.py","start_line":270,"end_line":320})read_spec({"capability":"roadmap-stage"})read_file({"path":"openspec/changes/archive/2026-11-01-3010-stage-refuses-missing-paths/specs/roadmap-stage/spec.md"})read_spec({"capability":"roadmap-stage","requirement":"The plan names files that exist at the staged commit"})read_file({"path":"tests/roadmap/test_roadmap_stage_paths.py","start_line":200})search_code({"text":"def make_stage_proposal"})docs(openspec): archive the change of #3017
test(roadmap): replay the defects whose gates exist now (#3214)
docs(openspec): plan #3187 group the roadmap job modules in subpackag…