heni: Deliberate mutation testing with attributable evidence

[ bsd3, library, program, testing ] [ Propose Tags ] [ Report a vulnerability ]

Run checked mutations in disposable workspaces and require precise failure evidence from existing tests and commands.


[Skip to Readme]

Flags

Manual Flags

NameDescriptionDefault
migration-tests

Run cross-package migration trials with an explicitly supplied CLI executable.

Disabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0
Change log CHANGELOG.md
Dependencies aeson (>=2.3.2 && <2.4), base (>=4.21.2 && <4.22), bytestring (>=0.12.2 && <0.13), containers (>=0.7 && <0.9), crypton (>=2.2.5 && <2.3), directory (>=1.3.10.1 && <1.4), filepath (>=1.5.5 && <1.6), heni (==0.1.0.0), process (>=1.6.26.1 && <1.7), stm (>=2.5.3.1 && <2.6), text (>=2.1.4 && <2.2), unix (>=2.8.8 && <2.9) [details]
Tested with ghc ==9.12.4
License BSD-3-Clause
Copyright 2026 Nadeem Bitar
Author Nadeem Bitar
Maintainer nadeem@gmail.com
Uploaded by shinzui at 2026-10-24T23:13:36Z
Category Testing
Home page https://github.com/shinzui/heni
Bug tracker https://github.com/shinzui/heni/issues
Source repo head: git clone https://github.com/shinzui/heni.git
Distributions
Reverse Dependencies 2 direct, 0 indirect [details]
Executables heni-campaign-bench, heni-library-example, heni-evidence-fixture, heni-fixture
Downloads 3 total (3 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for heni-0.1.0.0

[back to package description]

Heni

Heni runs deliberate mutations and verifies that the intended tests catch them. Describe a checked edit, build/test commands and a precise failure witness. Heni first proves the unchanged baseline, then runs the mutation in a disposable copy and retains a portable report.

Version 0.1.0.0 is unreleased. Local release validation and its limits are recorded in release readiness. Ordinary Cabal and released dependencies are sufficient; repository documentation tools and Nix are optional. Supported compiler/platform combinations are listed in compatibility.

From this checkout:

cabal build all -j1
cabal run heni-cli:exe:heni -- check examples/minimal/heni.json
cabal run heni-cli:exe:heni -- run examples/minimal/heni.json --case guard-bypass --output .heni-runs/first-caught
cabal run heni-cli:exe:heni -- report .heni-runs/first-caught/report.json

Expect caught and exit 0. Selecting --case survivor with a fresh output path produces survived and exit 1. Configuration or infrastructure failures exit 2. The quickstart begins with the unchanged passing fixture and shows both cases. Commands use literal argv; no shell mutation runner is needed.

Package Purpose
heni Framework-neutral Test.Heni library, strict manifests, runner and reports.
heni-cli The heni executable using the same library classifier.
heni-tasty Optional complete named-test evidence for Tasty.
heni-hspec Optional Hspec evidence and native QuickCheck replay.

A Haskell consumer constructs CaseDefinition, calls mkCampaign, then runCampaign (defaultRunOptions source output) campaign. The library returns RunResult; the caller owns application rendering/exits. See the short library example and the independent consumer. Use generic exact diagnostics when test counts are unknown, or install a reporter for selected/executed IDs and named assertions. Tasty/Hspec reporters are optional. Released Aeson brings a transitive QuickCheck dependency; the core exposes no framework test types.

Heni supports checked UTF-8 replacement, create/delete, optional Git textual patches and trusted Haskell transformations. Baselines, controls, intentional compiler rejection, replay and fresh crash probes have separate evidence contracts. Timeouts, unrelated errors, stale edits and missing test evidence cannot count as successful semantic detection. Source snapshots include selected dirty and untracked regular files; the original checkout remains unchanged.

Scoped resources and bounded workers support consumer-owned fixtures. Baseline sharing is opt-in and requires complete compatible identities. Incremental build reuse requires a trusted content-observation verifier; there is no generic portable switch that makes every build cache safe.

The POSIX supervisor bounds commands, output capture and group cleanup. Detached descendants and runner SIGKILL need stronger consumer containment. Windows, AST mutation generation, distributed execution, persistent verdict caches and automatic database rollback are outside this release. Consumer hooks are trusted code, not a security sandbox.

Read the CLI reference, troubleshooting, adapter contracts, resource/reuse guide, and migration guide. Versioned schemas cover manifests, reports and test evidence. The migration evidence separates measured fixture results from historical research and future consumer work.

For contributors:

cabal test all -j1 --test-show-details=direct
sh scripts/test-migrations.sh
sh scripts/check-sdist.sh

The archive check additionally needs development-only Python/jsonschema and Git for the explicit optional patch gate. Core tests run with a tool path excluding Git, Nix, Mori, OKF and Python. Release preparation explains local archives and the separate later Hackage candidate/publication review.

Heni derives its name from Japanese 変異 (hen’i), mutation or variation. Licensed BSD-3-Clause; copyright 2026 Nadeem Bitar.