Repository navigation
Description
What happened
A generated test can pass and prove nothing. The project has a mutation check and a coverage floor, but the job runs neither on the tests it writes.
What should happen
- The job runs the mutation check on the changed code and the new tests (bounded by time and file count) and the change-scoped coverage. Surviving mutants and uncovered new lines go to a repair round.
Acceptance criteria
- A test file that asserts nothing is flagged in a replay test.
- The mutation run has a time bound and the report is in the PR comment.
- The coverage delta of the changed files is in the PR comment.
- The check is skipped, with the reason shown, for groups of kind
other.
Related: tracker for this set (filed with it), #2908 (issue workflow), #2867 (draft PR evaluator), #3005 (task kind), #3010 to #3015 (plan gates), #2919 (stuck-item metrics), #2953 (Ollama parser).
Alternatives check of 2026-11-04: partly.
Tool: boxed/mutmut (https://github.com/boxed/mutmut), BSD-3-Clause, last activity 2026-10-28, maintained.
Proposed design
Problem statement
The implement job writes tests but does not check their strength. A generated test can pass and assert nothing, and the job runs no mutation check and no changed-line coverage on the tests it writes. This issue adds a strength scoped check to the implement job: it reuses the existing test-function-has-assertion ast-grep rule, runs mutmut through the existing devops ci mutate --changed selection with a time and file bound, runs diff-cover over the scoped tests' coverage, puts the results in the pull request comment, sends failures to the existing fix-step loop, and skips the changed files of a task group of kind other with the reason shown.
Acceptance criteria
Requirement: Flag a test file with no assertion
The strength check SHALL report a new test file whose test functions hold no assertion as a strength failure.
Scenario: Fixture test file with no assertion
- WHEN A new test file holds a test function with no
assertstatement, nopytest.raisesorpytest.warnscall and noself.assert*call. - THEN The strength check reports the test file and the line of the function, and the job starts a fix step.
Requirement: Bound the mutation run by time
The mutation run SHALL stop at roadmap.implement.command_timeout_seconds.
Scenario: Command timeout reached
- WHEN The mutation run reaches the command timeout.
- THEN The run stops, and the strength report in the pull request comment names the bound and the survivors that the run found before the stop.
Requirement: Bound the mutation run by file count
The mutation run SHALL test the changed source files of at most CONST_ROADMAP_IMPLEMENT_SCOPED_TEST_MODULES files.
Scenario: More changed files than the bound
- WHEN A change touches more source files than the bound.
- THEN The run tests the files up to the bound, and the strength report names each file that the run did not test.
Requirement: Post the mutation report
The implement job SHALL put the mutation report in the pull request comment.
Scenario: Surviving mutant listed
- WHEN The mutation run reports one surviving mutant.
- THEN The pull request comment lists the file, the line and the mutant name of the surviving mutant.
Requirement: Post the coverage delta
The implement job SHALL put the coverage delta of the changed files in the pull request comment.
Scenario: Uncovered new line listed
- WHEN A new line of a changed file has no coverage from the new tests.
- THEN The pull request comment lists the file and the line number of the uncovered line.
Requirement: Repair a strength failure
The implement job SHALL send a surviving mutant and an uncovered new line to a fix step of the scoped-check repair loop, bounded by roadmap.implement.repair_rounds.
Scenario: One strength failure gets a fix step
- WHEN The strength check reports a surviving mutant or an uncovered new line.
- THEN The job runs a fix step with the strength report as input and runs the strength check again after the fix step.
Requirement: Skip a group of kind other
The implement job SHALL skip the strength check for the changed files of a task group of kind other and SHALL show the reason in the pull request comment.
Scenario: Task group of kind other
- WHEN A task group has kind
other. - THEN The job runs no mutation check and no coverage check on the files of that group, and the pull request comment states the skip reason.
Existing Tool Considered
boxed/mutmut 3.8 (https://github.com/boxed/mutmut), BSD-3-Clause, last activity 2026-10-28, maintained. The project already runs it through devops ci mutate --changed --base (src/devops_cli/commands/ci.py:2418), which selects the functions of the changed files and reports each surviving mutant with its file, line and diff. mutmut itself lacks an overall wall-clock bound, a changed-file count bound, a coverage delta of the changed lines, a static assertion scan and pull request comment posting. The project already covers the assertion scan with the test-function-has-assertion ast-grep rule in the constructs row (.ast-grep/rules/test-function-has-assertion.yml:1, tests/gate/construct_gate.py:69) and the coverage delta with diff-cover (https://github.com/Bachmann1234/diff_cover), which CI runs at .github/workflows/ci.yml:291. The job adds only the changed-file cap, the report in the pull request comment, the skip for other groups and the repair wiring; it builds no mutation engine.
Key questions
- Which mutation testing tool does the strength check run?: The check runs boxed/mutmut 3.8 through the project's
devops ci mutate --changed --base <base>selection (src/devops_cli/commands/ci.py:2418,src/devops_cli/ci/mutate.py:1). That command maps the changed functions to mutmut names and reports each survivor with its file, line and diff; the job adds the changed-file cap and the pull request comment. The project builds no mutation engine. (best practice) [sources: src/devops_cli/commands/ci.py:2418, src/devops_cli/ci/mutate.py:1]- Chosen: boxed/mutmut 3.8 through
devops ci mutate --changed. It is open, maintained and already in the project:devops ci mutateselects the changed functions and reports each surviving mutant with its file, line and diff. - Rejected: Build a mutation runner in the repository. It repeats a solved problem and costs the tokens to build, keep and fix an engine that mutmut already gives.
- Rejected: Use the CI
Tests & Coveragejob only. That job reports changed-line coverage but runs no mutation, and the implement job needs the result before it marks the pull request ready.
- Chosen: boxed/mutmut 3.8 through
- How does the check find a test file that asserts nothing?: The strength check invokes the existing
.ast-grep/rules/test-function-has-assertion.ymlrule on the new test files. Theconstructsrow already runs that rule overtests/**(tests/gate/construct_gate.py:69,src/devops_cli/config/constants.py:3514), and it matches anassertstatement and a call ofpytest.raises,pytest.warns,self.assert*and the other checks in its regex. The strength check reports the rule's violation; it adds no second assertion parser. (best practice) [sources: .ast-grep/rules/test-function-has-assertion.yml:1, tests/gate/construct_gate.py:69, src/devops_cli/config/constants.py:3514]- Chosen: Reuse the
test-function-has-assertionast-grep rule. The rule is already in theconstructsrow, matches asserts,pytest.raises/warnsandself.assert*, and runs overtests/**. - Rejected: Parse each test file with
ast. It duplicates the existing rule and adds a second definition of an assertion. - Rejected: Flag a file only when all its mutants survive. The mutation run costs minutes, and a weak file can still kill one mutant.
- Chosen: Reuse the
- How does the job get the coverage delta of the changed files?: After the
testsscoped check, the job runsuv run coverage xml -qanduv run diff-cover .data/coverage.xml --compare-branch=origin/<base> --format markdown:<file>, the same two commands that CI runs at.github/workflows/ci.yml:289and.github/workflows/ci.yml:291. The job parses the markdown for the missing lines and puts them in the comment. diff-cover reports the changed lines only, which is the delta the issue asks for. (best practice) [sources: .github/workflows/ci.yml:283, .github/workflows/ci.yml:289, .github/workflows/ci.yml:291]- Chosen: diff-cover over a coverage.py XML report. The project already runs
coverage xmland diff-cover in CI, and diff-cover reports the changed lines only. - Rejected: Diff two coverage reports in the job. It repeats the line mapping that diff-cover already does.
- Rejected: Keep the project coverage floor only. A floor over the whole tree hides the new lines that no test covers.
- Chosen: diff-cover over a coverage.py XML report. The project already runs
- Which wall-clock and changed-file bounds apply to the mutation run?: The mutation run is a scoped check, so
roadmap.implement.command_timeout_seconds(default 1800 s) bounds it atsrc/devops_cli/roadmap/implement/implement_scoped_ci.py:165. The changed-file cap isCONST_ROADMAP_IMPLEMENT_SCOPED_TEST_MODULES(30), the project's existing cap for a scoped check (src/devops_cli/config/constants.py:3520). A run that reaches either bound stops, and the strength report names the bound and the survivors it found or the files it did not test. (best practice) [sources: src/devops_cli/roadmap/implement/implement_scoped_ci.py:165, src/devops_cli/config/settings.py:1107, src/devops_cli/config/constants.py:3520]- Chosen:
roadmap.implement.command_timeout_seconds(1800 s) and 30 changed files. The setting already bounds every scoped check, and 30 is the project's existing cap for a scoped check (CONST_ROADMAP_IMPLEMENT_SCOPED_TEST_MODULES). - Rejected: 5 minutes and 10 files. No project source records these values; they were proposed, not chosen from the project's settings.
- Rejected: No bound beyond the 4-hour mutmut timeout. The issue requires a time bound and a file count bound, and 4 hours is longer than the implement step's own time limit.
- Chosen:
- Where does the strength check run in the implement job?: The strength check runs as a new
strengthscoped check aftertestsand before the push, in the samerun_scoped_checksloop (src/devops_cli/roadmap/implement/implement_scoped_ci.py:192). Thetestscheck writes the coverage data thatcoverage xmland diff-cover read, and a failedstrengthcheck gets the existing fix-step loop (openspec/specs/roadmap-implement-job/repair/spec.md:80). (best practice) [sources: src/devops_cli/roadmap/implement/implement_scoped_ci.py:124, src/devops_cli/roadmap/implement/implement_scoped_ci.py:192, openspec/specs/roadmap-implement-job/repair/spec.md:80]- Chosen: A new
strengthscoped check aftertests. The scoped tests write the coverage data, the existing timeout applies, and a failed scoped check already gets the fix-step loop. - Rejected: Inside each group's exit checks. The coverage data of the scoped tests does not exist yet, and a group of kind
otherhas no test. - Rejected: In the CI
Tests & Coveragejob only. The job would learn of a weak test after it marked the pull request ready, and the issue asks the job to repair before that.
- Chosen: A new
- Where does the job show the strength report?: In the implement job's pull request comment.
_commentalready writes the run's table, scoped-check lines and check lines (src/devops_cli/roadmap/implement/implement_run.py:1515), and_check_linesalready renders the verify output ofothergroups (src/devops_cli/roadmap/implement/implement_run.py:1558); the strength report is one more section of that comment. (best practice) [sources: src/devops_cli/roadmap/implement/implement_run.py:1515, src/devops_cli/roadmap/implement/implement_run.py:1558]- Chosen: The implement job's pull request comment.
_commentalready writes the run's table, scoped checks and check lines, and the issue asks for the report in the pull request comment. - Rejected: A check run. The issue asks for a comment, and the job has no check-run writer.
- Rejected: An issue comment. The pull request is the record of the change.
- Chosen: The implement job's pull request comment.
- How does the job use a strength failure?: A failed strength check is a failed scoped check, so it starts the existing fix-step loop with the strength report as the log, bounded by
roadmap.implement.repair_rounds(default 3), not one round (openspec/specs/roadmap-implement-job/repair/spec.md:80,src/devops_cli/config/settings.py:1050).CONTEXT.md:142still says 'at most one fix step', but the spec and the setting are the current project decision. (best practice) [sources: openspec/specs/roadmap-implement-job/repair/spec.md:80, src/devops_cli/config/settings.py:1050, docs/ROADMAP_WORKFLOW.md:399]- Chosen: The existing scoped-check fix-step loop, bounded by
roadmap.implement.repair_rounds. A failed scoped check already gets up torepair_roundsfix steps, and the setting defaults to 3. - Rejected: One repair round only. The project's spec and setting bound the loop at
repair_rounds, not one;CONTEXT.md's 'at most one fix step' is stale. - Rejected: A comment with no fix step. The issue sends the surviving mutants and the uncovered lines to a repair round.
- Chosen: The existing scoped-check fix-step loop, bounded by
- What is a task group of kind
other?: A task group of kindotheris a group whoseKind:line isother.(GroupKind.OTHER = "other"). The kinds arebehavior,manifestandother; anothergroup is a document, a workflow, a deletion, a behavior-preserving refactor, a test-only edit or data, has notest, and is proved by averifycommand or aprocess(src/devops_cli/roadmap/stage/stage_change.py:465). The implement job reads the kind from theKind:line of theTaskGroup.textwithKIND_LINE(src/devops_cli/roadmap/step_files.py:36), so amanifestgroup is not mistaken forother;plan_read._kindfalls back tootheronly when the first task has nofails on the basesuffix (src/devops_cli/roadmap/plan_read.py:348). The strength check skips a group whose kind isotherbecause the group writes no test. [sources: src/devops_cli/roadmap/stage/stage_change.py:465, src/devops_cli/roadmap/stage/stage_change.py:474, src/devops_cli/roadmap/step_files.py:36, src/devops_cli/roadmap/plan_read.py:348, src/devops_cli/roadmap/stage/stage_form.py:259]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Owner decision 2026-11-13
The approved pipeline split (tracker #5482, Phase 7) uses this check in E3 (#5517) and in the tests unit (#5520).
- Live proof: after the merge and the release, the next implement Job runs the check as the App. A comment gives the strength value of each new test.
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.
featprefix of the title gives the type.(roadmap)scope of the title gives the scope.It improves test quality in the pipeline but does not block a broken build or expose a security risk.It catches weak generated tests that pass without asserting, reducing silent regressions.It needs a bounded mutation run, a coverage delta step, a repair loop, and a PR comment, all wired into the job.devops ci mutate) #853, which asks for a different change.Both use mutation testing on changed code, but #853 delivers an on-demand command while the candidate adds an automated gate in the roadmap job.devops-cli-service commentedon Nov 2, 2026
Refine cannot set this item to Ready at a588893 until a person answers the questions below. Reply in a comment or edit the body, and the next refine round looks at the item again.
devops-cli-service commentedon Nov 4, 2026
Alternatives check: partly
Tool: boxed/mutmut (https://github.com/boxed/mutmut)
Covers:
Lacks:
Searches run:
Sources:
Checked on 2026-11-04. A person decides what this means for the item. The check changes no label and closes no issue.
devops-cli-service commentedon Nov 12, 2026
Status set to Ready at 2bd87bc (see proposed design in issue body).
18 remaining items
devops-cli-service commentedon Nov 15, 2026
The runner Job devops-cli-implement-devops-cli-3051-f74c46 ended: succeeded.
Image digest: sha256:fe47db4ed0f739be963bafe15bf9679f7075fb8156c0d03b13bd21173c3cf8ff
The last lines of its log:
feat(roadmap): Scan the new test files for a missing assertion (#3051)
feat(roadmap): Check the strength of the new tests (#3051)
feat(roadmap): Check the strength of the new tests (#3051)
feat(roadmap): Scan the new test files for a missing assertion (#3051)
feat(roadmap): Check the strength of the new tests (#3051)
chore(main): release 0.150.0 (#5788)
devops-cli-service commentedon Nov 15, 2026
Released in v0.150.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.150.0
devops-cli-service commentedon Nov 15, 2026
Live since 2026-11-15 06:04 UTC