Werkator uses maxMutationCrap as a ratchet: 650, just above today's highest value, lowered with every refactoring towards 15.
With codeCharta { colorRedFrom = 12 } the link set colorFrom=12&colorTo=12: green below 12, red from 12, no yellow.
Yellow started at half of maxMutationCrap, 325, capped at red.
It thus hung on a limit that a ratchet holds only for a while.
The KDoc of colorRedFrom, "yellow starts at its half", read as half of colorRedFrom, which it was not.
The Scenarios
@MC-CC-030 (changed) with colorRedFrom set, yellow starts at its half: colorFrom=6&colorTo=12 for 650 and 12.
@MC-CC-031 (new) codeCharta.colorYellowFrom sets where yellow starts; above where red starts the export fails.
## Related Links
- [ADR 0007](../adr/0007-codecharta-export.md), [PR#29](2026-10-03-PR%2329-codecharta-red-before-the-limit.md)
## The Problem
Werkator uses `maxMutationCrap` as a ratchet: 650, just above today's highest value, lowered with every refactoring towards 15.
With `codeCharta { colorRedFrom = 12 }` the link set `colorFrom=12&colorTo=12`: green below 12, red from 12, no yellow.
Yellow started at half of `maxMutationCrap`, 325, capped at red.
It thus hung on a limit that a ratchet holds only for a while.
The KDoc of `colorRedFrom`, "yellow starts at its half", read as half of `colorRedFrom`, which it was not.
## The Scenarios
- `@MC-CC-030` (changed) with `colorRedFrom` set, yellow starts at its half: `colorFrom=6&colorTo=12` for 650 and 12.
- `@MC-CC-031` (new) `codeCharta.colorYellowFrom` sets where yellow starts; above where red starts the export fails.
##### Verified by
- [CodeCityPageTest](../../werkcrappit-pit/src/test/java/de/javagil/werkcrappit/pit/codecharta/CodeCityPageTest.java)
- [CodeChartaFunctionalTest](../../werkcrappit-gradle-plugin/src/functionalTest/java/de/javagil/werkcrappit/gradle/CodeChartaFunctionalTest.java) `whereRedStartsIsConfigurable`
## The Solution
- `CodeCityPage.colorRange` halves `colorRedFrom` for yellow when it is set, else the limit, as before; without a limit 5 and 9 as before.
- `codeCharta { colorYellowFrom }` in the DSL; the export task checks it before it writes anything.
- The KDoc of `colorRedFrom` says which value yellow halves.
- Version 0.17.0: new behaviour and a new DSL key.
## Afterwards
Werkator takes the new version with its next feature pull request, not with one of its own.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
With codeCharta.colorRedFrom set, yellow starts at its half, not at half
of maxMutationCrap: a ratchet of 650 with red from 12 now links
colorFrom=6&colorTo=12 instead of no yellow at all.
codeCharta.colorYellowFrom sets where yellow starts, at most where red
starts (@MC-CC-030 changed, @MC-CC-031 new).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Werkator uses
maxMutationCrapas a ratchet: 650, just above today's highest value, lowered with every refactoring towards 15.With
codeCharta { colorRedFrom = 12 }the link setcolorFrom=12&colorTo=12: green below 12, red from 12, no yellow.Yellow started at half of
maxMutationCrap, 325, capped at red.It thus hung on a limit that a ratchet holds only for a while.
The KDoc of
colorRedFrom, "yellow starts at its half", read as half ofcolorRedFrom, which it was not.The Scenarios
@MC-CC-030(changed) withcolorRedFromset, yellow starts at its half:colorFrom=6&colorTo=12for 650 and 12.@MC-CC-031(new)codeCharta.colorYellowFromsets where yellow starts; above where red starts the export fails.Verified by
whereRedStartsIsConfigurableThe Solution
CodeCityPage.colorRangehalvescolorRedFromfor yellow when it is set, else the limit, as before; without a limit 5 and 9 as before.codeCharta { colorYellowFrom }in the DSL; the export task checks it before it writes anything.colorRedFromsays which value yellow halves.Afterwards
Werkator takes the new version with its next feature pull request, not with one of its own.
🤖 Generated with Claude Code