mutineer 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a96e7bad1e1cf8d106957e770418e6a1854c677943114b9bc45421c4e06da7f2
4
- data.tar.gz: c404d87071f3d270566e368ac70153f1e87c940eb170b220b972fb1b28b29889
3
+ metadata.gz: 77a6283314f6511b6ea8165477cda70f0e54bc5ba25d9e80b7afb95903d168b8
4
+ data.tar.gz: a7172bbd15af300e3064fa4df50a4845e4710d31c5458f6c535cb54472634a75
5
5
  SHA512:
6
- metadata.gz: 15417ab5322c43c537953eaa438c18a9a89794f199a9c4666f031daf60f55f6c3ffabcb2e69e15b7ffd030e48b6f2d5d3ab41ee01ccfe9d52dd6c9ee22b4971c
7
- data.tar.gz: 1e68e920b3aa610ea1715c16e48e89060e8eba2b2511aafb3c7db0c44e21f8fac077529173befd9acf3afbe2962829cf4534dce371a2f6262628dd507f37469b
6
+ metadata.gz: da4882d841268217538cd4e2f327efbc5630d0d198ff38636203cb304a4a5b219af9f317097c10cfa69fc85da4c8b55570add95ff5d36cfb7a23dcf4dc12b8d9
7
+ data.tar.gz: 7eee3c779742a39f0828027a96d1843e9dbd0843434eba9de07bdbf8528fbbf926828471253c38e05f4ef2af5a09bc3c966f11a0482685bfce560fdd3763f228
data/CHANGELOG.md CHANGED
@@ -6,6 +6,21 @@ All notable changes to this project are documented here. The format is based on
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.0.2] - 2026-09-21
10
+
11
+ ### Added
12
+ - **AI-readable docs wiring**: HTML pages with Markdown twins now advertise
13
+ `rel="alternate" type="text/markdown"`, `index.md` is the landing/CLI
14
+ essentials twin, `skill.md` is listed under Optional in `llms.txt`, and
15
+ `sitemap.xml` is generated from the same catalog as `llms.txt` (#91).
16
+ - **Single-source CLI contract**: exit codes and `--threshold` live in
17
+ `docs/fragments/contract.yml`; `rake docs:generate` writes `llms-full.txt`,
18
+ `json-schema.html`, and the marked copies so they cannot drift (#82).
19
+ - **YARD API on Pages**: the current gem's YARD HTML is published at
20
+ `/api/`, linked from the docs site, and `rake yard:pages:check` keeps it
21
+ from lagging the shipped sources. `documentation_uri` stays the Pages
22
+ root (#92).
23
+
9
24
  ## [1.0.1] - 2026-09-18
10
25
 
11
26
  ### Added
@@ -407,6 +422,7 @@ Rails hardening + CI batch (issues #8–#13), all verified Rails-free.
407
422
  - `.mutineer.yml` configuration (CLI > config > default precedence).
408
423
  - Byte-correct source handling for multibyte (UTF-8) sources.
409
424
 
425
+ [1.0.2]: https://github.com/davidteren/mutineer/releases/tag/v1.0.2
410
426
  [1.0.1]: https://github.com/davidteren/mutineer/releases/tag/v1.0.1
411
427
  [1.0.0]: https://github.com/davidteren/mutineer/releases/tag/v1.0.0
412
428
  [0.11.4]: https://github.com/davidteren/mutineer/releases/tag/v0.11.4
data/README.md CHANGED
@@ -68,11 +68,13 @@ mutineer run lib/calculator.rb --test test/calculator_test.rb --threshold 90
68
68
 
69
69
  ### Exit codes
70
70
 
71
+ <!-- contract:exit-codes -->
71
72
  | Code | Meaning |
72
73
  |------|---------|
73
- | `0` | Score ≥ threshold (or no threshold set) |
74
- | `1` | Score below threshold, nothing could be scored and something broke, or more than one mutant produced no verdict and they exceed 10% of those attempted, a `--baseline` regression, or a runtime error |
75
- | `2` | Usage / invalid-flag error |
74
+ | `0` | Score ≥ threshold (or no gate) **and** no baseline regression. |
75
+ | `1` | Score below `--threshold`, OR nothing could be scored and something broke, or more than one mutant produced no verdict and they exceed 10% of those attempted, OR a `--baseline` regression, OR a runtime error. |
76
+ | `2` | Usage / invalid-flag error (mistyped flag, bad path, unreadable baseline). |
77
+ <!-- /contract:exit-codes -->
76
78
 
77
79
  ### Operators
78
80
 
@@ -273,6 +275,8 @@ structured exit codes, and diff-scoped runs. See:
273
275
  contract:
274
276
  [rendered](https://davidteren.github.io/mutineer/json-schema.html) ·
275
277
  [source](docs/json-schema.md)
278
+ - **Ruby API (YARD)** — class reference for the shipped gem:
279
+ [https://davidteren.github.io/mutineer/api/](https://davidteren.github.io/mutineer/api/)
276
280
 
277
281
  ## Configuration
278
282
 
@@ -56,7 +56,7 @@ module Mutineer
56
56
  # this mutant. Never a wrong verdict, never a wedged run.
57
57
  #
58
58
  # @param id [Integer] request id (echoed back for ordering safety).
59
- # @param payload [Hash] {"code" => mutated ruby, "source_file" => path}.
59
+ # @param payload [Hash] mutated ruby under the "code" key, path under "source_file".
60
60
  # @param tests [Array<String>] covering test file paths.
61
61
  # @param timeout [Numeric] per-mutant wall-clock timeout (seconds).
62
62
  # @param worker [Integer] worker slot; the daemon routes the fork to
@@ -7,6 +7,8 @@ module Mutineer
7
7
  # Raised when another process already holds exclusive ownership of a source
8
8
  # file. Aborting beats silently restoring (or capturing) the other run's mutant.
9
9
  class ConcurrentRunError < StandardError
10
+ # @param path [String] the source file the other run already owns.
11
+ # @return [ConcurrentRunError]
10
12
  def initialize(path)
11
13
  super("another mutineer run owns #{path} — aborting to avoid corrupting the source file.")
12
14
  end
@@ -10,14 +10,16 @@ module Mutineer
10
10
  # Never call this in the parent — it manipulates global Minitest state
11
11
  # (autorun, runnables) that only makes sense in a throwaway forked child.
12
12
  #
13
- # No `rescue` here: Isolation.run's fork block is the single exception
14
- # boundary (any exception there becomes exit 2). Adding a rescue would
15
- # create a second exit-2 path and break this method's 0/1 return contract.
13
+ # A missing minitest is rescued as FrameworkUnavailable (Isolation.run
14
+ # still turns that raise into exit 2). There is no rescue around the
15
+ # suite run itself: Isolation.run's fork block is the single exception
16
+ # boundary for unexpected errors. Swallowing those here would create a
17
+ # second exit-2 path and break this method's 0/1 return contract.
16
18
  class MinitestIntegration
17
- # ponytail: tested via runner_test.rb (U6), not in isolation — a direct
18
- # unit test would require forking and duplicate isolation_test's coverage.
19
+ # Tested via runner_test.rb, not in isolation — a direct unit test
20
+ # would require forking and duplicate isolation_test's coverage.
19
21
  #
20
- # `test_files` is one path or an Array of paths (M3 coverage selection
22
+ # `test_files` is one path or an Array of paths (coverage selection
21
23
  # passes the covering subset); each is loaded before the single
22
24
  # Minitest.run.
23
25
  #
@@ -19,7 +19,7 @@ module Mutineer
19
19
  # Computes the stable id for a single mutant.
20
20
  #
21
21
  # NUL-joined so token delimiters (`||=`, spaces, `::`, `#`) can never collide
22
- # with the separator; SHA256[0,12] gives a fixed-length, copy-pasteable key.
22
+ # with the separator; `SHA256[0,12]` gives a fixed-length, copy-pasteable key.
23
23
  #
24
24
  # @param subject [Mutineer::Subject] the subject (method) the mutant lives in;
25
25
  # its `qualified_name` anchors the id to a method rather than a byte position.
@@ -15,12 +15,11 @@ require_relative "mutators/collection_method"
15
15
  module Mutineer
16
16
  # Maps operator names to operator classes.
17
17
  #
18
- # DEFAULT_NAMES is the v1 default set
19
- # (the M4 Tier-1 + statement-removal operators per locked decision #2). The
20
- # three Tier-2 operators live in ALL but are OFF by default — they only run
21
- # when named via --operators or `operators:` in .mutineer.yml (KTD8). Keeping
22
- # DEFAULT_NAMES an explicit subset (not ALL.keys) is what keeps the M4 default
23
- # survivor set unchanged.
18
+ # DEFAULT_NAMES is the v1 default set (Tier-1 plus statement-removal).
19
+ # The six Tier-2 operators live in ALL but are OFF by default — they only
20
+ # run when named via `--operators` or `operators:` in `.mutineer.yml`.
21
+ # Keeping DEFAULT_NAMES an explicit subset (not ALL.keys) is what keeps
22
+ # the default survivor set unchanged.
24
23
  class MutatorRegistry
25
24
  # All available mutator classes keyed by operator name.
26
25
  ALL = {
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Mutineer
4
4
  # Current Mutineer release version.
5
- VERSION = "1.0.1"
5
+ VERSION = "1.0.2"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mutineer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Teren