forked from heavy-duty/rig
The arming rule (#66) guards ONE heading — does the top section agree with VERSION? — and is silent about the rest of the file. The failure that lives there is an author adding an entry under `## Unreleased` who replaces the shipped heading below it instead of inserting above it. git merges the one-line edit cleanly, `changelog_armed()` stays green (correctly: the top section is still right), and the shipped release loses its section entirely. It surfaces a whole release later, when release.yml refuses to publish a section `changelog_section()` can no longer find by heading. "A heading disappeared" is a property of a DIFF, not of a tree, so this is its own script rather than a clause in the arming check — which is also driven from test/release.sh against constructed non-git VERSION + CHANGELOG pairs that could not express it. The rule needs no tuning: release headings are append-only, so SUPERSET is exact, and the ceremony's stamp passes by construction because `Unreleased` fails the version shape. Ported from heavy-duty/box#122, with box's second half intact: containment cannot catch a DUPLICATED heading, since the duplicate is head-side surplus and `comm -23` is blind to extras there — so uniqueness on HEAD is asserted alongside it. rig's symptom differs from box's and the comments say so: box's extractor re-arms on every `## ` line and ABSORBS what sits between the copies, while rig's `changelog_section()` has `if (found) exit` and TRUNCATES at the second copy, dropping the release's real body. Wired on pull requests only (on a push to main the merge base is HEAD, so the assert is vacuous), with CHANGELOG_MONOTONIC_STRICT=1 and fetch-depth: 0 so a checkout that cannot reach the base ref fails rather than skipping quietly forever. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| cli.sh | ||
| db-integration.sh | ||
| labels-reconcile.sh | ||
| release.sh | ||