After PR#32 six methods of werkcrappit-pit still had a Mutation-CRAP of 10 or more, so their classes were red and a gate at 10, as in hsadmin-ng, would fail: Json.write 11, MarkdownReport.finished 10.9, Json.string 10.4, Gate.judge and JsonReader.escaped 10.3, Levelization.levelize 10.
Two of them were too complex to go below 10 even with every mutant killed; the others had surviving mutants.
Non-Goals
New behaviour: only tests and splits; the reports are byte for byte the same.
The Solution
Splits along the steps of the domain, not only to cut lines:
Levelization.levelize follows ccsh's levelization in three named steps: a SiblingGraph lifts the dependencies onto the children of a folder, breakCycles breaks its cycles, and layers assigns the levels.
Json.write lays out the structures, objects and arrays; a scalar is written in one piece, and a number has its own rules, as JSON knows neither NaN nor infinity.
MarkdownReport.finished writes the report's sections, one method each: header, summary, scored methods, methods without score, exclusion rules.
Gate.judge only needs to know whether any method was scored, not how many: a counter became a flag.
Tests for the mutants that survived: control characters against the space in Json.string, the exact errors of JsonReader at an early end, an unterminated escape and a short \u escape, the scope lines of the Markdown report, NaN and exact numbers in Json.write, and a gate without a note when every method is scored.
The ratchet goes to maxMutationCrap = 9, the highest value now; colorRedFrom is dropped, so red starts at 90 % of the limit, 8.1, still before the build fails.
Version 0.16.4.
Attachments
Local PIT runs of werkcrappit-pit
PR#32
This PR
Highest Mutation-CRAP
11.0
9.0
Methods at 10 or more
6
0
Classes at 9 or more
6 of 45
3 of 45 (exactly 9: complexity 9, every mutant killed)
## Related Links
- [PR#32](2026-10-03-PR%2332-split-complex-methods.md), which left six methods at 10 or above
## The Problem
After PR#32 six methods of werkcrappit-pit still had a Mutation-CRAP of 10 or more, so their classes were red and a gate at 10, as in hsadmin-ng, would fail:
`Json.write` 11, `MarkdownReport.finished` 10.9, `Json.string` 10.4, `Gate.judge` and `JsonReader.escaped` 10.3, `Levelization.levelize` 10.
Two of them were too complex to go below 10 even with every mutant killed; the others had surviving mutants.
## Non-Goals
- New behaviour: only tests and splits; the reports are byte for byte the same.
## The Solution
Splits along the steps of the domain, not only to cut lines:
- `Levelization.levelize` follows ccsh's levelization in three named steps: a `SiblingGraph` lifts the dependencies onto the children of a folder, `breakCycles` breaks its cycles, and `layers` assigns the levels.
- `Json.write` lays out the structures, objects and arrays; a `scalar` is written in one piece, and a `number` has its own rules, as JSON knows neither NaN nor infinity.
- `MarkdownReport.finished` writes the report's sections, one method each: header, summary, scored methods, methods without score, exclusion rules.
- `Gate.judge` only needs to know whether any method was scored, not how many: a counter became a flag.
Tests for the mutants that survived: control characters against the space in `Json.string`, the exact errors of `JsonReader` at an early end, an unterminated escape and a short `\u` escape, the scope lines of the Markdown report, NaN and exact numbers in `Json.write`, and a gate without a note when every method is scored.
The ratchet goes to `maxMutationCrap = 9`, the highest value now; `colorRedFrom` is dropped, so red starts at 90 % of the limit, 8.1, still before the build fails.
Version 0.16.4.
## Attachments
### Local PIT runs of werkcrappit-pit
| | PR#32 | This PR |
|---|---|---|
| Highest Mutation-CRAP | 11.0 | 9.0 |
| Methods at 10 or more | 6 | 0 |
| Classes at 9 or more | 6 of 45 | 3 of 45 (exactly 9: complexity 9, every mutant killed) |
| Mutants killed | 88 % | 89 % |
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Related Links
The Problem
After PR#32 six methods of werkcrappit-pit still had a Mutation-CRAP of 10 or more, so their classes were red and a gate at 10, as in hsadmin-ng, would fail:
Json.write11,MarkdownReport.finished10.9,Json.string10.4,Gate.judgeandJsonReader.escaped10.3,Levelization.levelize10.Two of them were too complex to go below 10 even with every mutant killed; the others had surviving mutants.
Non-Goals
The Solution
Splits along the steps of the domain, not only to cut lines:
Levelization.levelizefollows ccsh's levelization in three named steps: aSiblingGraphlifts the dependencies onto the children of a folder,breakCyclesbreaks its cycles, andlayersassigns the levels.Json.writelays out the structures, objects and arrays; ascalaris written in one piece, and anumberhas its own rules, as JSON knows neither NaN nor infinity.MarkdownReport.finishedwrites the report's sections, one method each: header, summary, scored methods, methods without score, exclusion rules.Gate.judgeonly needs to know whether any method was scored, not how many: a counter became a flag.Tests for the mutants that survived: control characters against the space in
Json.string, the exact errors ofJsonReaderat an early end, an unterminated escape and a short\uescape, the scope lines of the Markdown report, NaN and exact numbers inJson.write, and a gate without a note when every method is scored.The ratchet goes to
maxMutationCrap = 9, the highest value now;colorRedFromis dropped, so red starts at 90 % of the limit, 8.1, still before the build fails.Version 0.16.4.
Attachments
Local PIT runs of werkcrappit-pit
🤖 Generated with Claude Code