draft-release: framing-intro line-breaks render as hard breaks in release body #54
Labels
No labels
bump
major
bump
minor
bump
patch
kind/bug
kind/chore
kind/docs
kind/feature
priority/critical
priority/high
priority/low
priority/medium
size/L
size/M
size/S
size/XL
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
frankenbit/release-toolkit#54
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom
Release headers/bodies show hard line breaks where the CHANGELOG framing intro paragraphs were soft-wrapped. Operator has had to remove them manually on multiple cuts (v0.3.3, v0.3.4 confirmed). "Again" pattern → recurring footgun.
Root cause
scripts/draft-release.shextracts the CHANGELOG section viachangelog_get_section_contentand posts it verbatim as the release body. The framing intro paragraphs in our CHANGELOG style are hard-wrapped at ~70 chars per line (markdown convention for source readability) — single newlines within a paragraph.Forgejo's release-body markdown renderer treats single newlines as hard breaks (GitHub-Flavored Markdown behavior — line break preservation), not as soft-wrap-to-space. So the source:
renders with three visible line breaks instead of as one wrapped paragraph.
Two fix dispositions
(A) Author-side discipline — stop hard-wrapping paragraphs in CHANGELOG. Write framing intros as single long lines, accept ugly source for clean output. Trade-off: CHANGELOG source becomes harder to read in editors that don't soft-wrap, but renders cleanly everywhere.
(B) Toolkit-side normalization —
draft-release.shorchangelog_get_section_contentunwraps single newlines (= treat as space) and preserves double newlines (= paragraph break) before posting to the Forgejo API. Standard Markdown reflow. Trade-off: introduces a normalization step that has to handle edge cases (code blocks, lists, etc.).(B) is the substrate-honest fix — it doesn't ask consumers to remember a wrap-discipline. (A) is the quick patch.
Acceptance criteria
scripts/draft-release.shat commit232ca39(v0.6.2 substrate sweep, closes #54).draft-release.sh(lines ~130–165 onforgejo/main) tracksin_fencefor```toggles, and skips join for structural markdown (headings#, list items-/*/+/N., blockquotes>, tables|, hr---).2d6d1e6("fold(Surveyor 2c1e): #54 test coverage") adding 3 tests totests/draft-release.bats, incl.wrapped-paragraph-joinedasserting hard-wrapped paragraphs join to single-line + list items NOT joined into prev paragraph.Refs
Surfaced by operator on v0.3.4 cut, 2026-06-25. Recurring (v0.3.3 confirmed; older cuts likely too).
AC-hygiene sweep 2026-07-24 (Quartermaster; per Bosun 3f6b dispatch): all 4 ACs substrate-verified as done-not-ticked → ticked with evidence pointers.