Skip to content

docs(openspec): fix plan #2162 measure 17 test files by mutation - #3024

Merged
dan-petty merged 3 commits into
mainfrom
docs/2162-fix-plan
Nov 1, 2026
Merged

dan-petty merged 3 commits into
mainfrom
docs/2162-fix-plan

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

The plan for #2162 was wrong in places. This change corrects it in place. It changes no code and no test.

  • The plan now measures each of the 17 test files with the two-run mutmut method of the issue. It deletes a file only if the file kills no mutant of its own.
  • A guard test is never deleted. A file with a guard test moves that test to a covering file first. A new check in the last group fails if a moved test is missing.
  • The probe for PYTEST_ADDOPTS is a plain pytest call, because devops ci test does not pass the variable on. The plan says why.

The evaluation of the plan pull request #2979 found these defects.

Plans #2162

@dan-petty dan-petty added type/docs Type docs: a change to the documents scope/openspec OpenSpec changes, specs and their checks labels Nov 1, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Changes to the plan

  • design.md: the Method has a new step 6, the guard check. The exempt rule now works for each test, not for each file. The report gets a table ## Moved guard tests. The two known guard files are named.
  • tasks.md: every delete task runs the guard check before git rm. Task 1.1 adds the table header. Task 1.3 explains why its probe is a plain pytest call. Task 10.3 fails if a moved guard test is missing.
  • proposal.md: the Feasibility section records that devops ci test does not pass PYTEST_ADDOPTS.
  • Earlier commit 5fe43f1: the plan measures each file with the two-run method and deletes files that kill no own mutant.

Evaluation findings

  • Major, confirmed: test_review_defenses_and_verification.py holds symlink and path traversal tests, a vault path test and mask_secrets tests. test_custom_personas.py holds test_load_custom_repo_persona_traversal. The old exempt rule was per file, and task 10.3 had no pattern for guards. Fixed.
  • Minor, partly confirmed: task 1.3 used a bare uv run pytest. The finding said devops ci test passes the environment on. It does not. With PYTEST_ADDOPTS=--deselect=..., uv run devops ci test tests/ai/personas/test_custom_personas.py -n 0 still ran 3 passed. The plain call prints no tests collected (3 deselected), and it is the call that mutmut makes. So the plan keeps the pytest call and says why.

Verification

  • openspec validate 2162-mutation-runs-decide-which-of-the --strict: valid.
  • uv run devops openspec check: passed.
  • tests/invariants/test_change_folders.py: 16 passed.
  • origin/main was merged before the first push. No force-push.
  • The method itself is not run. Group 1 is its first test and has a stop rule.

@dan-petty
dan-petty marked this pull request as ready for review November 1, 2026 12:33
@dan-petty
dan-petty merged commit 5979fe2 into main Nov 1, 2026
19 checks passed
@dan-petty
dan-petty deleted the docs/2162-fix-plan branch November 1, 2026 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/openspec OpenSpec changes, specs and their checks type/docs Type docs: a change to the documents

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant