Repository navigation
Description
What happened
uv run devops ci mutate src/devops_cli/ai/personas/__init__.py cannot finish its first stats run (comment of 2026-11 on #2162). mutmut runs the whole suite serially in mutants/, which has no git tracking. Tests that touch git fail the sandbox check host path reached without a fake. The run passed 1328 tests and stopped at failures in tests/ai/mcp/test_mcp_roadmap_tools.py and tests/ai/agents/test_embedding_config_retention.py. Each cleanup item of #2162 and #6420 needs this run, so none can start.
What should happen
uv run devops ci mutate <src file> ends its first stats run with no failed test. The [tool.mutmut] table in pyproject.toml has current test-selection paths, the openspec copy entry, and a deselect of each git-dependent test that mutants/ cannot run.
Evidence
pyproject.toml,[tool.mutmut]table (pytest_add_cli_args_test_selection).openspec/changes/2162-mutation-runs-decide-which-of-the/design.md, stop rule.- Each edit of
pytest_add_cli_args_test_selectionchanges mutmut's config fingerprint, so make all edits before the first stats run.
Acceptance criteria
-
uv run devops ci mutate src/devops_cli/ai/personas/__init__.pyends its first stats run with no failed test, andmutants/mutmut-stats.jsonhas the keysduration_by_testandtests_by_mangled_function_name. - No deselected test is a guard test of a security check or an invariant.
-
uv run devops cipasses.
Blocks the cleanup items split from #2162, and #6420.
Source
Source: #2162
Alternatives check of 2026-11-30: not-applicable.
Class: test, no model call.
Tool: none found.
Proposed design
Problem statement
The devops ci mutate command stops its first stats run in mutants/ when a test reaches the checkout .git path. The run cannot write mutants/mutmut-stats.json, so the cleanup items of #2162 and #6420 cannot start. The change adds the missing --deselect entry for the agent audit test to the [tool.mutmut] table.
Acceptance criteria
Requirement: First stats run completes
The devops ci mutate command MUST end its first stats run with no failed test and write the stats file.
Scenario: Mutation run of the personas module
- WHEN A person runs
uv run devops ci mutate src/devops_cli/ai/personas/__init__.pyon the branch. - THEN The command exits 0 with no failed test, and
mutants/mutmut-stats.jsonholds the keysduration_by_testandtests_by_mangled_function_name.
Requirement: Git-dependent agent audit test is deselected
The [tool.mutmut] test selection MUST hold a --deselect entry for the agent audit test.
Scenario: The mutation run leaves out the agent audit test
- WHEN A person runs
uv run devops ci mutate src/devops_cli/ai/personas/__init__.py. - THEN The run reports no failure from
tests/ai/agent_audit/test_agent_files.py::test_a_line_that_names_a_failure_is_kept.
Requirement: Full check passes
The change MUST keep the full devops ci check passing.
Scenario: Full check on the branch
- WHEN A person runs
uv run devops ci. - THEN The command exits 0 with no failed check.
Existing Tool Considered
The alternatives check in the issue body records not-applicable (class: test, no model call; tool: none found). The change keeps the maintained mutmut==3.9.0 that the dev group already installs and edits its [tool.mutmut] table. It builds no new code.
Key questions
- Which test does the mutation run still fail on, and what entry does it need?: The run fails on
tests/ai/agent_audit/test_agent_files.py::test_a_line_that_names_a_failure_is_keptwithhost path reached without a fake: <checkout>/.git. The change adds--deselect=tests/ai/agent_audit/test_agent_files.py::test_a_line_that_names_a_failure_is_kepttopytest_add_cli_args_test_selection. [sources: pyproject.toml, tests/ai/agent_audit/test_agent_files.py] - Is the agent audit test a guard test of a security check or an invariant?: The test checks the audit report's handling of a line that names a failure. It is not a guard test of a security check or an invariant. The change can deselect it. (best practice) [sources: tests/ai/agent_audit/test_agent_files.py]
- Chosen: Deselect the test. The test reaches the checkout
.gitpath inmutants/, and the issue scope is test selection. - Rejected: Fix the test to use a fake for
.git. The issue scope is the[tool.mutmut]table, and the test fix would add a separate change.
- Chosen: Deselect the test. The test reaches the checkout
- Does the
[tool.mutmut]table already hold theopenspeccopy entry?: Yes.also_copyinpyproject.tomlalready holdsopenspec. The change adds no copy entry. [sources: pyproject.toml]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 30, 2026
Both address test failures in the mutants tree, but the candidate deselects tests while 6448 fixes the guard itself.dan-petty commentedon Nov 30, 2026
Premise check pending. The block in this item comes from the #2162 comment of 2026-11-09. #6448 ("the stats run fails in the mutants tree") closed on 2026-11-23, after that comment. A probe run of
uv run devops ci mutate src/devops_cli/ai/personas/__init__.pyon main at 01b0b15 is running. If its stats run ends with no failed test, this item has no premise: close it as not planned, and the cleanup items of #2162 can start.dan-petty commentedon Nov 30, 2026
Premise check done (2026-11-30, main at 01b0b15, linked worktree).
uv run devops ci mutate src/devops_cli/ai/personas/__init__.pystill fails its stats run after 244 s:failed to collect stats. runner returned 1, 2 errors,tests/ai/agent_audit/test_agent_files.py::test_a_line_that_names_a_failure_is_keptwithhost path reached without a fake: <checkout>/.git. #6448 fixed other tests of this class, not this one. The item stands: it is the first item of the split of #2162, and the next failure is a different test.devops-cli-service commentedon Dec 1, 2026
Next step: the stage job writes the plan of the item. See the section Proposed design of the body.