Skip to content

Releases

v0.14.0

Choose a tag to compare

@t-k t-k released this 27 Nov 12:12
v0.14.0
e6dcff8

Added

  • Single-build targeted probes for range membership, slice get/get_mut ranges, clamp cast bounds, and position/rposition (further reducing library source-rebuild candidates on targeted-mutation itself from 131 to 103, 98.1% overall probe coverage):
    • Range membership endpoint probes ((a..b).contains(x) ↔ (a..=b).contains(x)): autoref-specialized for primitive ordered types (all 12 integer types, f32/f64, and char), reborrowing arguments (&*(x)) to avoid moving &mut bindings, emitting a provable INPUT GAP when no test passes an input equal to the upper endpoint b (with a <= b), and running only upper-endpoint-matching tests otherwise.
    • Slice/string .get(a..b) / .get_mut(a..b) range probes: extends RangeIndex (Get / GetMut modes) to switch between Range and RangeInclusive directly on simple single-line receivers with pure bounds.
    • clamp cast bounds and 128-bit integer support: allows side-effect-free as cast sources (literals, paths, and nested casts without Deref) in is_infallible_bound and adds i128/u128 implementations to ClampPrim.
    • Iterator position ↔ rposition probes: autoref-specialized to DoubleEndedIterator + ExactSizeIterator (falling back to opaque without compile errors on non-double-ended or non-exact-size iterators such as str::chars()), preserving original evaluation and iterator state during tracing and running reaching tests only.

v0.13.0

Choose a tag to compare

@t-k t-k released this 27 Nov 11:35
v0.13.0
58324d6

Added

  • Single-build targeted probes for indexed ranges, literal sets, and short-circuiting match guards (reducing source-rebuild candidates on targeted-mutation itself from 305 to 217):
    • Indexed range endpoint probes (&xs[a..b] ↔ &xs[a..=b], &mut xs[a..b] ↔ &mut xs[a..=b], xs[a..b].read_method()): switches between real Range and RangeInclusive at the indexing expression on simple single-line places with pure bounds, preserving identical return types, borrow modes (without requiring IndexMut<RangeFull>), evaluation order, out-of-bounds panics, and usize::MAX endpoints without RANGE_AT_TOP skips.
    • Targeted literal-set element deletion ([lit1, lit2, ...].contains(&x)): lowers 2–8 distinct primitive literal sets with explicit shared-reference arguments into autoref-specialized probes (LitSetPrim / AnyLitSet) that record per-element match masks (S trace records), report unmatched elements directly as provable INPUT GAP findings without running tests, run matched elements only against matching tests, fall back to opaque if a trait overrides slice semantics, and unify b'...' byte literals with integer literals during duplicate detection.
    • Short-circuiting match guard probes: evaluates guard_override before the guard expression so constant true/false replacements skip guard evaluation and match source mutations even when a guard has side effects or early exits (return/?), while preserving INPUT GAP planning for strictly pure guards (trivial literals/paths or runtime-verified primitive comparisons).

v0.12.0

Choose a tag to compare

@t-k t-k released this 27 Nov 05:12
v0.12.0
ed5cbc4

Added

  • Eight new single-build targeted mutation rules (with autoref specialization so custom types with matching method names remain opaque without false positives, plus matching --rebuild / --source-only edits):
    • Saturating and wrapping arithmetic (SaturatingArith): a.saturating_{add,sub,mul}(b) ↔ a.wrapping_{add,sub,mul}(b) on all 12 primitive integer types, emitting a provable INPUT GAP when no test triggers differing results under overflow/underflow.
    • String whitespace trimming (StrTrim): s.trim() → s.trim_start() / s.trim_end() and s.trim_start() / s.trim_end() → s.trim(), preserving receiver borrow lifetimes across &str, String, and &String and checking both slice length and pointer position (core::ptr::eq) for all-whitespace inputs.
    • ASCII case-insensitive equality (StrCaseEq): a.eq_ignore_ascii_case(b) → strict equality across str, String, [u8], Vec<u8>, [u8; N], and u8 (using .eq(...) in source rebuilds to preserve auto-deref/auto-ref resolution), emitting a provable INPUT GAP when no test matches only by ignoring ASCII case.
    • Absolute value (Abs): x.abs() → x on signed integers and floats, checking to_bits() on floats (distinguishing -0.0 and -NaN) and cfg!(debug_assertions) on signed T::MIN, emitting a provable INPUT GAP when no test passes a negative value.
    • Iterator limits (IterLimit): iter.take(n) → iter.take(usize::MAX) and iter.skip(n) → iter.skip(0) specialized to Iterator with usize counts (leaving std::io::Read::take(u64) and custom methods untouched, and preserving count-expression side effects in source rebuilds).
    • Endian byte-order swaps (EndianSwap): x.to_be_bytes() ↔ x.to_le_bytes() and x.to_be() ↔ x.to_le() on multi-byte primitive integers (excluding 1-byte u8/i8), emitting a provable INPUT GAP when every observed value is byte-palindromic (x == x.swap_bytes()).
    • Bit-count swaps (BitCount): x.leading_zeros() ↔ x.trailing_zeros() and x.leading_ones() ↔ x.trailing_ones() across all 12 primitive integer types, emitting a provable INPUT GAP when leading and trailing counts agree on every test.
    • Loop control swaps (LoopCtrl): unlabeled, value-less break ↔ continue inside loops (restricting continue → break to unit-typed for/while loops so value-bearing or diverging loop expressions always type-check), run only against reaching tests.

v0.11.1

Choose a tag to compare

@t-k t-k released this 27 Nov 04:00
v0.11.1
e1fae14

Improved

  • Event-driven child process exit waiting (kqueue / pidfd):
    • Replaced polling sleeps when waiting on test binaries with kernel exit notifications (kqueue EVFILT_PROC/NOTE_EXIT on macOS and pidfd_open + poll on Linux x86_64 64-bit, aarch64, x86, and riscv64, falling back to bounded sleep polling elsewhere), eliminating per-mutant wait latency while preserving timeout and interrupt handling.
  • Copy-on-Write executable cloning for witness runs (fclonefileat / FICLONE):
    • Used APFS fclonefileat(2) on macOS (falling back to regular copy when BSD file flags such as UF_IMMUTABLE are set) and ioctl(FICLONE) on Linux (x86_64 64-bit, aarch64, x86, riscv64) when staging witness test binaries, with a file-length mismatch short-circuit in WorkCopy byte comparisons.
  • SIMD-accelerated line and trace scanning (NEON / SSE2):
    • Accelerated newline and tab scanning in LineIndex::new and Trace::parse using aarch64 NEON and x86_64 SSE2 intrinsics, paired with borrow-first BTreeMap lookups and fast ASCII u32 parsing while preserving exact str::lines and str::parse compatibility.
    • Pre-indexed primitive arithmetic and cast-probe spans per file during planning to avoid repeated AST scans.
  • Lean 4-verified planner and runtime probe optimizations:
    • Proved 4-bit comparison truth-table masks, BitVec disjoint-bit identities, domain-universal comparison equivalence, and zero-allocation str::replace vs replacen(..., 1) equivalence in formal/lean/Planner.lean (Lean 4 v4.36.0, zero warnings).
    • Applied the verified bitmask table in src/plan.rs and src/runtime/tmt_rt.rs, added zero-allocation str_replace_differs, deferred Val::tmt_val() conversion behind idle(site) on comparison probes, added bits_known / StrAffix short-circuits, and batched per-thread trace backlog flushes.

v0.11.0

Choose a tag to compare

@t-k t-k released this 26 Nov 12:11
v0.11.0
9e1fcae

Added

  • Project and workspace configuration file (tmt.toml):
    • Added auto-discovery walking upward from the target directory to the workspace root ([workspace] in Cargo.toml) or .git boundary for tmt.toml, .config/tmt.toml, or .cargo/tmt.toml (failing explicitly if more than one candidate exists in the same directory), plus --config <FILE> and --no-config CLI flags.
    • Supported declarative persistence of project-level mutation, test-selection, Cargo build, output, and fixture/work-directory options with [package.<name>] per-package overrides applied consistently across single-package runs (including single-member virtual workspaces with glob members) and --workspace / multi--p runs (including per-package work_dir, copy/fixture differences, and per-package source_only = true sharding).
    • Enforced built-in defaults < top-level config < [package.<name>] < CLI flags precedence with automatic cross-layer conflict resolution (e.g. CLI --source-only overriding rebuild = true, or --features overriding all_features = true) and empty-array clearing ([]).
    • Hardened config loading with #[serde(deny_unknown_fields)], 1 MiB read cap on opened regular files (O_NONBLOCK / O_NOFOLLOW on Unix to prevent FIFO hangs and symlink escapes outside the auto-discovered directory), NUL/control/BiDi character rejection across both raw text and TOML-decoded strings/paths/keys, and project-root-relative resolution for baseline and work_dir.

v0.10.1

Choose a tag to compare

@t-k t-k released this 25 Nov 09:33
v0.10.1
d5d0fef

Fixed

  • Effect-trace representative selection with UNKNOWN_TEST ("?"):
    • Picked the first named test as representative when UNKNOWN_TEST ("?") is mixed with named tests in an effect-trace test list instead of rendering `?` (and N more), and rendered unnamed-only lists as "a test" / "a test (and N more)".
  • Static bit-disjointness filtering and clearer advice for | ↔ ^:
    • Recorded primitive integer type bounds on | and ^ probes and skipped the equivalent | ↔ ^ (ArithSwap2) mutation when runtime-verified primitive sub-expressions prove (lhs_possible_ones & rhs_possible_ones) == 0 (covering constant shifts, bitmasks, unsigned remainders, and power-of-two mul/div, while conservatively preserving signed right shifts, overloaded operators, and any site where differs2 was observed).
    • Updated INPUT GAP advice for | ↔ ^ when disjointness cannot be statically proved to explain that operands must share at least one set bit and that | and ^ are equivalent if disjoint by construction.
  • Standard collection capacity-hint noise filtering:
    • Skipped pure capacity-hint expressions in standard collection constructors (Vec, String, VecDeque, BinaryHeap, HashMap, HashSet, OsString, PathBuf, CString, BytesMut, SmallVec, IndexMap, IndexSet with_capacity / with_capacity_and_hasher / reserve / reserve_exact) and .reserve_exact(...), as well as statement deletion on plain-place reserve / reserve_exact calls, while keeping non-capacity arguments, side-effecting blocks/receivers, custom domain APIs, and fallible try_reserve intact.
  • Duplicate enclosing ASSERTION GAP on constant-operand || / &&:
    • Suppressed surviving || ↔ && (LogicSwap) assertion gaps when every observed evaluation produced a boolean value where a || b == a && b (all (false, false) for || or all (true, true) for &&) and the right-hand operand is syntactically side-effect-free, accounting for the survivor under survivor_breakdown.redundant_constant so report counts continue to reconcile.

v0.10.0

Choose a tag to compare

@t-k t-k released this 25 Nov 05:32
v0.10.0
2cf0d5d

Added

  • External parent-relative path staging (--stage-external <SRC[=REL]>):
    • Added repeatable --stage-external supporting both shorthand (../../proto) and explicit (SRC=REL) forms to stage parent-relative files and directories into a confined subdirectory layout under <work-dir>/src for monorepo subpackages whose build.rs or include_str! references shared parent paths.
    • Enforced symlink confinement to the staged root, case-insensitive collision rejection, and WorkCopy separation between staged external paths and the workspace copy.
  • Substring/module test filtering and Cargo-compatible target flags:
    • Added repeatable --test-filter <PATTERN> for substring and module-prefix libtest filtering (combined with --include-test via union and --exclude-test via exclusion).
    • Added --lib, --bins, and repeatable --test <NAME> target selection flags (including explicit selection of test = false targets).
    • Added pre-build target validation against cargo metadata and actionable zero-test hints (suggesting --lib / underscore library target names when a binary target has no tests, and suggesting --test-filter when --include-test matches a runnable test only by substring).
  • Streaming Cargo build progress and persistent repair exclusion cache:
    • Streamed cargo test --no-run --message-format=json output to report compiled/cached crate counts and the latest crate name to stderr every 5 seconds during long builds (suppressed under --quiet).
    • Cached compile-error repair exclusions in <work-dir>/.tmt-repair-cache.json using exclusive atomic writes (create_new + rename) and a SHA-256 fingerprint covering the full staged tree, external path dependencies, environment variables, Cargo configuration, and rustc version so identical repeat runs finish in a single build.

Fixed

  • Skip pointless repair rebuilds on non-probe compile errors:
    • Detected missing-file and compile-time environment errors (include_str!/include_bytes!/include!, undefined env!, and E0583 missing modules) outside probe-inserted text and exited immediately without running an unnecessary repair rebuild.

v0.8.0

Choose a tag to compare

@t-k t-k released this 24 Nov 17:07
v0.8.0
93d50df

Added

  • Six value-aware targeted mutation rules:
    • s.starts_with(p) / s.ends_with(p) → s.contains(p) (provable INPUT GAP when no test passes a string containing p away from the start/end).
    • s.replace(a, b) ↔ s.replacen(a, b, 1) (provable INPUT GAP when a never occurs more than once).
    • x.clamp(lo, hi) → x.min(hi) (drop lower bound) and x.max(lo) (drop upper bound), with infallible-bound probe specialization, reversed/NaN panic tracking, and source-built fallback for potentially panicking or side-effecting bounds.
    • x.floor() / .ceil() / .round() / .trunc() → two rounding-mode alternatives each (provable INPUT GAP with concrete distinguishing examples when observed inputs do not separate rounding modes).
    • iter.all(closure) ↔ iter.any(closure) on Iterator receivers (using method auto-reborrow and Iterator autoref specialization so &mut iterators, Copy iterators, and non-Iterator custom types compile without skips).
    • [lit1, lit2, ...].contains(&x) element pruning (source-built under --rebuild / --source-only), with canonical value deduplication (including f32/f64, hex/decimal, signed zero, and raw strings) and per-element survivor descriptions.
  • AST sub-hunk undo for --since:
    • Decomposes multi-addition diff hunks into independent AST sub-hunk reverts for added &&/|| terms, added struct literal fields (with ..base), and added standalone statements, catching an untested clause inside an otherwise-tested hunk while preserving whole-hunk all_undone semantics, #[cfg(test)]/#[mutants::skip] guards, and line!()/column!()/#[track_caller] location sensitivity.
  • Stronger-assertion struct field narrowing:
    • When a surviving mutant and the original return the same multi-field Debug struct differing on exactly one field (recursively, supporting nested structs, raw keywords like r#type/r#gen, and Unicode identifiers), compiler-verifies &result.<path> == &(<value>) and suggests assert_eq!(call.<path>, <value>); with witness.field populated in JSON (even when the struct does not implement PartialEq).
  • JSON schema_version: 1:
    • Added top-level schema_version: 1 (report::SCHEMA_VERSION) to single-package JSON reports, --list --format json, --workspace --format json, and every --format jsonl record (both success and error).
  • Terminal control-character sanitization:
    • Sanitized untrusted project strings (paths, package names, source snippets, test names, witness output, CLI errors, and progress notes) across terminal stdout and stderr — stripping 7-bit/8-bit ANSI CSI/OSC/DCS/SOS/PM/APC/nF escape sequences, C0/C1/DEL control characters, Unicode BiDi override/isolate controls, and forged inline newlines — while keeping JSON, JSONL, and SARIF outputs lossless.

v0.7.0

Choose a tag to compare

@t-k t-k released this 24 Nov 13:59
v0.7.0
f3e2097

Added

  • Unified output format flag (--format text|json|jsonl|sarif) while preserving --json, --jsonl, and --sarif as backward-compatible shorthand flags.
  • Grouped CLI help organizing all options into six workflow sections (Target & Scope, Mutation Mode, Test Execution & Selection, Output & Baselines, Performance & Cargo Build, Work Directory & Fixtures) with compact -h summaries, detailed --help descriptions, usage examples, and an exit-code reference.
  • Expanded SARIF 2.1.0 reporting:
    • Added rules for unstable-prediction, weakened-test, and audit-disagreement, plus properties.audit metadata on SARIF runs.
  • Structured audit diagnostics:
    • Added Audit.not_audited for sampled survivors whose full re-run was Unable or an unconfirmed timeout.
    • Added TraceDifference.rerun_failed so trace rerun failures are distinguished from ordinary trace drift in text, JSON, and SARIF output.
  • Subreaper-aware orphan cleanup (ACTIVE_CHILDREN tracking, PID 1 / Linux PR_GET_CHILD_SUBREAPER detection, Linux pidfd_open + pidfd_send_signal + waitid(P_PIDFD) with safe fallbacks, and non-Linux ps-bracketed lsof verification) with an updated formal/tla/Leftovers.tla model.
  • Documentation:
    • Documented i128/u128 probe specialization limits (--source-only workaround) and async/thread-pool worker thread attribution limits (tokio/rayon, --isolate-tests workaround) in README.md.

Changed

  • Consistent CLI exit codes:
    • All CLI argument parse, range, and conflict errors now exit with code 1 (instead of clap's default 2), keeping exit code 2 unambiguous for test gaps, unstable predictions, and audit discrepancies in CI pipelines.
    • --audit discrepancies (disagreements, source_disagreements, and trace_differences) now count as gaps and return exit code 2 (while unconfirmed timeouts still take precedence with exit code 3).
  • Baseline ignore-comment lexing:
    • Replaced line-based comment scanning with a Rust lexer supporting string literals, raw strings, escaped character literals ('\''), and nested block comments (/* ... */). Inline trailing // tmt:ignore comments now apply only to their own line, while standalone comment lines continue to apply to the next line.
  • Stronger-assertion witness discovery:
    • Added support for super::f(...) calls inside direct child mod tests modules, normalized argument token deduplication so duplicate/reformatted calls do not crowd out distinct inputs within the 4-call budget, and bounded scenario memory to O(MAX_CALLS).
    • Included boundary source mutants in stronger-assertion witness synthesis and preserved original binaries with exclusive create_new temporary files during shared witness runs.
  • Parallel filtered timing pre-warming:
    • Keyed cached filtered baseline timings by (test_threads, filter) and pre-warmed uncached jobs serially at the parallel thread count. Added a warning when combining --source-only with --jobs > 1.
  • Internal module structure:
    • Extracted shared witness AST helpers into src/witness/common.rs, split src/instrument.rs and src/driver.rs into cohesive submodules, and decomposed run_package into focused phase helpers without changing public APIs.

Fixed

  • Probe runtime memory ordering: used Release/Acquire ordering on MODE so TARGET writes are guaranteed visible on weakly ordered architectures (e.g. ARM64), added fast idle(site) short-circuits, and fixed -0.0/+0.0/NaN handling in MinMaxPrim.
  • Checkpoint partial completion: kept checkpoints resumable when Outcome::Unable remains in the source phase instead of marking the campaign completed (verified with formal/tla/CampaignCheckpoint.tla).
  • Work-copy and wrapper safety: skipped special files (FIFOs, sockets, device nodes) and symlinks pointing into excluded paths during workspace copying; rejected absolute, parent-traversal, and control-character paths in --test-wrapper; rejected --jobs 0.
  • Output fixtures on case-insensitive filesystems: safely allowed case-only renames of owned fixtures while rejecting hard links to unowned files (same_directory_entry).
  • Git diff & scope parsing: unified Scope::from_diff with hunks() to avoid mistaking +++ lines in diff bodies for file headers and handled diff.suppressBlankEmpty=true.
  • Instrumentation edge cases: preserved inner attributes (#![...]) at the start of function bodies, avoided dropping meaningful trailing commas in 1-element tuples during same_built_tokens, inserted whitespace when removing unary !/- would merge tokens, and skipped #[cfg]/#[cfg_attr]/#[mutants::skip]-annotated assignments (including destructuring assignments).
  • Process cleanup and audit accuracy: killed timed-out/errored child processes before leftover sweeps, guarded process-group signalling with id > 1, snapshotted nextest child groups before wait, skipped Linux pseudo-FDs (/proc/<pid>/fd/*) without dropping renamed regular files, and avoided reporting Unable/unconfirmed-timeout audit reruns as false disagreements.
  • SARIF path handling: normalized Windows separators without breaking Unix literal backslashes or existing Windows baseline paths.
  • Campaign identity: hashed canonicalized executable targets when the invoked binary is a symlink.