Skip to content

Releases

Honest not-applied: viability filtering, deterministic mutation anchoring, consumer-grade verification

Choose a tag to compare

@wpunit13 wpunit13 released this 25 Sep 12:52
f1e9ece

Highlights

Mutation verdicts are now execution-proven end to end. This release closes
the three ways a run could lie about its mutants: sites that could never
apply are dropped before the loop, sites that drift between plan shapes are
re-anchored deterministically, and interrupted runs can no longer fake a 100%
score.

Fixed

  • Mojo resolves the published interceptor bundle — the fork-per-mutant
    path no longer resolves an unpublished thin-shim coordinate; fork mode now
    works against released artifacts exactly as a downstream consumer pulls
    them.
  • Stale applied-markers cleared — interrupted runs previously left
    markers that faked a 100% mutation score (KILLED); the plugin now clears
    them at run start and pipes the full Surefire exception trace into failure
    details.
  • Scala 2.12 compatibility — Regex#matches (2.13-only) replaced with
    String#matches; the _2.12 shim bundle compiles again. Caught by the
    shim-matrix CI, not by 2.13-only local builds.
  • Test-order-dependent verdict flip — the same mutant could classify
    KILLED or NOT_APPLIED across identical runs depending on JVM test-method
    order and which analyzed-plan shape reached the match phase first
    (measured: a pipeline analyzed plain vs count()-wrapped puts the same join
    at depth 8 vs 9). Discovery now records a position-independent re-anchor
    identity per candidate — a shape-free key plus a deep subtree fingerprint —
    and the PostHoc no-match path re-anchors the pending rewrite from it. The
    deep fingerprint keeps the re-anchor from crossing queries: same-shaped
    nodes in different queries share the shape-free key but not the subtree.

Changed

  • Structurally-invalid mutations are SKIPPED, not ERRORED — a mutation
    that applied but broke plan resolution (e.g. INNER→ANTI under a USING join)
    is a designed skip: excluded from the score and the not-applied
    denominator, visible in the report with the reason. mutation-report.json
    gains a new status value; downstream parsers should handle SKIPPED.
  • Viability filter: computed-sig correlation — candidates whose plan site
    is provably absent from every optimized plan are dropped at discovery
    instead of running the loop only to report NOT_APPLIED. Site identity is
    computed-sig-aware: pure pass-through fingerprints (#<ordinal>) collide
    across same-shape nodes and prove nothing on their own; pass-through sites
    require an exact fingerprint-set observation. Measured on the consumer
    example: 73 phantom not-applied → 0, same mutation score, ~40% less loop
    time.
  • WP-24 not-applied ratio gate scoped to operator families — the gate can
    be scoped to an accountable set of families via
    spark.mutator.notAppliedExemptMutators (CSV of
    JOIN/FILTER/AGGREGATE/WINDOW/PROJECT); real-failure ERRORED stays
    zero-tolerance.

Added

  • examples/consumer-standalone — a standalone downstream project (no
    parent POM, no reactor classes) exercising the published artifacts exactly
    the way a real consumer pulls them from Maven Central. Test complexity
    ramps from a single-column filter to a nested-schema multi-stage pipeline;
    CI runs both the in-process path and the fork-per-mutant plugin path on
    every PR.

Compatibility

  • JVM reactor and Python wheel release in lockstep (the wheel embeds the
    bundles) — upgrade both.
  • Report consumers: SKIPPED is a new MutantStatus; totals may shrink
    where non-viable sites were previously listed as NOT_APPLIED.
  • No changes to mutant-ID formulas or published coordinates.

first public release

Choose a tag to compare

@wpunit13 wpunit13 released this 21 Sep 02:17
1fa4c92

First public release of spark-mutator — semantic mutation testing for Apache Spark.

Runs your suite once unmutated, discovers every mutation site in the analyzed
Catalyst plans, then re-runs only the affected tests against each mutant —
fail-fast — and reports which mutants your suite kills.

Highlights

  • PySpark — pytest plugin (pytest --spark-mutate), zero pipeline changes
  • Java & Scala — Maven plugin (spark-mutation-testing:mutate, fork-per-mutant) and JUnit 5 extension (in-process)
  • Gradle — thin path via the JUnit 5 extension, no plugin needed
  • Spark support — 3.5.x (Scala 2.12 / 2.13) and 4.2.x (Scala 2.13), pinned cross-version goldens
  • Mutator families — Join, Filter, Aggregate, Window, Null-Coalesce, Project (incl. Decimal → Double)
  • Reports — JSON / SARIF 2.1.0 / HTML, plus per-test test-value-report that flags redundant test cases
  • Governance gates — mutation-score floor, ERRORED zero-tolerance, NOT_APPLIED ratio
  • Resilience — per-mutant timeout watchdog on both paths, driver circuit breaker, deterministic mutant ids

Install

PySpark:

pip install pytest-spark-mutation-testing

Java / Scala (test scope — match the bundle to your Spark/Scala line):

<dependency>
  <groupId>io.github.wpunit13</groupId>
  <artifactId>mutator-junit5</artifactId>
  <version>1.0.0</version>
  <scope>test</scope>
</dependency>
<dependency>
  <groupId>io.github.wpunit13</groupId>
  <artifactId>interceptor-bundle-spark-3.5_2.13</artifactId>
  <version>1.0.0</version>
  <scope>test</scope>
</dependency>

Maven plugin (CI-grade fork-per-mutant loop):

<plugin>
  <groupId>io.github.wpunit13</groupId>
  <artifactId>spark-mutation-testing-maven-plugin</artifactId>
  <version>1.0.0</version>
</plugin>

Documentation