canola.nvim/lua/oil/mutator
Barrett Ruth d783703ad3
fix(test): resolve trash_spec.lua flakes from leaked mutation state
Problem: `mutation_in_progress` and `buffers_locked` are module-level
locals in `mutator/init.lua` and `view.lua`. When a trash test times
out mid-mutation, these flags stay true and `reset_editor()` never
clears them. Subsequent tests' `save()` calls bail on
`mutation_in_progress`, silently skipping mutations so
`OilMutationComplete` never fires — causing cascading 10s timeouts.

Solution: Add `mutator.reset()` to clear leaked mutation state, and
call it from `reset_editor()` when `is_mutating()` is true. A 50ms
event loop drain lets in-flight libuv callbacks settle before the
reset. Baseline: 4/10 sequential passes. After fix: 49/50 parallel
passes with zero timing overhead on the happy path (~2.4s).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 20:56:11 -04:00
..
confirmation.lua refactor: revert canola namespace to oil and remove vim.g config (#120) 2026-03-10 22:49:56 -04:00
init.lua fix(test): resolve trash_spec.lua flakes from leaked mutation state 2026-03-16 20:56:11 -04:00
parser.lua refactor: revert canola namespace to oil and remove vim.g config (#120) 2026-03-10 22:49:56 -04:00
progress.lua refactor: revert canola namespace to oil and remove vim.g config (#120) 2026-03-10 22:49:56 -04:00
trie.lua refactor: revert canola namespace to oil and remove vim.g config (#120) 2026-03-10 22:49:56 -04:00