evilution 1.5.0 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (228) hide show
  1. checksums.yaml +4 -4
  2. data/.beads/interactions.jsonl +1 -0
  3. data/.rubocop_todo.yml +30 -0
  4. data/CHANGELOG.md +59 -0
  5. data/README.md +285 -45
  6. data/docs/architecture.md +110 -12
  7. data/docs/ast_pattern_syntax.md +35 -7
  8. data/docs/combined_runs_spike.md +407 -0
  9. data/docs/integrations.md +1 -1
  10. data/docs/isolation.md +63 -2
  11. data/docs/migration-from-mutant.md +16 -11
  12. data/docs/mutant_schemata_spike.md +387 -0
  13. data/docs/operator_yield_study.md +576 -0
  14. data/docs/probe_first_spike.md +264 -0
  15. data/lib/evilution/ast/ancestor_lookup.rb +36 -0
  16. data/lib/evilution/ast/callback_declaration.rb +36 -3
  17. data/lib/evilution/ast/class_body.rb +62 -16
  18. data/lib/evilution/ast/def_region.rb +130 -0
  19. data/lib/evilution/ast/local_declaration.rb +37 -0
  20. data/lib/evilution/ast/parent_index.rb +50 -0
  21. data/lib/evilution/ast/parse_cache.rb +27 -0
  22. data/lib/evilution/ast/parser.rb +8 -3
  23. data/lib/evilution/ast/pattern/filter.rb +53 -12
  24. data/lib/evilution/ast/skip_filter.rb +83 -0
  25. data/lib/evilution/ast/skip_sites/debug_output.rb +67 -0
  26. data/lib/evilution/ast/skip_sites/error_messages.rb +74 -0
  27. data/lib/evilution/ast/skip_sites/logging.rb +93 -0
  28. data/lib/evilution/ast/skip_sites/message.rb +44 -0
  29. data/lib/evilution/ast/skip_sites/nodes.rb +105 -0
  30. data/lib/evilution/ast/skip_sites/presets.rb +31 -0
  31. data/lib/evilution/ast/skip_sites/purity.rb +69 -0
  32. data/lib/evilution/ast/skip_sites/requires.rb +40 -0
  33. data/lib/evilution/ast/skip_sites.rb +9 -0
  34. data/lib/evilution/ast/source_surgeon.rb +20 -2
  35. data/lib/evilution/ast/syntax_check.rb +10 -8
  36. data/lib/evilution/baseline/report.rb +11 -2
  37. data/lib/evilution/baseline.rb +31 -6
  38. data/lib/evilution/cache/keys.rb +140 -0
  39. data/lib/evilution/cache/run_fingerprint.rb +51 -0
  40. data/lib/evilution/cache/skeleton.rb +57 -0
  41. data/lib/evilution/cache/spec_digest.rb +39 -0
  42. data/lib/evilution/cache.rb +145 -42
  43. data/lib/evilution/class_tree.rb +38 -0
  44. data/lib/evilution/cli/command.rb +12 -4
  45. data/lib/evilution/cli/commands/run.rb +12 -3
  46. data/lib/evilution/cli/commands/subjects.rb +5 -2
  47. data/lib/evilution/cli/parser/options_builder.rb +67 -3
  48. data/lib/evilution/cli/printers/environment.rb +34 -4
  49. data/lib/evilution/cli/printers/session_detail.rb +20 -3
  50. data/lib/evilution/compare/categorizer.rb +2 -1
  51. data/lib/evilution/compare/normalizer.rb +3 -2
  52. data/lib/evilution/config/sources.rb +3 -0
  53. data/lib/evilution/config/validators/base.rb +9 -0
  54. data/lib/evilution/config/validators/since.rb +22 -0
  55. data/lib/evilution/config/validators/skip_sites.rb +24 -0
  56. data/lib/evilution/config/validators/timeout_ceiling.rb +10 -0
  57. data/lib/evilution/config/validators/timeout_factor.rb +10 -0
  58. data/lib/evilution/config/validators/timeout_floor.rb +10 -0
  59. data/lib/evilution/config.rb +122 -6
  60. data/lib/evilution/coverage/load_tracker.rb +50 -0
  61. data/lib/evilution/coverage/map.rb +42 -5
  62. data/lib/evilution/coverage/map_builder.rb +123 -22
  63. data/lib/evilution/coverage/map_store.rb +15 -5
  64. data/lib/evilution/coverage/recorder.rb +42 -3
  65. data/lib/evilution/coverage_example_filter.rb +35 -0
  66. data/lib/evilution/equivalent/heuristic/comment_marking.rb +14 -1
  67. data/lib/evilution/example_filter.rb +20 -0
  68. data/lib/evilution/git/changed_lines.rb +103 -0
  69. data/lib/evilution/git/since_scope.rb +77 -0
  70. data/lib/evilution/git/unified_diff.rb +68 -0
  71. data/lib/evilution/infra_crash.rb +26 -0
  72. data/lib/evilution/integration/base.rb +97 -6
  73. data/lib/evilution/integration/crash_detector.rb +46 -6
  74. data/lib/evilution/integration/known_failures.rb +4 -0
  75. data/lib/evilution/integration/loading/body_call_neutralizer.rb +49 -11
  76. data/lib/evilution/integration/loading/callback_equivalence.rb +62 -0
  77. data/lib/evilution/integration/loading/callback_redeclaration.rb +151 -36
  78. data/lib/evilution/integration/loading/concern_redeclaration.rb +16 -12
  79. data/lib/evilution/integration/loading/concern_registry.rb +87 -0
  80. data/lib/evilution/integration/loading/concern_state_cleaner.rb +19 -8
  81. data/lib/evilution/integration/loading/created_modules.rb +56 -0
  82. data/lib/evilution/integration/loading/frozen_namespaces.rb +80 -0
  83. data/lib/evilution/integration/loading/mutation_applier.rb +42 -11
  84. data/lib/evilution/integration/loading/neutralization.rb +41 -0
  85. data/lib/evilution/integration/loading/redefinition_recovery.rb +5 -3
  86. data/lib/evilution/integration/loading/superseded_modules.rb +22 -19
  87. data/lib/evilution/integration/minitest/stop_hook.rb +57 -0
  88. data/lib/evilution/integration/minitest.rb +22 -2
  89. data/lib/evilution/integration/minitest_crash_detector.rb +19 -0
  90. data/lib/evilution/integration/rspec/baseline_runner.rb +3 -2
  91. data/lib/evilution/integration/rspec/crash_detector_lifecycle.rb +6 -1
  92. data/lib/evilution/integration/rspec/example_filter_applier.rb +16 -0
  93. data/lib/evilution/integration/rspec/example_ids.rb +23 -0
  94. data/lib/evilution/integration/rspec/example_order.rb +86 -0
  95. data/lib/evilution/integration/rspec/killer_first.rb +72 -0
  96. data/lib/evilution/integration/rspec/result_builder.rb +7 -0
  97. data/lib/evilution/integration/rspec/state_guard/example_group_descendants.rb +44 -0
  98. data/lib/evilution/integration/rspec/state_guard.rb +2 -2
  99. data/lib/evilution/integration/rspec/target_resolver.rb +42 -0
  100. data/lib/evilution/integration/rspec/test_file_resolver.rb +4 -2
  101. data/lib/evilution/integration/rspec.rb +98 -47
  102. data/lib/evilution/integration/stop_policy.rb +49 -0
  103. data/lib/evilution/integration/test_unit/dispatcher.rb +20 -1
  104. data/lib/evilution/integration/test_unit/subject_class_registry.rb +6 -1
  105. data/lib/evilution/integration/test_unit.rb +28 -2
  106. data/lib/evilution/isolation/fork.rb +58 -13
  107. data/lib/evilution/isolation/in_process.rb +12 -1
  108. data/lib/evilution/line_set.rb +72 -0
  109. data/lib/evilution/mcp/info_tool/actions/environment.rb +12 -16
  110. data/lib/evilution/mcp/info_tool/actions/subjects.rb +3 -5
  111. data/lib/evilution/mcp/info_tool/status_glossary.rb +15 -2
  112. data/lib/evilution/mcp/info_tool.rb +24 -17
  113. data/lib/evilution/mcp/mutate_tool/config_builder.rb +13 -1
  114. data/lib/evilution/mcp/mutate_tool/option_parser.rb +2 -2
  115. data/lib/evilution/mcp/mutate_tool/progress_streamer.rb +1 -1
  116. data/lib/evilution/mcp/mutate_tool/report_trimmer.rb +28 -5
  117. data/lib/evilution/mcp/mutate_tool/survived_enricher.rb +12 -7
  118. data/lib/evilution/mcp/mutate_tool.rb +32 -7
  119. data/lib/evilution/mcp/session_tool.rb +1 -2
  120. data/lib/evilution/mcp.rb +4 -0
  121. data/lib/evilution/mutation/line_diff.rb +111 -0
  122. data/lib/evilution/mutation.rb +17 -13
  123. data/lib/evilution/mutator/base.rb +121 -98
  124. data/lib/evilution/mutator/constant_value_subjects.rb +29 -1
  125. data/lib/evilution/mutator/line_range_filter.rb +27 -0
  126. data/lib/evilution/mutator/load_sources.rb +88 -0
  127. data/lib/evilution/mutator/operator/alias_removal.rb +2 -5
  128. data/lib/evilution/mutator/operator/argument_method_call_replacement.rb +3 -0
  129. data/lib/evilution/mutator/operator/attr_accessor_swap.rb +2 -5
  130. data/lib/evilution/mutator/operator/constant_namespace_strip.rb +3 -3
  131. data/lib/evilution/mutator/operator/freeze_removal.rb +29 -11
  132. data/lib/evilution/mutator/operator/method_call_removal.rb +3 -1
  133. data/lib/evilution/mutator/operator/mixin_removal.rb +2 -5
  134. data/lib/evilution/mutator/operator/superclass_removal.rb +2 -5
  135. data/lib/evilution/mutator/operator/symbol_literal.rb +1 -1
  136. data/lib/evilution/mutator/operator/visibility_removal.rb +2 -5
  137. data/lib/evilution/mutator/registry.rb +11 -5
  138. data/lib/evilution/mutator/restore_source_cache.rb +41 -0
  139. data/lib/evilution/parallel/pool.rb +11 -4
  140. data/lib/evilution/parallel/work_queue/dispatcher/result_stream.rb +40 -0
  141. data/lib/evilution/parallel/work_queue/dispatcher.rb +20 -7
  142. data/lib/evilution/parallel/work_queue/worker/loop.rb +7 -2
  143. data/lib/evilution/parallel/work_queue/worker.rb +10 -3
  144. data/lib/evilution/parallel/work_queue/worker_stat.rb +7 -0
  145. data/lib/evilution/parallel/work_queue.rb +69 -12
  146. data/lib/evilution/parallel_db_warning.rb +39 -12
  147. data/lib/evilution/process_supervisor.rb +22 -2
  148. data/lib/evilution/reporter/cli/item_formatters/coverage_gap.rb +13 -2
  149. data/lib/evilution/reporter/cli/item_formatters/subject_score.rb +5 -1
  150. data/lib/evilution/reporter/cli/line_formatters/mutations.rb +9 -2
  151. data/lib/evilution/reporter/cli/line_formatters/result_line.rb +9 -1
  152. data/lib/evilution/reporter/cli/line_formatters/skipped_sites.rb +14 -0
  153. data/lib/evilution/reporter/cli/line_formatters/uncovered_code.rb +17 -0
  154. data/lib/evilution/reporter/cli/metrics_block.rb +4 -0
  155. data/lib/evilution/reporter/cli/trailer.rb +4 -4
  156. data/lib/evilution/reporter/cli.rb +9 -2
  157. data/lib/evilution/reporter/html/assets/style.css +8 -0
  158. data/lib/evilution/reporter/html/sections/file_section.rb +9 -0
  159. data/lib/evilution/reporter/html/sections/uncovered_details.rb +27 -0
  160. data/lib/evilution/reporter/html/templates/file_section.html.erb +2 -1
  161. data/lib/evilution/reporter/html/templates/summary_cards.html.erb +3 -0
  162. data/lib/evilution/reporter/html/templates/uncovered_details.html.erb +11 -0
  163. data/lib/evilution/reporter/json/mutation_detail.rb +77 -0
  164. data/lib/evilution/reporter/json/subjects.rb +1 -0
  165. data/lib/evilution/reporter/json/timings.rb +42 -0
  166. data/lib/evilution/reporter/json.rb +13 -50
  167. data/lib/evilution/result/coverage_gap.rb +5 -0
  168. data/lib/evilution/result/mutation_result.rb +55 -3
  169. data/lib/evilution/result/mutation_timings.rb +54 -0
  170. data/lib/evilution/result/run_timings.rb +20 -0
  171. data/lib/evilution/result/subject_score.rb +8 -1
  172. data/lib/evilution/result/subject_scorer.rb +5 -3
  173. data/lib/evilution/result/summary.rb +49 -12
  174. data/lib/evilution/runner/baseline_runner.rb +47 -5
  175. data/lib/evilution/runner/diagnostics.rb +0 -13
  176. data/lib/evilution/runner/isolation_resolver.rb +16 -4
  177. data/lib/evilution/runner/mutation_executor/isolated_run.rb +34 -0
  178. data/lib/evilution/runner/mutation_executor/kill_history.rb +66 -0
  179. data/lib/evilution/runner/mutation_executor/mutation_runner.rb +31 -12
  180. data/lib/evilution/runner/mutation_executor/neutralizer/baseline_failed.rb +1 -0
  181. data/lib/evilution/runner/mutation_executor/neutralizer/infra_error.rb +6 -20
  182. data/lib/evilution/runner/mutation_executor/probe_first.rb +99 -0
  183. data/lib/evilution/runner/mutation_executor/probe_first_run.rb +59 -0
  184. data/lib/evilution/runner/mutation_executor/result_cache.rb +45 -14
  185. data/lib/evilution/runner/mutation_executor/result_notifier.rb +1 -1
  186. data/lib/evilution/runner/mutation_executor/result_packer.rb +54 -24
  187. data/lib/evilution/runner/mutation_executor/runless_verdict.rb +39 -0
  188. data/lib/evilution/runner/mutation_executor/strategy/parallel/hinted_items.rb +27 -0
  189. data/lib/evilution/runner/mutation_executor/strategy/parallel/ordered_delivery.rb +97 -0
  190. data/lib/evilution/runner/mutation_executor/strategy/parallel.rb +102 -83
  191. data/lib/evilution/runner/mutation_executor/timed_run.rb +33 -0
  192. data/lib/evilution/runner/mutation_executor/timeout_policy/adaptive.rb +67 -0
  193. data/lib/evilution/runner/mutation_executor/timeout_policy/base.rb +35 -0
  194. data/lib/evilution/runner/mutation_executor/timeout_policy/fixed.rb +17 -0
  195. data/lib/evilution/runner/mutation_executor/timeout_policy.rb +56 -0
  196. data/lib/evilution/runner/mutation_executor.rb +75 -10
  197. data/lib/evilution/runner/mutation_planner.rb +29 -21
  198. data/lib/evilution/runner/phase_clock.rb +22 -0
  199. data/lib/evilution/runner/report_publisher.rb +1 -1
  200. data/lib/evilution/runner/subject_pipeline.rb +18 -8
  201. data/lib/evilution/runner.rb +87 -26
  202. data/lib/evilution/session/diff.rb +9 -2
  203. data/lib/evilution/session/store.rb +17 -2
  204. data/lib/evilution/source_ast_cache.rb +10 -0
  205. data/lib/evilution/spec_ast_cache.rb +15 -0
  206. data/lib/evilution/spec_resolver/constant_references.rb +66 -0
  207. data/lib/evilution/spec_resolver/project_files.rb +50 -0
  208. data/lib/evilution/spec_resolver/sibling_spec_ranker.rb +111 -0
  209. data/lib/evilution/spec_resolver/spec_pattern.rb +19 -0
  210. data/lib/evilution/spec_resolver.rb +76 -65
  211. data/lib/evilution/spec_selector.rb +17 -13
  212. data/lib/evilution/subject.rb +7 -2
  213. data/lib/evilution/version.rb +1 -1
  214. data/lib/evilution/worker_database/copies.rb +73 -0
  215. data/lib/evilution/worker_database/schema.rb +39 -0
  216. data/lib/evilution/worker_database/sqlite_copy.rb +65 -0
  217. data/lib/evilution/worker_database.rb +214 -0
  218. data/schema/evilution.config.schema.json +74 -2
  219. metadata +84 -13
  220. data/lib/evilution/integration/rspec/state_guard/object_space_example_groups.rb +0 -42
  221. data/scripts/benchmark_density +0 -262
  222. data/scripts/benchmark_density.yml +0 -19
  223. data/scripts/canary_manifest.yml +0 -47
  224. data/scripts/compare_mutations +0 -421
  225. data/scripts/compare_mutations.yml +0 -24
  226. data/scripts/compare_targeting +0 -279
  227. data/scripts/compare_targeting.example.yml +0 -24
  228. data/scripts/mutant_json_adapter +0 -227
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5f47321127e4fb0090ec208b430b7c14da3ca3b9b16e883f076b9707c787744a
4
- data.tar.gz: 78951f4619c9f8911e94272734b74606df0633131741201c7056c3a3dd1977dd
3
+ metadata.gz: 6a0b8191841143845ce57b7b44c407aaca2a60df082d956e589e8d5202508d69
4
+ data.tar.gz: 47bba12a95be5ffe2610a369c98d91de1f4d1469a7a63bde15efcd51a3c21c88
5
5
  SHA512:
6
- metadata.gz: 57ec220fad323e96e3bb3a4cb75b58dac381018d1b22334b4eb27b58c43db6219f732df58387eb41328332c90fb82d023829ac7df5632748223ada9aac048e26
7
- data.tar.gz: 5960714fac3df7b1beb118043e899961a4069dad090887e36727cda63d0b81eda52661ec9cb8745df7def51481e39aad9340673c9ec255fa59c1d32f506be3a9
6
+ metadata.gz: ceb42ff4858277cc2b01e955e08e05bc16bf9b7e514a119075423fba3acb309669d2fef675a69a0897b3c4bf824e6344162f237ad3aec87454e096c664822f0d
7
+ data.tar.gz: d80ef7071355f0b8bdd5848f33f18ca73e8bf3d89794046ff5a7baeeac5d960de5ef7a5269d84d603e867d22f828dcf478b4d3e8ca44931d04e99e75a8acafe9
@@ -659,3 +659,4 @@
659
659
  {"id":"int-e24299f1","kind":"field_change","created_at":"2026-10-13T17:20:30.564416401Z","actor":"Denis Kiselev","issue_id":"EV-x38e","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"Closed"}}
660
660
  {"id":"int-2efcd224","kind":"field_change","created_at":"2026-10-14T01:56:27.118884805Z","actor":"Denis Kiselev","issue_id":"EV-9zfe","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"Closed"}}
661
661
  {"id":"int-5a397b18","kind":"field_change","created_at":"2026-10-14T06:28:38.598622816Z","actor":"Denis Kiselev","issue_id":"EV-23dn","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"README update merged in PR #1867 (GH #1864)"}}
662
+ {"id":"int-891f7a12","kind":"field_change","created_at":"2026-10-14T06:49:36.086216634Z","actor":"Denis Kiselev","issue_id":"EV-bbrc","extra":{"field":"status","new_value":"closed","old_value":"in_progress","reason":"Shipped in 1.5.0 (PR #1851, GH #1846)"}}
data/.rubocop_todo.yml CHANGED
@@ -5,6 +5,8 @@ Metrics/AbcSize:
5
5
  Exclude:
6
6
  - "lib/evilution/runner.rb"
7
7
  - "lib/evilution/isolation/fork.rb"
8
+ - "scripts/combined_runs_spike/combined.rb"
9
+ - "scripts/schemata_spike/**/*"
8
10
 
9
11
  Metrics/ClassLength:
10
12
  Exclude:
@@ -17,10 +19,14 @@ Metrics/ClassLength:
17
19
  - "lib/evilution/cli/parser/options_builder.rb"
18
20
  - "lib/evilution/spec_resolver.rb"
19
21
  - "lib/evilution/mutator/registry.rb"
22
+ - "lib/evilution/result/summary.rb"
23
+ - "scripts/schemata_spike/**/*"
20
24
 
21
25
  Metrics/MethodLength:
22
26
  Exclude:
23
27
  - "lib/evilution/runner.rb"
28
+ - "scripts/combined_runs_spike/combined.rb"
29
+ - "scripts/schemata_spike/**/*"
24
30
 
25
31
  # The empty forward declaration (`class Evilution::CLI; end`) that lets the
26
32
  # children nest under the namespace before the full definition counts as a
@@ -34,3 +40,27 @@ Metrics/ParameterLists:
34
40
  Exclude:
35
41
  - "lib/evilution/result/summary.rb"
36
42
  - "lib/evilution/result/mutation_result.rb"
43
+ - "lib/evilution/runner/mutation_executor/strategy/parallel.rb"
44
+
45
+ # The mutant schemata spike harness is kept as it was measured (style fixes
46
+ # only), so the committed code is the code behind the numbers in
47
+ # docs/mutant_schemata_spike.md. It is measurement-only (never loaded by the
48
+ # gem); splitting its methods to meet the metric limits would make it differ
49
+ # from what was run.
50
+ Metrics/ModuleLength:
51
+ Exclude:
52
+ - "scripts/schemata_spike/**/*"
53
+
54
+ # The combined-runs spike harness is likewise a measurement harness kept as it
55
+ # ran for docs/combined_runs_spike.md, not gem code: refactoring it would
56
+ # change the code the report measured, so its metric offenses are accepted
57
+ # rather than paid down (with the AbcSize and MethodLength entries above).
58
+ Metrics/CyclomaticComplexity:
59
+ Exclude:
60
+ - "scripts/combined_runs_spike/combined.rb"
61
+ - "scripts/schemata_spike/**/*"
62
+
63
+ Metrics/PerceivedComplexity:
64
+ Exclude:
65
+ - "scripts/combined_runs_spike/combined.rb"
66
+ - "scripts/schemata_spike/**/*"
data/CHANGELOG.md CHANGED
@@ -2,6 +2,65 @@
2
2
 
3
3
  Versioning policy: see [docs/versioning.md](docs/versioning.md).
4
4
 
5
+ ## [1.6.0] - 2026-11-17
6
+
7
+ This release is about wall time. A run now does less work per mutant: each kill check stops at the first failing example, the per-mutation timeout follows how long the mutation's specs took in the baseline, parallel workers stay up for the whole run instead of being started and stopped per batch, and each file is parsed once. Stopping at the first failure alone cut wall time by about a fifth on the benchmark corpus, with no kill lost. New opt-in switches go further: mutants on lines no test executes are reported `uncovered` without running, examples that killed nearby mutants run first, and log calls, error messages and `require` lines can be left unmutated. `--since REF` mutates only what changed since a git ref.
8
+
9
+ Several of these are on by default and can move results: `stop_on_kill`, the adaptive timeout, `ignore_patterns` matching what the documentation always said it matched, per-worker test databases for parallel Rails runs, and a few new mutants. See "Changed" and "Fixed". Pin the gem version if you need a stable score across runs.
10
+
11
+ ### Added
12
+
13
+ - **`stop_on_kill`: a kill check stops at the first failing example** — RSpec, Minitest and Test::Unit stop a mutation's test run at the first failure that decides the verdict, instead of running the rest of the selected tests. Failures already failing in the baseline and infrastructure crashes do not stop the run. On by default; `--no-stop-on-kill` or `stop_on_kill: false` turns it off, and the MCP `evilution-mutate` tool takes `stop_on_kill`. Minitest classes that call `parallelize_me!` are not stopped early. A mutant whose first failure was followed by a hang or a crashing process is now `killed` rather than `timeout` or `error` (PRs #1930, #1936, #1947; GH #1880, #1932)
14
+ - **Adaptive per-mutation timeout** — when no timeout is set (CLI, config or MCP), each mutation's limit is the baseline duration of its spec files times `timeout_factor` (10), clamped to `timeout_floor` (10 s) and `timeout_ceiling` (60 s). A mutation that times out under a limit shorter than the old fixed 30 s is re-run under 30 s, and that run decides. The fixed 30 s still applies without a baseline (`--no-baseline`), when no spec resolves, when the spec file was red in the baseline, with `related_specs_heuristic`, or with in-window hooks. New flags `--timeout-factor K`, `--timeout-floor N`, `--timeout-ceiling N` and the matching config keys; a floor above the ceiling is a config error. Timed-out entries in the JSON report carry `time_limit` (PR #1961, GH #1910)
15
+ - **`uncovered` status** — with coverage targeting (`example_targeting_strategy: coverage`), a mutation whose changed lines no example executes is reported `uncovered` without being run. It counts as a survivor, so the score, `--min-score` and the exit code are unchanged. `--[no-]skip-uncovered` / `skip_uncovered` (default on; it has no effect under lexical targeting). The JSON report gains `summary.uncovered`, an `uncovered` array and `subjects[].uncovered`; session files gain the same, plus `uncovered_count`; the HTML report and the MCP status glossary list it. Session `diff` and `compare` count `uncovered` as alive (PR #1963, GH #1912)
16
+ - **`--since REF`** — `run --since REF` and `subjects --since REF` mutate only the lines changed since the merge base with `REF`, including uncommitted and untracked files. The MCP `evilution-mutate` tool takes `since`. A `--since` run with nothing to mutate exits 0 whatever `--min-score` says; a git failure, a missing file argument or `--since` combined with `--target source:` exits 2. Before this release `run --since main` was accepted and ignored (PR #1971, GH #1920)
17
+ - **`--killer-first` (opt-in)** — inside a kill check, the examples that killed the mutations next to this one run first, then the rest by baseline duration. RSpec 3.13+ only, and only with `stop_on_kill`. A reordered run that times out is re-run in the defined order. `--[no-]killer-first` / `killer_first` (default off). The JSON report now gives each RSpec mutation `killing_test` and `examples_run` (PR #1964, GH #1913)
18
+ - **`--skip-sites` (opt-in)** — leaves whole call sites unmutated by preset: `logging`, `debug_output`, `error_messages`, `requires`. `--[no-]skip-sites PRESETS` / `skip_sites` (default none); the MCP tool takes `skip_sites`. The JSON report and session files gain `summary.skipped_sites`, and the text report prints a `Skipped sites:` line (PR #1966, GH #1915)
19
+ - **`--probe-first` (opt-in, experimental)** — mutates each subject's body to a `raise` first; when no test fails, the subject's other mutants are reported as survivors without being run, each marked `implied_by: "method_body_to_raise"` in the JSON report, and the text report shows how many were implied. `--[no-]probe-first` / `probe_first` (default off). See `docs/probe_first_spike.md` (PR #1965, GH #1914)
20
+ - **Per-worker database copies for parallel Rails runs** — with `--jobs` above 1, a preloaded Rails app and a file-based SQLite test database, each worker copies the database into a temporary directory and uses its copy; the copies are removed afterwards. On by default; `--no-copy-worker-databases` / `copy_worker_databases: false` turns it off. Workers sharing one SQLite file gave wrong verdicts; on Redmine the verdicts that differed from a `--jobs 1` run went from 47 to 0 (PR #1970, GH #1919)
21
+ - **Per-phase timings in the JSON report** — a top-level `timings` object: run phases (subject discovery, preload, canary, baseline, planning, execution, finalize), baseline duration per spec file, summed per-mutation phases, and per-worker utilisation. Each mutation entry gains `timings` (apply, test run, confirmation, queue wait). The MCP tool keeps them only at `full` verbosity (PR #1956, GH #1905)
22
+ - **Mutants on constant values** — `method_call_removal` and `argument_method_call_replacement` now mutate calls in a constant's value (`LIMIT = ENV["X"].to_i` -> `ENV["X"]`) (PR #1940, GH #1888)
23
+ - **Callback and validation declarations with options are subjects** — `validates :name, presence: true`, `before_save :x, if: :y` and the like are subjects of their own (`Vote.validates(:for_lift)`), and their arguments and options are mutated; they produced no mutants before. A mutant that makes the declaration invalid when the class loads counts as a kill (PR #1943, GH #1878)
24
+ - **`environment show` and the MCP `environment` action report the adaptive timeout** — the MCP `settings` gain `adaptive_timeout`, `timeout_factor`, `timeout_floor`, `timeout_ceiling` and `copy_worker_databases`; `environment show` prints the adaptive limit instead of a bare `timeout: 30`, plus `killer_first`, `skip_uncovered`, `probe_first` and `copy_worker_databases`
25
+
26
+ ### Changed
27
+
28
+ - **`ignore_patterns` matches the mutated node and its ancestors**, as `docs/ast_pattern_syntax.md` always said: a `def{...}` or `class{...}` pattern now covers the whole body, and a call pattern its receiver, arguments and block. Broad patterns skip far more than before; check yours after upgrading. `skipped` counts each ignored change once (PR #1951, GH #1946)
29
+ - **Parallel runs keep their workers for the whole run** — workers take mutations from a streaming queue instead of being started for each batch of `--jobs` mutations and waiting for its slowest one. Result order, the `--fail-fast` cut-off and reports are unchanged (PR #1957, GH #1906)
30
+ - **Less work per mutant** — a forked test process is reaped without a fixed poll, does not restore source it is about to throw away, and finds spec-targeting caches warmed by the parent; tests run with no `ObjectSpace` heap walk; each source file is read and parsed once, and the syntax check and diff cover only the changed method and lines. Output is unchanged. `docs/isolation.md` lists the hooks evilution now installs in the test process (PRs #1958, #1959, #1960; GH #1907, #1908, #1909)
31
+ - **`--incremental` caches per subject, and caches survivors** — verdicts are keyed by the subject and the run's settings (versions, verdict-affecting options, spec helpers, lockfile), so an edit elsewhere in the file keeps them. The cache moved to `tmp/evilution_cache/v2/`; caches from earlier versions are ignored and removed on first write (PR #1962, GH #1911)
32
+ - **Spec resolution prefers specs next to the source** — a nested source with no one-to-one spec picks related specs in its own mirror directory before its parent directory's spec, ranked by name, then by callers, then by mentions. Which specs run for such a file can change (PR #1937, GH #1875)
33
+ - **Prism 2.x is supported** — the dependency is now `prism >= 1.5, < 3` (PR #1924)
34
+ - **The gem no longer ships `scripts/`** — the benchmark, comparison and canary scripts are development tools for this repository; none is a gem executable or loaded by `lib/`
35
+ - **Dependency bumps** — `mcp` 1.8.0 -> 1.10.0 in the lockfile (PRs #1899, #1901, #1928), `rubocop` 1.92.0 -> 1.92.2 (PRs #1898, #1902), `ruby/setup-ruby` 1.329.0 -> 1.338.0 (PRs #1897, #1900, #1922), `activemodel` 8.1.4 -> 8.1.4.1 (PR #1923), `irb` 1.18.0 -> 1.19.0 (PR #1925), minitest and rspec patch releases (PR #1928)
36
+
37
+ ### Fixed
38
+
39
+ - **A line-range target reports only mutations on its lines** — `lib/foo.rb:10-20` kept mutations whose subject overlapped the range even when the change itself was outside it. CLI `run` and `subjects`, MCP `evilution-mutate` and the MCP `subjects` action now keep only mutations that change a line in the range (PR #1938, GH #1874)
40
+ - **Parallel workers use their own test database under `--preload`** — each forked worker reconnects to its `TEST_ENV_NUMBER` database; before, all workers shared the database the preload connected to, and verdicts were wrong. An unprepared worker database falls back to the shared one with the `bin/rails db:test:prepare` command to run (PR #1939, GH #1929)
41
+ - **A Rails enum key blanked in a constant is a kill** — it was reported as `error`, and restoring the original left the enum broken (PR #1941, GH #1877)
42
+ - **Class-body mutants are labelled with the right subject** — code inside a `Data.define` / `Struct.new` block no longer lends its method name to mutants elsewhere in the class body, and `freeze_removal` no longer emits a duplicate for a `.freeze` inside such a block (PR #1944, GH #1879)
43
+ - **Coverage targeting runs the spec that includes a shared example group** — a line covered only by an `it_behaves_like` / `include_examples` group was mapped to the shared file, which on its own runs no example: the mutant ran nothing, or errored when the shared file could not load alone. Coverage targeting also really runs under `--preload` now; it fell back to lexical targeting without saying so (PRs #1963, #1976; GH #1912, #1973)
44
+ - **Coverage targeting builds its map without `--preload`** — under fork isolation the map builder failed with `NameError: uninitialized constant RSpec` and a backtrace, then fell back to lexical targeting with a misleading warning. It now loads RSpec itself; a build that still fails falls back with a one-line reason (PR #1977, GH #1974)
45
+ - **The reported test command can be pasted into a shell** — `test_command` is shell-escaped, so a targeted run on example ids (`spec/x_spec.rb[1:2]`) reproduces in zsh (PR #1976, GH #1973)
46
+ - **The config file schema lists every key** — `schema/evilution.config.schema.json` forbids keys it does not list, so editors flagged valid settings as errors: `killer_first`, `timeout_factor`, `timeout_floor`, `timeout_ceiling`, `skip_uncovered`, `probe_first`, `copy_worker_databases`, and the older `canary`, `output`, `warmup` and `example_targeting_strategy`. `integration` now accepts `test_unit`. A spec keeps the schema in step with the keys a config file may set
47
+
48
+ ### Documentation
49
+
50
+ - **"A test exists but the mutant still survives: check the matcher"** — RSpec `have_attributes` matches `ActiveModel::Errors` fuzzily and hides mutations to validation messages (PR #1948, GH #1889)
51
+ - **Examples run on files, not directories** — the README and the migration guide passed `lib/` as a file argument, which fails with `Is a directory`; they now use `--target 'source:lib/**/*.rb'` or a shell-expanded glob. The README documents `test_command` in the JSON report and the actual fields of the MCP `statuses` and `environment` answers; the MCP status glossary explains the adaptive time limit and implied survivors
52
+ - **Study and spike reports** — `docs/operator_yield_study.md` measures what each operator costs and catches and proposes a smaller default profile (not shipped); `docs/mutant_schemata_spike.md` and `docs/combined_runs_spike.md` record two approaches measured and rejected (PRs #1967, #1968, #1969; GH #1916, #1917, #1918)
53
+
54
+ ## [1.5.1] - 2026-10-22
55
+
56
+ ### Fixed
57
+
58
+ - **`--incremental` no longer lets a killed mutant answer for its siblings** — a cache entry was keyed by operator, line and column, but operators such as `nil_replacement` and `conditional_negation` emit several mutants at one location. The first one killed answered for the rest, so a survivor was reported `killed` even on an empty cache. Entries are now keyed by the mutated source as well; entries written by earlier versions are misses, never wrong verdicts, so the first run after the upgrade re-runs them (PR #1891, GH #1873; fix by [@gipcompany](https://github.com/gipcompany))
59
+
60
+ ### Changed
61
+
62
+ - **Dependency bumps** — `mcp` 1.7.0 -> 1.8.0 (PR #1893), `ruby/setup-ruby` 1.328.0 -> 1.329.0 (PR #1894)
63
+
5
64
  ## [1.5.0] - 2026-10-14
6
65
 
7
66
  The `default` profile grows from 136 to 155 operators, `strict` gains one more, and several existing operators emit more mutants than before: literals, collections, constants, indexes, variable reads and compound writes are all probed more closely. Constant assignments outside a method are subjects now, as class-body code was in 1.4.0. Mutation scores will move: every new mutant is one your suite has never been measured against. Pin the gem version and the operator profile if you need a stable score across runs.