Polish changelog fragments with claude -p at release time

- Replace `renderGroupedChanges` with `polishFragmentsWithClaude` that pipes fragments through `claude -p --model sonnet` to merge related items, drop housekeeping noise, and produce user-facing release notes
- Internal fragments kept in CHANGELOG.md under a `<details>` collapse; dropped from GitHub release notes entirely
- CI no longer auto-runs `changelog:build` on tag-based releases — fails fast with a clear error if `changes/*.md` fragments are still pending; build locally and commit before tagging
- Add `runClaude` dep-injection seam to test surface; add failure-mode coverage (missing binary, empty output, missing headers, missing `<details>` wrapper)
- Delete implemented design doc; update `changes/README.md` and `docs/RELEASING.md` with claude CLI prerequisite and new workflow
This commit is contained in:
2026-05-02 19:51:43 -07:00
parent baabdb6d30
commit 27f5b2bb58
9 changed files with 586 additions and 318 deletions
+6 -3
View File
@@ -36,9 +36,12 @@ test('release workflow verifies a committed changelog section before publish', (
assert.match(releaseWorkflow, /bun run changelog:check/);
});
test('release workflow builds changelog artifacts when fragments are pending', () => {
assert.match(releaseWorkflow, /Build changelog artifacts for release/);
assert.match(releaseWorkflow, /changelog:build --version/);
test('release workflow guards against pending changelog fragments instead of auto-building them', () => {
assert.match(releaseWorkflow, /Guard against pending changelog fragments/);
assert.match(releaseWorkflow, /::error::Pending changelog fragments detected/);
assert.match(releaseWorkflow, /Run 'bun run changelog:build --version/);
assert.doesNotMatch(releaseWorkflow, /Build changelog artifacts for release/);
assert.doesNotMatch(releaseWorkflow, /bun run changelog:build --version "\$\{\{ steps\.version/);
});
test('release workflow verifies generated config examples before packaging artifacts', () => {
+1 -4
View File
@@ -2,10 +2,7 @@ import assert from 'node:assert/strict';
import test from 'node:test';
import { SPECIAL_COMMANDS } from '../../config/definitions';
import {
describeSessionHelpCommand,
formatSessionHelpKeybinding,
} from './session-help.js';
import { describeSessionHelpCommand, formatSessionHelpKeybinding } from './session-help.js';
test('session help describes sub-seek commands as subtitle-line navigation', () => {
assert.equal(describeSessionHelpCommand(['sub-seek', 1]), 'Jump to next subtitle');