Repository navigation
Releases
Releases · rasuvaeff/mutation-history
v0.1.1
- The package gates itself:
composer mutation:gate
(.github/scripts/mutation-gate.sh) records every Infection run of this
repository in a ledger and fails the job when a mutant that used to be
killed starts escaping. Both READMEs carry the GitHub Actions recipe,
including the two consequences of keeping the ledger in the Actions cache
and the fact that mutant identity contains Infection's absolute file path. - Mutation testing now counts uncovered code (
--with-uncovered, template mutator settings): overall MSI 94% before, 98% after, againstminMsi97. Added tests for an unopenable--logfile (stream wrapper), a stray argument between options, andMutantId::normalizeDiff()on a PCRE backtrack-limit failure. No src changes. - Changed: PHP 8.6 is supported: the
phpconstraint is widened to
8.3 - 8.6(#7). CI runs PHP 8.6 as a regular matrix entry; the
backward-compatibility job runs on PHP 8.5.
v0.1.0
- Initial release:
InfectionLogParser(parses Infection's per-mutant JSON
log into aquality-ledgerRunReport) andMutantId(a
StableIdInterfacekeyed on file/line/mutator/normalized-diff), plus the
bin/mutation-historyCLI (digest/diff/trend/badge). quality-ledgeris resolved from Packagist (^0.2); the path repository
that stood in for it before its release is gone.bin/mutation-history badgerenders the latest value of a metric as a
self-contained SVG (quality-ledger'sBadgeSvg), to--outor to
stdout. A scope with no runs yet rendersn/ain red and still exits0.- The README usage sample is executable in both languages:
doc-execjoined
the build gate, so// =>comments are assertions. - Fixed: a third break of
normalizeDiff()'s idempotence, of the same family
as the two already documented.trim()'s charlist counts\0and\x0B
as whitespace while the collapse and hunk-header patterns knew only space
and tab, so"\x0B@@ - @@"normalized to"@@ - @@"on the first call and
to""on the second. All three patterns now share one character class. - Fixed:
MutantId::signature()is length-prefixed."\0"was both the
field separator and a byte a field may legally contain, so
signature("src/A.php\0" . '1', 2, 'M', $d)andsignature('src/A.php', 1, "2\0M", $d)produced the same id — two distinct mutants collapsing onto one
history entry. Ids from before this change do not carry over. - Fixed:
InfectionLogParservalidates every field of every entry and raises
InvalidArgumentExceptionnaming it. The shape used to be asserted with a
@varannotation, so a truncated or foreign-version log surfaced as PHP
warnings plus aTypeErrorfrom an internal argument. - Fixed: malformed JSON is rejected as an
InvalidArgumentExceptionlike
every other bad log, not as theJsonExceptionthatJSON_THROW_ON_ERROR
raises — a caller catching the documented contract had a truncated file slip
past it as a different type. The decoder's own reason is kept in the message
and the original exception inprevious. - Fixed:
digestreports a rejected log as exit1plus that message on
stderr instead of an uncaught exception and a stack trace. - Fixed:
diff --bad-status=(empty value) no longer classifies nothing as
bad, which made the ratchet gate exit0forever — in the one command whose
job is to fail CI.--msi=<not a number>is refused instead of writing
0.0into append-only history, and--window=<not an integer>is refused
instead of silently printing nothing (or throwing from inside the library). - Fixed: a missing required option returns an exit code up through
run()
instead of callingexit(1)from inside a library class. - Fixed: an unreadable
--logpath is reported once, by the CLI, instead of
after a PHP "failed to open stream" warning on the real stderr. - The property test that guards
normalizeDiff()now constructs hunk
headers instead of drawing characters from an alphabet, with
Classify::cover()gates proving the random phase reaches both a
well-formed header and a\0/\x0B; the three cases the old generator
could not reach are pinned as examples. benchmarks/ParserBench.phpmeasuresparse()andnormalizeDiff()
against a quarter of the input, so the ratio shows a regression to
quadratic scaling.infection/infectionwidened to^0.33 || ^0.34(the log schema this
package targets is 0.34's), the mutation gate raised from 90 to 97, and
Infection's own JSON log enabled so the package can be run against itself.