Repository navigation
Description
What happened
About 25 of 37 plans name files that do not exist on main (for example #2975 names src/devops_cli/commands/uv_cmd.py and tests/test_roadmap_dry_runs.py, #2979 names 13 test paths that do not exist, #2982 names 36 of 53 that do not). The issue bodies cite paths of an older audit commit, and #2830 moved the test files into mirror directories. The model copies the old paths and cannot list files.
missing_paths in src/devops_cli/roadmap/stage_change.py only adds a note to the stage comment ("A person checks that the plan names them right"). The draft still opens, the plan merges, and the implement Job stops at group 1. At least 12 issues are status/blocked for this reason.
missing_paths checks only the changes lists. It does not check the reads lists, the code spans in the tasks, or the paths in verify commands. named_files in step_files.py silently drops a code span that is not a file, so the budget measure and the implement step see nothing.
What should happen
- A path in
reads, in a task code span or in averifycommand that is not a file on the staged commit, and is not in thecreateslist of its group or an earlier group, is a problem of the reply.check_proposalsends the reply back to the model once, as it does for its other problems. The problem text lists the real paths with the same file name (git ls-files). - A second reply with a missing path stops the item (
RoadmapStageError) and opens no draft pull request. - A
changespath that does not exist and is not increatesis the same problem.
Acceptance criteria
- A reply that names
tests/test_scanner_tool_executor.pygets a problem that liststests/security/test_scanner_tool_executor.py. - A second reply with the same path stops the item, and no draft opens.
- The check covers
reads,changes, task code spans andverifypaths, and a path increatesof the same or an earlier group passes. - A test replays the plans of docs(openspec): plan #2260 add dry-run plans to 14 commands #2975 and docs(openspec): plan #2162 mutation cleanup of 18 test files #2979 and fails without the check.
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 accepts plans that name file paths that do not exist on main. About 25 of 37 plans cite paths from an older commit. The missing_paths check only adds a note to the stage comment. The draft still opens, the plan merges, and the implement job stops at group 1. At least 12 issues are blocked for this reason. The check also misses paths in reads, task code spans, and verify commands.
Acceptance criteria
Requirement: missing-path-in-reads-gets-suggestion
A reply that names a path in reads that does not exist on the staged commit SHALL produce a problem that lists the real paths with the same file name found by git ls-files.
Scenario: reply names a test file in the wrong directory
- WHEN A reply names tests/test_scanner_tool_executor.py in reads and that path does not exist on the staged commit
- THEN The problem text lists tests/security/test_scanner_tool_executor.py as the real path with the same file name
Requirement: second-reply-stops-item
A second reply that still names a missing path SHALL stop the item with RoadmapStageError and open no draft pull request.
Scenario: second reply has the same missing path
- WHEN The model's second reply still names a path that does not exist and is not in creates of its group or an earlier group
- THEN RoadmapStageError is raised and no draft pull request is opened
Requirement: check-covers-all-path-types
The path check SHALL cover reads, changes, task code spans, and verify paths, and a path in creates of the same group or an earlier group SHALL pass.
Scenario: path in creates of an earlier group passes
- WHEN A path appears in changes of group 2 and in creates of group 1
- THEN The path check does not report a problem for that path
Requirement: replay-known-plans
A test SHALL replay the plans of #2975 and #2979 and fail without the path check.
Scenario: replay plan 2975
- WHEN The test replays the plan of docs(openspec): plan #2260 add dry-run plans to 14 commands #2975 which names src/devops_cli/commands/uv_cmd.py
- THEN The path check reports a problem for that path
Existing Tool Considered
No open, maintained tool validates that the file paths in a structured staging plan exist on a git commit. The project builds this check in its own staging pipeline. The written cost is about 500 tokens to extend missing_paths in stage_change.py to cover reads, changes, task code spans, and verify paths, to add path extraction from free text, to integrate the check into the stage flow in stage.py as a blocking problem, and to add tests. The elapsed time is one working session.
Key questions
- Where does the path check live in the code?: Extend the existing missing_paths function in stage_change.py to cover all path types, and call it in the stage flow alongside check_proposal so its problems join the same retry loop. A second reply with missing paths raises RoadmapStageError. (best practice) [sources: src/devops_cli/roadmap/stage_change.py, src/devops_cli/roadmap/stage.py:629]
- Rejected: Add a root parameter to check_proposal. Rejected: check_proposal is a pure function with no I/O. Adding filesystem access changes its contract and makes it harder to test in isolation.
- Rejected: Extend missing_paths and call it in the stage flow. Chosen: missing_paths already exists and does the core check for changes. Extending it to cover reads, task code spans, and verify paths is the smallest change. The stage flow already has the retry loop for check_proposal problems, so the path problems join the same loop.
- Rejected: Create a new function check_paths. Rejected: it duplicates the logic of missing_paths. Extending the existing function is simpler and keeps one place for the path check.
- How does the check extract paths from task code spans and verify commands?: For task code spans, reuse the extraction logic in named_files from step_files.py, which already finds backtick-enclosed paths in task text. For verify, split the command by whitespace and select tokens that contain a slash or end with a file extension. A token is a path if it contains / and does not start with a dash. (best practice) [sources: src/devops_cli/roadmap/stage_change.py, src/devops_cli/roadmap/step_files.py]
- Rejected: Only check structured fields (reads, changes). Rejected: the issue explicitly requires covering task code spans and verify paths. Plans that name wrong paths in these fields are the main source of the 25 broken plans.
- Rejected: Reuse named_files for task text and a path heuristic for verify. Chosen: named_files already extracts code-span paths from task text. A simple heuristic (contains /, no leading dash) covers the verify command format. Both are consistent with the existing code.
- How does the problem text suggest the correct path?: Run git ls-files to list all tracked files, then filter by the basename of the missing path. The problem text lists each matching real path. (best practice) [sources: src/devops_cli/roadmap/stage_change.py]
- Rejected: Walk the filesystem. Rejected: it lists untracked files and is slower. git ls-files lists only tracked files, which is what the plan should reference.
- Rejected: Use git ls-files filtered by basename. Chosen: the issue body specifies git ls-files. It is fast, lists only tracked files, and the basename filter finds the real path with the same file name.
- Which creates lists make a path pass the check?: A path passes if it is in the creates list of its own group or any earlier group. A path that is only in the creates of a later group does not pass. This is stricter than the current missing_paths, which collects creates from all groups. (best practice) [sources: src/devops_cli/roadmap/stage_change.py]
- Rejected: Collect creates from all groups (current behavior). Rejected: a later group creating a file does not help an earlier group that references it. The issue says its group or an earlier group.
- Rejected: Collect creates from the same group and earlier groups only. Chosen: the issue body states its group or an earlier group. This is the correct semantics: a group can only reference files that exist or that it or a prior group creates.
- What is the retry mechanism for a missing path?: Use the existing retry loop in the stage flow. The first reply with missing paths gets the problems sent back to the model, as check_proposal does for its other problems. The second reply with missing paths raises RoadmapStageError. [sources: src/devops_cli/roadmap/stage.py:629, src/devops_cli/exceptions/roadmap.py:155]
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.At least 12 issues are blocked for this reason, so the defect halts the pipeline for many items.The fix unblocks 12 or more items and stops bad plans from merging.The change extends validation to four path sources, adds a retry loop, and requires replay tests against known plans.Both fix validation logic in the stage job, but #3005 stops the model from writing failing tests for codeless groups while the candidate stops plans that name paths that do not exist.devops-cli-service commentedon Nov 1, 2026
Status set to Ready at 1c20865 (see proposed design in issue body).
chore(main): release 0.37.2 (#3047)