Historic PR-documentation is not maintained along with new PRs — treat it as a snapshot, not as current documentation.
The Problem
UiFormats.repoStatusLine is the last method above the Kotlin target of 15:
Method
Mutation-CRAP
Complexity
Mutation score
UiFormats.repoStatusLine
16.03
16
0.95
It words the second line of a Repositories page entry for a running, a pending and a finished newest build in one method.
Its complexity alone is above 15, so tests cannot bring it down; it needs the split.
Non-Goals
No change in behaviour: every line reads as before, and werkator.js (repoStatusLine) is untouched.
The Scenarios
Feature: the status line names what there is
Scenario#126.01: the status line names only what there is
So that a line never ends in a separator or names a count of zero.
Given a pending newest build with no other build running
Then the line reads waiting 2:14
Given a running newest build with no other build pending
Then the line reads running for 2:14
Given a finished build with a permalink and no artifact
Then the line reads 4:51 · permalink
Given a finished build with an artifact and no duration
Then the line reads artifact
Verified by
UiViewsUnitTestthe status line names only what there is: no other builds, no duration, no artifact (Scenario#126.01), and the status line says what the newest build's status means in numbers (Scenario#37.02)
The Solution
repoStatusLine picks the line by the newest build's status:
activeLine words a running and a pending build alike: how long it has been at it, and the builds of the other kind beside it;
finishedLine words the duration and what the build left.
This follows the shape of the script's repoStatusLine, which already handles the two active states alike.
A local PIT run of UiFormats afterwards:
Method
Mutation-CRAP
Complexity
Mutation score
UiFormats.repoStatusLine
5
5
1.00
UiFormats.activeLine
3
3
1.00
UiFormats.finishedLine
10
10
1.00
The highest score left in UiFormats is swapLevel at 12.05.
No method of the project is above 15 any more; the highest is ConfigLoader.checkRestartsInstance at exactly 15.00, with complexity 15 and every mutant killed.
So the gate goes down from 17 to the target of 15.
The gate refuses a method that exceeds the limit, so 15.00 passes; but a single surviving mutant in checkRestartsInstance would now fail the nightly build.
Additional Changes
maxMutationCrap in build.gradle.kts lowered from 17 to 15, and its comment says the ratchet has reached the target.
Version 1.37.7 with its entry in releases.html.
Prerequisite PRs
PR#104: the target of 15 and the first gate.
PR#111 to PR#125: the refactorings that brought the gate down from 35.
> Historic PR-documentation is not maintained along with new PRs — treat it as a snapshot, not as current documentation.
## The Problem
`UiFormats.repoStatusLine` is the last method above the Kotlin target of 15:
| Method | Mutation-CRAP | Complexity | Mutation score |
|----------------------------|---------------|------------|----------------|
| `UiFormats.repoStatusLine` | 16.03 | 16 | 0.95 |
It words the second line of a Repositories page entry for a running, a pending and a finished newest build in one method.
Its complexity alone is above 15, so tests cannot bring it down; it needs the split.
## Non-Goals
- No change in behaviour: every line reads as before, and `werkator.js` (`repoStatusLine`) is untouched.
## The Scenarios
### Feature: the status line names what there is
#### Scenario#126.01: the status line names only what there is
So that a line never ends in a separator or names a count of zero.
- **Given** a pending newest build with no other build running
- **Then** the line reads `waiting 2:14`
- **Given** a running newest build with no other build pending
- **Then** the line reads `running for 2:14`
- **Given** a finished build with a permalink and no artifact
- **Then** the line reads `4:51 · permalink`
- **Given** a finished build with an artifact and no duration
- **Then** the line reads `artifact`
##### Verified by
- [UiViewsUnitTest](../../src/test/kotlin/de/hoennig/werkator/server/UiViewsUnitTest.kt) `the status line names only what there is: no other builds, no duration, no artifact (Scenario#126.01)`, and `the status line says what the newest build's status means in numbers (Scenario#37.02)`
## The Solution
`repoStatusLine` picks the line by the newest build's status:
- `activeLine` words a running and a pending build alike: how long it has been at it, and the builds of the other kind beside it;
- `finishedLine` words the duration and what the build left.
This follows the shape of the script's `repoStatusLine`, which already handles the two active states alike.
A local PIT run of `UiFormats` afterwards:
| Method | Mutation-CRAP | Complexity | Mutation score |
|----------------------------|---------------|------------|----------------|
| `UiFormats.repoStatusLine` | 5 | 5 | 1.00 |
| `UiFormats.activeLine` | 3 | 3 | 1.00 |
| `UiFormats.finishedLine` | 10 | 10 | 1.00 |
The highest score left in `UiFormats` is `swapLevel` at 12.05.
No method of the project is above 15 any more; the highest is `ConfigLoader.checkRestartsInstance` at exactly 15.00, with complexity 15 and every mutant killed.
So the gate goes down from 17 to the target of 15.
The gate refuses a method that exceeds the limit, so 15.00 passes; but a single surviving mutant in `checkRestartsInstance` would now fail the nightly build.
## Additional Changes
- `maxMutationCrap` in `build.gradle.kts` lowered from 17 to 15, and its comment says the ratchet has reached the target.
- Version 1.37.7 with its entry in `releases.html`.
## Prerequisite PRs
- PR#104: the target of 15 and the first gate.
- PR#111 to PR#125: the refactorings that brought the gate down from 35.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
mi
changed title from WIP: The Repositories page's status line split by status to The Repositories page's status line split by status, gate at the target of 15 (v1.37.7)2026-10-05 20:13:37 +02:00
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.
The Problem
UiFormats.repoStatusLineis the last method above the Kotlin target of 15:UiFormats.repoStatusLineIt words the second line of a Repositories page entry for a running, a pending and a finished newest build in one method.
Its complexity alone is above 15, so tests cannot bring it down; it needs the split.
Non-Goals
werkator.js(repoStatusLine) is untouched.The Scenarios
Feature: the status line names what there is
Scenario#126.01: the status line names only what there is
So that a line never ends in a separator or names a count of zero.
waiting 2:14running for 2:144:51 · permalinkartifactVerified by
the status line names only what there is: no other builds, no duration, no artifact (Scenario#126.01), andthe status line says what the newest build's status means in numbers (Scenario#37.02)The Solution
repoStatusLinepicks the line by the newest build's status:activeLinewords a running and a pending build alike: how long it has been at it, and the builds of the other kind beside it;finishedLinewords the duration and what the build left.This follows the shape of the script's
repoStatusLine, which already handles the two active states alike.A local PIT run of
UiFormatsafterwards:UiFormats.repoStatusLineUiFormats.activeLineUiFormats.finishedLineThe highest score left in
UiFormatsisswapLevelat 12.05.No method of the project is above 15 any more; the highest is
ConfigLoader.checkRestartsInstanceat exactly 15.00, with complexity 15 and every mutant killed.So the gate goes down from 17 to the target of 15.
The gate refuses a method that exceeds the limit, so 15.00 passes; but a single surviving mutant in
checkRestartsInstancewould now fail the nightly build.Additional Changes
maxMutationCrapinbuild.gradle.ktslowered from 17 to 15, and its comment says the ratchet has reached the target.releases.html.Prerequisite PRs
🤖 Generated with Claude Code
WIP: The Repositories page's status line split by statusto The Repositories page's status line split by status, gate at the target of 15 (v1.37.7)