Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@sanmai
Copy link
Member

@sanmai sanmai commented Jun 5, 2025

This PR is very much work in progress. Please do not review it yet.

Remove MutationGenerator: leaky abstraction with negative utility

MutationGenerator was intended as a convenience wrapper to orchestrate trace acquisition, mutation generation, and event dispatch. However, in practice:

  • It does not encapsulate any real complexity: it simply passes through parameters to FileMutationGenerator and relays calls to TraceProvider and EventDispatcher.
  • It leaks all lower-level details: callers must still construct and configure all collaborators (TraceProvider, FileMutationGenerator, Mutator[], NodeIgnorer[], etc.), and understand when events are dispatched.
  • Its presence adds indirection without providing decoupling: any change to internal dependencies propagates through this wrapper, often requiring synchronized updates across multiple layers.

Because of this, it is a leaky abstraction in the Joel Spolsky sense: it purports to hide complexity but forces the caller to understand (and manually construct) all internal components anyway. The result is increased maintenance burden with no meaningful simplification of usage.

Removing this class simplifies the architecture: consumers can directly wire together TraceProvider → FileMutationGenerator, which is exactly what this class was doing anyway, but now without the misleading promise of abstraction.

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