fix(release): bound the Reddit draft to the post limit

Telegram was bounded from the start; Reddit emitted every non-highlighted
body in full with no limit at all. This repository's own 132 accumulated
notes already render a ~37,000-character draft against Reddit's 40,000
limit, so roughly nine more maximum-length notes would produce a post that
cannot be submitted — after the release manager had already consumed the
notes that produced it.

The draft now trims from the tail of the grouped list, which is ordered
breaking then feature, fix and perf, so the least consequential entries go
first, and reports what it dropped. A breaking change is never dropped, and
highlights that do not fit on their own fail with an actionable error —
the same two rules the Telegram renderer already applied.

193 tests passing.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
4grayandClaude Fable 5 committed 2026-08-27 10:57:05 +02:00
1 parent 473a19a699
commit af6d102776
4 files changed
+121 -24

No files matched your search

+5 -1
View File
@@ -83,7 +83,11 @@ Highlights drive three behaviors:
longer post. If the breaking changes alone cannot fit the 4096-character
limit, the render fails with an actionable error rather than dropping one.
- **Reddit** gives each one an `## Highlights` subsection, with the remaining
changes grouped below.
changes grouped below. Bounded the same way at Reddit's 40,000-character
post limit — this repository's accumulated notes already render ~37,000 —
dropping from the tail of the grouped list, which is ordered breaking →
feature → fix → perf so the least consequential go first. A breaking change
is never dropped there either.
- **The blog scaffold** uses the highlight as a ready `###` heading instead of
emitting `TODO headline (<area>)`.