Skip to content

feat(testing): name surviving mutants as a weak-test signal and isolate parallel workers - #16610

Draft
kyle-sexton wants to merge 2 commits into
mainfrom
feat/testing-mutant-signal-parallel-isolation
Draft

kyle-sexton wants to merge 2 commits into
mainfrom
feat/testing-mutant-signal-parallel-isolation

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

No related issue: two small guidance additions to the testing plugin, decided by the owner without a tracking issue.

Summary

testing:test-value did not say that a surviving mutant is evidence a test checks too little, and /testing:write covered parallel runs with one line that named no worker-level isolation. Both now do.

Fix

  • testing:test-value §5: a surviving mutant on changed code (one that is not equivalent) is one signal that no test checks that line; assert the behavior the mutant changed, with an expected value from §1. /mutation-testing:audit produces the survivors.
  • /testing:write determinism controls, beside order independence: each worker gets its own database or schema, test servers bind port 0 and read back the assigned port, each test gets its own temp directory, and no test mutates a file, environment variable or singleton another worker reads. The worker id that names the per-worker database is linked from each runner's own docs (pytest-xdist, Jest, Playwright); runners whose docs name no worker id get no pointer.
  • Two eval cases, tv-surviving-mutant-signal and wr-parallel-worker-isolation, and a minor changelog fragment.

Verification

  • validate-cases.py plugins/testing/evals: no FAIL; no WARN on the new cases.
  • claude plugin eval (judge opus, 3 runs per arm), run on a copy of the plugin outside git because the CLI refuses a checkout with many linked worktrees: tv-surviving-mutant-signal with plugin 3/3 (score 1.0), without 0/3; wr-parallel-worker-isolation with plugin 3/3 (score 1.0), without plugin mean 0.67 (one of three runs met the rubric).
  • scripts/check-as-of-recheck.sh: pass. Pre-push check-affected: 14 passed, 0 failed.
  • Left out: the plugin's node suites (plugins/testing/tests covers fix-until-green only, untouched here).

Related

N/A

🤖 Generated with Claude Code

https://claude.ai/code/session_01MWmASPFjTu4anSp6BowqVC

kyle-sexton and others added 2 commits November 16, 2026 14:13
…te parallel workers

test-value now names a surviving mutant on changed code as one signal
that a test checks too little, and points to /mutation-testing:audit
for getting the survivors. write's determinism controls replace the
one-line parallel-safety rule with worker isolation: a database or
schema per worker, port 0 instead of a fixed port, a temp directory
per test, and no shared file or environment variable mutated across
workers, with pointers to the worker-id docs of pytest-xdist, Jest
and Playwright. Adds one eval case for each.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MWmASPFjTu4anSp6BowqVC
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MWmASPFjTu4anSp6BowqVC

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant