Repository navigation
Description
Problem or Motivation
The stage plan accepts a task group whose work happens only if a change breaks a test. The group lists at least one path in changes, so form_problems and path_problems accept it. The implement step stages the checkout and stops with implement_stop_no_change ("The agent changed no file.") when no test breaks.
The plan of PR #3409 (for #3404) is the case. Group 3 is "Keep the roadmap stage tests green after the new problem". Its only task is "Run the whole roadmap suite after the rule lands, and fix a test of tests/roadmap/test_roadmap_stage_plan.py that a new problem of the sample plan now stops". No test in the repository changes src/devops_cli/roadmap/stage_change.py, so the group has no work. src/devops_cli/roadmap/implement_step.py returns _Failure(MESSAGES.roadmap.implement_stop_no_change) when _stage lists no path.
Proposed Solution & Architectural Design
- In
src/devops_cli/ai/tasks/roadmap_stage_change.md, state the rule: a group gives one exact change. The planner names the failing test that the change updates, or it plans no group. It never writes a group that fixes a test only if it breaks. - In
content_problemsinsrc/devops_cli/roadmap/stage_change.py, refuse anothergroup that changes only test paths and whoseimplementationnames no test function in a code span. The rule gives a deterministic reason for a group that cannot prove its change. - Add a case to
tests/roadmap/test_roadmap_stage_content.pyfor a conditional test-only group and one for a group that names the test function it updates.
Target Subsystem
src/devops_cli/roadmap/stage_change.py, src/devops_cli/ai/tasks/roadmap_stage_change.md, tests/roadmap/test_roadmap_stage_content.py
Existing Tool Considered
No open, maintained tool reads a plan task for a conditional. The stage check already reads the task texts, so the change extends content_problems. Estimated cost: about 3,000 tokens to build, about 1,000 tokens to keep and fix, about 2 hours.
Proposed design
Problem statement
The stage plan accepts a task group whose work happens only if a change breaks a test. The implement step then stages the checkout and stops with implement_stop_no_change when no test breaks. The change adds a deterministic content check and a prompt rule so a test-only group must name the test function that it updates.
Acceptance criteria
Requirement: Prompt rule for one exact change
The planner prompt SHALL state that a task group gives one exact change and names the failing test that it updates in a code span.
Scenario: Prompt states the test-only rule
- WHEN
load_task_promptreadsroadmap_stage_change.md. - THEN The prompt text holds the rule that a group gives one exact change, names the failing test in a code span, and plans no group that fixes a test only if it breaks.
Requirement: Refuse a test-only other group with no test function
The stage plan SHALL refuse an other task group that changes only paths under tests/ when its implementation names no test function in a code span.
Scenario: Conditional test-only group
- WHEN
content_problemsreads a proposal with anothergroup whosechangeslists onlytests/roadmap/test_sample.pyand whoseimplementationholds no code span with atest_function. - THEN The returned problems hold the refusal sentence for that group.
Requirement: Accept a test-only other group that names its test function
The stage plan SHALL accept an other task group that changes only paths under tests/ when its implementation names a test function in a code span.
Scenario: Named test function
- WHEN
content_problemsreads a proposal with anothergroup whosechangeslists onlytests/roadmap/test_sample.pyand whoseimplementationholds a code span withtest_conditional_group. - THEN The returned problems hold no refusal sentence for that group.
Requirement: Keep groups with non-test paths out of the rule
The stage plan SHALL apply the conditional test rule only when every path in changes starts with tests/.
Scenario: Group with a source path
- WHEN
content_problemsreads anothergroup whosechangesliststests/roadmap/test_sample.pyandsrc/devops_cli/sample.pyand whoseimplementationnames no test function. - THEN The returned problems hold no refusal sentence for that group.
Requirement: Refusal names the group
The refusal sentence for a conditional test-only group MUST name the title of that group.
Scenario: Refusal names the group
- WHEN
content_problemsrefuses anothergroup with the titleKeep the roadmap stage tests green. - THEN The returned sentence holds
Keep the roadmap stage tests green.
Existing Tool Considered
No alternatives check has run. No open, maintained tool reads a plan task for a conditional. The change extends content_problems: about 3,000 tokens to build, about 1,000 tokens to keep and fix, and about 2 hours.
Key questions
- Where does the conditional test rule belong?: It belongs in
content_problemsinsrc/devops_cli/roadmap/stage_change.py.check_proposaland the replay both call this function, so one rule judges the stage job and the replay. (best practice) [sources: src/devops_cli/roadmap/stage_change.py, src/devops_cli/roadmap/stage_eval_gates.py]- Chosen: Add the rule to
content_problems.check_proposaland the replay both call it, so the rule has one home and one test seam. - Rejected: Add the rule to
StageGroupschema validation. The schema cannot see the plan context, and the stage already sends content faults back to the model for one correction. - Rejected: Add the rule to
form_problems.form_problemsjudges the shape of task lines, not the meaning of a test-only group.
- Chosen: Add the rule to
- How does the check recognize a test function in a code span?: It reads each code span in
implementation. A span counts when its text istest_, or ends with::test_, with optional(). A span that holds only a test file path does not count. (best practice) [sources: src/devops_cli/ai/tasks/roadmap_stage_change.md, tests/roadmap/test_roadmap_stage_content.py]- Chosen: Accept
test_andpath::test_in a code span. It accepts the two exact forms a planner writes and refuses a file path alone. - Rejected: Accept any code span under
tests/. A test file path proves no test function, so a conditional group would pass. - Rejected: Accept any
test_word in the implementation. A word outside a code span is not the exact reference that the prompt asks for.
- Chosen: Accept
- Which groups does the new rule cover?: It covers an
othergroup whose every path inchangesstarts withtests/. A group with one path undersrc/,docs/or another directory keeps work outside tests and is not covered. (best practice) [sources: src/devops_cli/roadmap/stage_change.py]- Chosen: Cover only an
othergroup with allchangesundertests/. The rule targets a group that can only fix a test, and one non-test path gives the group real work. - Rejected: Cover any group with a path under
tests/. A behavior group with a test path has real source work, and the rule would refuse a valid group. - Rejected: Cover every
othergroup. A document or manifest group has no test function to name, so the rule would refuse valid work.
- Chosen: Cover only an
- What does the planner prompt state?: It states that a group gives one exact change. The planner names the failing test that the change updates in a code span, or it plans no group. It never writes a group that fixes a test only if it breaks. (best practice) [sources: src/devops_cli/ai/tasks/roadmap_stage_change.md]
- Chosen: Add the rule to
roadmap_stage_change.md. The stage change prompt is the planner's instruction for a new group. - Rejected: Add the rule to
roadmap_stage_split.mdtoo. A split divides an existing group and does not plan a new conditional group. - Rejected: Add no prompt rule and rely on the check. The model needs the rule before it writes the plan, so the check is not the first signal.
- Chosen: Add the rule to
- Does the refusal need a new message entry?: Yes. Add a
MESSAGES.roadmapentry for the refusal sentence and format it with the group title. The other content problems already read their sentences from that table. [sources: src/devops_cli/roadmap/stage_change.py, src/devops_cli/lang/en/messages.py] - How does the test suite prove the rule offline?: Add cases to
tests/roadmap/test_roadmap_stage_content.pythat callcontent_problemswith a test-onlyothergroup. One case gives no test function, and one case names the test function in a code span. (best practice) [sources: tests/roadmap/test_roadmap_stage_content.py]- Chosen: Test through
content_problems. The stage job and the replay both call it, so one test proves the shared rule. - Rejected: Test only through
check_proposal. The replay callscontent_problemsdirectly, so acheck_proposaltest alone leaves the replay path unproved. - Rejected: Test through a live stage run. The rule is deterministic text logic, and a live run adds cost and no new evidence.
- Chosen: Test through
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.The gap lets one class of invalid plans through but does not break a shipped feature.It closes a hole that lets a no-op group pass every stage gate.Three files change and the rule is bounded to one function in content_problems.Both extend content_problems to check test naming, but #3414 targets behavior groups that omit a test while the candidate targets test-only groups that must name the exact function.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/3433-refuse-a-plan-group-that-only, draft pull request #3441. 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:
criterion_droppedat specs and group 2: The issue lists a requirement that the prompt states the rule, with a scenario read throughload_task_prompt. The spec delta omits it. Group 2 has no test, and its verify command runs a prompt test that never checks the new rule. Evidence: "### Requirement: Prompt rule for one exact change"otherat decisions, group 1 implementation: The rule says a span counts when it ends with::test_. A real reference such astests/x.py::test_fooends with the function name, so it fails the rule. The stated reason says the path form must pass. The helper would refuse a valid group. Evidence: "the span text starts withtest_, or ends with::test_, with optional parentheses"The plan run made 2 model request(s), and used 156644 input tokens and 8671 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): fix the plan of #3433 to prove the prompt and the counts
docs(openspec): plan #3433 Refuse a test-only group with no test name (…
3 remaining items
fix(roadmap): Refuse a test-only other group with no named test (#3433)
fix(roadmap): State and prove the rule in the planner prompt (#3433)
docs(openspec): archive the change (#3433)
fix(roadmap): Refuse a test-only other group with no named test (#3433)
fix(roadmap): State and prove the rule in the planner prompt (#3433)
docs(openspec): archive the change (#3433)
fix(roadmap): Refuse a test-only other group with no named test (#3433)
fix(roadmap): State and prove the rule in the planner prompt (#3433)
docs(openspec): archive the change (#3433)
devops-cli-service commentedon Nov 8, 2026
Released in v0.92.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.92.0
devops-cli-service commentedon Nov 8, 2026
Live since 2026-11-08 17:35 UTC
docs(openspec): plan #3462 Accept a test helper group in the plan che…