CodeCharta keeps yellow with a ratchet (0.17.0) #35

Merged
mi merged 3 commits from claude/codecharta-yellow-range-ratchet-cdcde8 into main 2026-10-04 10:47:05 +02:00
Owner

Related Links

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

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

## 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)
mi added 2 commits 2026-10-04 10:27:51 +02:00
CodeCharta keeps yellow with a ratchet (0.17.0)
werkator build succeeded after 01:41
93ad2ce94f
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>
PR-doc numbered #35
werkator build succeeded after 01:36
2597a3f399
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mi referenced this issue from a commit 2026-10-04 10:27:51 +02:00
mi added 1 commit 2026-10-04 10:27:51 +02:00
PR-doc numbered #35
werkator build succeeded after 01:36
2597a3f399
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mi added 1 commit 2026-10-04 10:34:15 +02:00
Merge main: 0.16.5 of RFC 0002 below 0.17.0
werkator build succeeded after 01:35
1887e27045
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mi merged commit 298a2dbf7a into main 2026-10-04 10:47:05 +02:00
mi deleted branch claude/codecharta-yellow-range-ratchet-cdcde8 2026-10-04 10:47:05 +02:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mi/werkcrappit#35