Repository navigation
Description
Problem or Motivation
The stage check accepts a group whose verify command runs a test module that does not read the file the group changes. The command passes on the base, so it proves nothing about the change.
The plan of PR #3408 (for #3405) is an example. Group 2 changes src/devops_cli/ai/tasks/roadmap_stage_verify.md and gives the command uv run devops ci test tests/roadmap/test_roadmap_stage_task_verification.py. That test module parses tasks.md and never reads the verification prompt. form_problems checks only the form of the command and the path of a new test. It does not check that the command names a test the group changes or reads.
The issue is broader than the planner prompts in #3347: a plan can point any changed file at a test module that does not exercise it.
Proposed Solution & Architectural Design
- In
form_problemsinsrc/devops_cli/roadmap/stage_form.py, read eachverifycommand that runs a test module, such asuv run devops ci test <path>. When the path is not in the group'schanges,createsorreads, return a problem that names the group, the command and the test module. - Accept a command that runs no test module, such as
uv run devops ci docsor! git grep -n <name> src/ tests/. The rule judges only a command that names a test. - Add a case to
tests/roadmap/test_roadmap_stage_form.pyfor a group that runs a test it does not name, and one for a group that names the test inreads.
Evidence
The plan of PR #3408 group 2:
- Changes:
src/devops_cli/ai/tasks/roadmap_stage_verify.md,tests/roadmap/test_roadmap_stage_verify.py. - Verify:
uv run devops ci test tests/roadmap/test_roadmap_stage_task_verification.py.
tests/roadmap/test_roadmap_stage_task_verification.py builds a StageGroup, renders tasks.md, and parses it. It loads no prompt. The check uv run devops ci test tests/roadmap/test_roadmap_stage_task_verification.py passes with no edit to the prompt.
Target Subsystem
src/devops_cli/roadmap/stage_form.py (form_problems), src/devops_cli/lang/en/messages.py, tests/roadmap/test_roadmap_stage_form.py.
Existing Tool Considered
No open, maintained tool checks that a test command exercises the file a plan changes. The check extends the existing form_problems rule set, which already parses each verify command.
Estimated cost: about 3,000 tokens to build, about 1,000 tokens per year to keep and fix, and about 2 hours elapsed.
Source: PR #3408
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
The stage form check accepts a group whose verify command runs a test module that the group does not change, create or read. The command can pass on the base and prove nothing about the change. The check must refuse such a command and accept commands that run no test module.
Acceptance criteria
Requirement: Unnamed test module is refused
form_problems SHALL return a problem when a group's verify command runs a test module that the group does not name in changes, creates or reads.
Scenario: Unnamed test module
- WHEN Group 1 changes
src/devops_cli/ai/tasks/roadmap_stage_verify.mdandtests/roadmap/test_roadmap_stage_verify.py, and itsverifycommand runstests/roadmap/test_roadmap_stage_task_verification.py. - THEN
form_problemsreturns one problem that names group 1, the command andtests/roadmap/test_roadmap_stage_task_verification.py.
Requirement: Test module in reads is accepted
form_problems SHALL accept a verify command whose test module is in the group's reads.
Scenario: Read test module
- WHEN Group 1 reads
tests/roadmap/test_roadmap_stage_form.pyand itsverifycommand runs that module. - THEN
form_problemsreturns no problem.
Requirement: Test module in changes is accepted
form_problems SHALL accept a verify command whose test module is in the group's changes.
Scenario: Changed test module
- WHEN Group 1 changes
tests/roadmap/test_roadmap_stage_form.pyand itsverifycommand runs that module. - THEN
form_problemsreturns no problem.
Requirement: Test module in creates is accepted
form_problems SHALL accept a verify command whose test module is in the group's creates.
Scenario: Created test module
- WHEN Group 1 creates
tests/roadmap/test_roadmap_stage_form.pyand itsverifycommand runs that module. - THEN
form_problemsreturns no problem.
Requirement: Command with no test module is accepted
form_problems SHALL not judge a verify command that runs no test module.
Scenario: Documentation and search commands
- WHEN Group 1 gives
uv run devops ci docsor! git grep -n -w unused_probe src/ tests/as itsverifycommand. - THEN
form_problemsreturns no problem.
Requirement: Each unnamed test module is refused
form_problems SHALL return one problem for each test module in a verify command that the group does not name.
Scenario: Two unnamed test modules
- WHEN Group 1's
verifycommand runs two test modules that the group does not name. - THEN
form_problemsreturns two problems, one for each module.
Requirement: Tests cover the new rule
tests/roadmap/test_roadmap_stage_form.py SHALL cover an unnamed test module and a test module named in reads.
Scenario: Stage form tests
- WHEN The roadmap stage form tests run.
- THEN Both cases pass and assert the problem and the no-problem result.
Existing Tool Considered
No alternatives check has run. The body reports that no open, maintained tool checks whether a test command exercises the file a plan changes. The change extends the existing form_problems rule. Written cost: about 3,000 tokens to build, about 1,000 tokens per year to keep and fix, and about 2 hours elapsed.
Key questions
- Which existing helper should identify a test module in a
verifycommand?: Use_is_test_moduleon each path argument of the command. It requires a path undertests/with suffix.pyand a name that startstest_. (best practice) [sources: src/devops_cli/roadmap/stage_form.py, tests/roadmap/test_roadmap_stage_form.py]- Chosen: Reuse
_is_test_module. It is the existing rule for a test module and keeps one definition. - Rejected: Match
tests/**/test_*.pywith a new regular expression. It duplicates the helper and can drift from it. - Rejected: Judge every path under
tests/. A fixture or helper undertests/is not a test module.
- Chosen: Reuse
- Which fields of the group allow a
verifycommand to run a test module?: The group's ownchanges,createsandreads. A path in another group does not count. [sources: src/devops_cli/roadmap/stage_change.py, tests/roadmap/test_roadmap_stage_form.py] - Where should the new problem text live?: Add a
RoadmapMessagesentry insrc/devops_cli/lang/en/messages.py. Format it inform_problemswith the group number, the command and the test module. (best practice) [sources: src/devops_cli/lang/en/messages.py, src/devops_cli/roadmap/stage_form.py]- Chosen: New
RoadmapMessagesentry. The stage form problems already use the message catalog. - Rejected: Inline text in
stage_form.py. It breaks the catalog pattern and makes the text hard to test.
- Chosen: New
- Should the check judge a command that runs no test module?: No. Judge only a command that runs
uv run devops ci testwith at least one test module. A documentation command and a negative search pass. (best practice) [sources: src/devops_cli/roadmap/stage_form.py, tests/roadmap/test_roadmap_stage_form.py]- Chosen: Judge only test commands. The issue limits the rule to a command that names a test.
- Rejected: Judge every
verifycommand. It would refuse valid documentation and search checks.
- Should the check judge every test-module path in a command?: Yes. Judge each path argument that
_is_test_moduleaccepts. Return one problem for each unnamed module. (best practice) [sources: src/devops_cli/roadmap/stage_form.py, tests/roadmap/test_roadmap_stage_form.py]- Chosen: Judge each path. A command can run more than one test module, and each must be named.
- Rejected: Judge only the first path. It misses unnamed modules after the first.
- Rejected: Judge the whole command as one path. It cannot name the module that is missing.
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.
fixprefix of the title gives the type.(roadmap)scope of the title gives the scope.A validation gap that lets weak plans pass, but manual review can still catch them.Catches a class of incorrect test references in stage plans.A path comparison in form_problems plus one test case, estimated at about 2 hours.Both require a verify command to name a test relevant to the changed file; #3347 limits the rule to prompt files, the candidate generalizes it to any changed file.devops-cli-service commentedon Nov 4, 2026
Status set to Ready at 89682e4 (see proposed design in issue body).
devops-cli-service commentedon Nov 4, 2026
Staged: branch
fix/3427-refuse-a-group-verify-that-runs, draft pull request #3440. 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:
A model review of the plan found these points. They stop no draft, and a person judges them:
otherat group 2: The plan says the golden set staged plans keep a verify command that names a module of their own group. Group 2 changes no fixture file, and the task_verification test reads the golden set fixtures through form_problems. A fixture plan that runs an unnamed module would fail under the new rule, and no task fixes it. Evidence: "The staged plans that the golden set and the sample builder give keep averifycommand that names a module of their own group."The plan run made 2 model request(s), and used 153955 input tokens and 9586 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): correct the plan for #3427
docs(openspec): plan #3427 Refuse a verify that runs an unnamed test (#…
10 remaining items
devops-cli-service commentedon Nov 5, 2026
Cleared the stop at group 1 by the rule
digest: the runner image changed since the stop, from sha256:66a9160699d0c0b2f00a5118abea1fd606ce11d1ffb6f624ac412f0354abe10e to sha256:3e20abf5974c5e90a219f2770e6d312b0b2c1fa67d920df7822d8be80b86c1d7, and the classproviderof the stop is one that a new attempt can fix. The item is Planned again, and the Service takes it in the next round. The Service clears at most 1 for each class and 3 for each item by digest. A stop of another class, a new stop on this image, and a stop over a limit wait for a commentimplement: retry.devops-cli-service commentedon Nov 5, 2026
Stopped at group 1.
Failure class:
limit_reached.Action taken: none.
Action left:
raise_limit: raise the limit that the run went over.Reason:
Last message of the agent (a claim that no check verified): Now I'll write the failing test first(task 1.1), plus the helper changes the new rule needs.
The job discarded this work. Read it before you retry:
The 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-045827-d563 ended: succeeded.
Image digest: sha256:3e20abf5974c5e90a219f2770e6d312b0b2c1fa67d920df7822d8be80b86c1d7
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 or implement 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 (for example
src/devops_cli/roadmap/stage/stage_change.py). If the failure class still shows in graded attempts (plan_defect), file a new item from that evidence. Closed as not planned.