Repository navigation
Description
What happened
The stage job writes a failing test as task n.1 of every task group, also for a group that changes no code that has behavior. The model has to invent a "test", and the implement job then builds it. Examples from the plans on main (counted 2026-11-01):
- 50 groups in 22 plans change no path under
src/. - test(review): mutation cleanup of 18 test files #2162 (mutation report): "a test that asserts
uv run devops ciexits with code 0 and the tasks.md file has all tasks marked complete". - test(cli): migrate 49 tests to public interfaces #2167 (49 test files): the "failing test" is "a grep over the file returns zero matches".
- ci(coverage): Enable branch coverage and upload coverage xml as artifact #2163 (coverage): a new test that reads
pyproject.tomland assertsbranch = true. - fix(k8s): the volumes of grafana, the prometheus server and loki move off the control-plane node, and their placement exemptions go #2147 (Helm values): an assertion in a test for the values files.
- refactor(cli): the five functions and properties that nothing calls and that #1910 does not list leave src #2175 (delete five unused definitions, PR refactor(cli): the five functions and properties that nothing calls and... #3000): "write a test that asserts LLMClient has no
_get_ollama_semaphoreattribute". The runner Job wrote the scratch filetest_get_ollama_semaphore.pyin the repository root,mypy --strictfailed on that file, and the Job stopped at group 2 with the work done and the tasks not ticked.
Cause
StageGroup.testis a required field (src/devops_cli/roadmap/stage_change.py), the promptroadmap_stage_change.mdsays "test, the failing test to write first", andgroup_textalways rendersn.1 {test}, and verify that {verify} fails on the base.roadmap_implement_step.mdstep 1 says "Write the failing test first" for every group.openspec/config.yamlorders the tasks of every group as failing test, implementation, documentation.- AGENTS.md rule 4 has no case for a change that has no behavior to test. The
fail-to-passcheck applies only to afix(...)pull request that changessrc/.
What should happen
- A group whose
changeshold no path undersrc/has no test task:testisnull, andverifynames the check that proves it (an existing test,uv run devops ci docs,openspec validate, agit grepthat must print nothing). A validator inStageGrouprefuses atestthere, so the model cannot invent one. - A group that changes
src/keeps its test task. A deletion that keeps behavior may settesttonullwith thegit grepasverify. group_textrenders non.1test task whentestisnull, and numbers the next tasks fromn.1.- The implement prompt says: "Write the failing test first, when your group has a test task. Else skip step 1." It also says: put no scratch file in the repository root.
- AGENTS.md rule 4 and
docs/TESTING.mdname the case: a change of documents, manifests, workflows or a deletion names the check that proves it and adds no test.
Acceptance criteria
- A reply with a
teston a group that changes nosrc/path fails validation, and the model gets the problem text. - A group with
testnull renders without ann.1test task, andtasks.mdstill passestests/invariants/test_change_folders.py. - The prompts and rule 4 state the case, and a test fails if the prompt and the validator disagree.
Proposed design
Problem statement
The stage job writes a failing test task for every group, including groups that change no code with behavior. The model must invent a test, and the implement job builds it. This produces scratch files that break the build. The fix adds a kind field so a group with no behavior carries a verify command, not a test.
Acceptance criteria
Requirement: Validator rejects test on other group
A StageGroup with kind other and a non-null test SHALL fail validation with a problem text the model receives.
Scenario: other group with test set
- WHEN A StageGroup has kind other and test is a non-empty string
- THEN Validation fails with a problem text naming the conflict
Requirement: Validator rejects missing test on behavior group
A StageGroup with kind behavior and a null test SHALL fail validation.
Scenario: behavior group without test
- WHEN A StageGroup has kind behavior and test is null
- THEN Validation fails with a problem text naming the missing test
Requirement: Behavior kind requires src path
A StageGroup with kind behavior whose changes hold no path under src/ SHALL fail validation.
Scenario: behavior group with no src path
- WHEN A StageGroup has kind behavior and every path in changes is outside src/
- THEN Validation fails with a problem text naming the constraint
Requirement: Other group renders without test task
group_text SHALL render an other group with n.1 as the verify step and no failing test task.
Scenario: other group rendering
- WHEN group_text is called for a group with kind other
- THEN The rendered text has n.1 as the verify step and no test task
Requirement: tasks.md passes invariants
A tasks.md rendered with an other group SHALL pass tests/invariants/test_change_folders.py.
Scenario: invariant check on other group
- WHEN A change folder holds a tasks.md with an other group
- THEN test_change_folders.py reports no problems for the folder
Requirement: Prompts and docs state the rule
The stage prompt, implement prompt, AGENTS.md rule 4, and docs/TESTING.md SHALL state that a group with no behavior to test has no test task.
Scenario: prompt-validator agreement test
- WHEN A test checks that the prompt text and the validator agree on the kind rule
- THEN The test passes, and fails if the prompt and validator disagree
Existing Tool Considered
No check has run. The change builds its own code in devops-cli's staging pipeline. The written cost is the tokens to build, keep and fix the kind field, validators, group_text branch, and prompt edits, plus elapsed time.
Key questions
- What values does the kind field of StageGroup hold?: behavior and other. A behavior group adds or changes what the code does. An other group covers documents, manifests, workflows, a deletion or refactor that keeps behavior, test-only edits, and data. (proposed)
- Rejected: kind field with behavior and other. The owner set this rule on 2026-11-01. It follows behavior, not the path.
- Rejected: test nullable, no kind field. The body's original proposal. The owner replaced it with the kind field, which is more explicit.
- What does an other group carry in place of test?: verify, one command that can run again and gives the same answer, or process, the steps of a repeatable manual check when no command exists. (proposed)
- Rejected: verify command or process steps. The owner set this. Every other change has a command or a repeatable process that verifies it.
- Rejected: no verification at all. The owner requires a verify or process for every other group.
- Can a group whose changes hold no path under src/ be kind behavior?: No. The validator refuses a behavior group whose changes hold no path under src/. (proposed)
- Rejected: refuse behavior without src/ path. The owner set this. A group that changes only paths outside src/ cannot be behavior.
- Rejected: allow behavior without src/ path. This would let the model claim behavior for a document change, which the owner's rule forbids.
- What is the current StageGroup schema for test?: test is a required Sentence field. group_text always renders n.1 as the failing test with verify. [sources: src/devops_cli/roadmap/stage_change.py]
- How does group_text render an other group?: n.1 is the verify step, not a failing test. The next tasks number from n.2. (proposed)
- Rejected: n.1 as verify step. The owner set this. The verify step is the first task of an other group.
- Rejected: skip n.1, start at n.1 with implementation. The owner's plan keeps n.1 as the verify step for other groups.
- What does the implement prompt say for an other group?: Write the failing test first, when your group has a test task. Else skip step 1. Put no scratch file in the repository root. (proposed)
- Rejected: conditional step 1 based on kind. The owner set this. The prompt follows the kind of the group.
- Rejected: always write the failing test first. This is the current behavior that causes the problem.
- What do AGENTS.md rule 4 and docs/TESTING.md state about a change with no behavior to test?: A change of documents, manifests, workflows, or a deletion names the check that proves it and adds no test. (best practice) [sources: AGENTS.md, docs/TESTING.md]
- Rejected: name the case in rule 4 and TESTING.md. The owner set this. The rule follows behavior, not the path.
- Rejected: no change to rule 4 or TESTING.md. The current rule 4 has no case for a change with no behavior to test.
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.It causes 50 groups across 22 plans to generate invalid tests and stop jobs, but it is one of several roadmap defects and not a security or data-loss issue.Removing the mandatory test task for non-code groups prevents job failures and wasted model effort on a large share of plans.It touches StageGroup validation, group_text rendering, two prompt files, AGENTS.md, and adds a cross-check test.Both target StageGroup fields in stage_change.py, but #2772 fixes empty reads/changes rendering while the candidate makes test nullable for non-code groups.dan-petty commentedon Nov 1, 2026
The owner sets the rule (2026-11-01): write tests for new code functionality. Every other change has a command or a repeatable process that verifies it. This replaces the line "a group that changes
src/keeps its test task" in the issue body. The rule follows behavior, not the path.Plan for the fix:
kind:behavior(it adds or changes what the code does) orother(documents, manifests, workflows, a deletion or refactor that keeps behavior, test-only edits, data).behaviorgroup hastest, the failing test to write first, andverifyruns that test.othergroup has notest. It hasverify, one command that can run again and gives the same answer (uv run devops ci docs,openspec validate --strict,git grepthat must print nothing,devops k8s image-pins), orprocess, the steps of a repeatable manual check when no command exists.teston anothergroup and refuses abehaviorgroup with notest. A group that changes only paths outsidesrc/cannot bebehavior.group_textrendersn.1as the failing test forbehavior, and as the verify step forother.docs/TESTING.mdstate the same rule.dan-petty commentedon Nov 1, 2026
Evaluation of the 37
docs(openspec): plan #Npull requests (35 merged, 2 open), 2026-11-01. Each plan was checked against its issue, the project rules and the tree ofmain.Result: 2 acceptable, 34 need fixes, 1 to reject. Mean scores out of 5: premise checked 2.5, fidelity to the issue 3.0, task quality 2.2, rule compliance 3.0, accuracy of paths and symbols 2.2.
Defects that repeat:
main. The stage job notes it in its comment and still opens the pull request. (Issue fix(roadmap): the stage job refuses a plan that names a path that does not exist #3010.)Feasibility. Four plans rest on a premise that was already false: feat(telemetry): the roadmap Service sends its round pause and its GraphQL points left as gauges #2233, refactor(security): the unused run_subprocess re-import in security/ruff.py and the private _prepare_cmd alias go, and a ci row fails on a new noqa F401 re-import in src #2166, perf(ci): the startup-import tests start 56 interpreters and take 204 s of the suite's 2,423 s #2369, fix(k8s): the volumes of grafana, the prometheus server and loki move off the control-plane node, and their placement exemptions go #2147. (Planned in the issue list below.)uv run pytestor a flat new test path. About 17 ignore code or tests that exist. About 8 order their groups so that a test needs later code. About 10 drop an acceptance criterion.Twelve issues are
status/blockedafter the implement Job stopped at group 1 of such a plan.devops-cli-service commentedon Nov 1, 2026
Status set to Ready at f8b65bd (see proposed design in issue body).
chore(main): release 0.37.2 (#3047)