Repository navigation
feat(testing): name surviving mutants as a weak-test signal and isolate parallel workers - #16610
Draft
kyle-sexton wants to merge 2 commits into
Draft
kyle-sexton wants to merge 2 commits into
kyle-sexton wants to merge 2 commits into
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No related issue: two small guidance additions to the testing plugin, decided by the owner without a tracking issue.
Summary
testing:test-valuedid not say that a surviving mutant is evidence a test checks too little, and/testing:writecovered 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:auditproduces the survivors./testing:writedeterminism 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.tv-surviving-mutant-signalandwr-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-signalwith plugin 3/3 (score 1.0), without 0/3;wr-parallel-worker-isolationwith 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-pushcheck-affected: 14 passed, 0 failed.plugins/testing/testscovers fix-until-green only, untouched here).Related
N/A
🤖 Generated with Claude Code
https://claude.ai/code/session_01MWmASPFjTu4anSp6BowqVC