fix(x): release caption uses curated CHANGELOG headlines, not commit subjects (#607)

draft_release_post was fed highlights=list(report.change_summary) — raw
per-commit subjects — so the announcement model parroted the top commit
('RoboCo API v0.26.0 is out: docs: curate the full Unreleased body #601').
New pure changelog_highlights() extracts the bold feature leads from the
curated release entry (report.drafted_changelog), stripping PR refs and
trailing periods; approve() prefers those and falls back to change_summary
only when the changelog yields nothing. The video captions were already
good because the authoring dev read the changelog — same source now.

Co-authored-by: Renn F <rennf93@users.noreply.github.com>
This commit is contained in:
Renzo F
2026-07-20 10:35:29 +02:00
committed by GitHub
co-authored by Renn F
parent bf1012e952
commit 57b9e76b12
3 changed files with 57 additions and 2 deletions
+24
View File
@@ -1398,3 +1398,27 @@ async def test_draft_release_post_uses_project_name_when_set(
assert body is not None
assert "Acme Robotics" in body
assert "RoboCo" not in body
def test_changelog_highlights_extracts_feature_headlines() -> None:
entry = (
"## [0.26.0] - 2026-07-20\n\n"
"### Security\n\n"
"- **Orchestrator API is off the public internet (GHSA-4f7g).** Both "
"composes published :8000 on 0.0.0.0.\n\n"
"### Added\n\n"
"- **Telegram Mini App V5 — brand voice and an operations ring (#583).** "
"Share Tech Mono becomes the display face.\n"
"- **Forge program: GitHub, Gitea, and GitLab (#575, #581).** One API.\n"
)
hl = x_engine_module.changelog_highlights(entry)
assert hl[0] == "Orchestrator API is off the public internet (GHSA-4f7g)"
assert hl[1] == "Telegram Mini App V5 — brand voice and an operations ring"
assert hl[2] == "Forge program: GitHub, Gitea, and GitLab"
# No raw commit-subject noise, no trailing PR refs or periods.
assert all("#" not in h.split("(GHSA")[0] for h in hl)
def test_changelog_highlights_empty_on_no_leads() -> None:
body = "## [0.26.0]\n\nplain prose, no bold leads\n"
assert x_engine_module.changelog_highlights(body) == []