actions/changelog-monotonic — shipped release headings are append-only #6
Labels
No labels
attention
blocked
blocker:ci-red
blocker:conflict
blocker:drill-pending
blocker:unrequested
bug
claimed
documentation
enhancement
epic
merge-next
needs-ruling
needs-triage
offsite
post-merge
ready
release
scope:docs
scope:guards
scope:labels
scope:release-flow
stale
state:addressing
state:bots-reviewing
state:building
state:needs-human
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: heavy-duty/ceremony#6
Loading…
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?
Part of #1. Blocked by #2, #5 (the composite pattern). Blocks #13–#16.
Goal
actions/changelog-monotonic/— the append-only guard for shipped release headings, as a composite action. All three repos carry mechanically-identical copies (box 225 / rig 244 / cast 250 lines; the diffs are comments and incident numbers): box · rig · cast. Port from box (origin of the guard — box#122, caught in review of box#118), fold in cast's port notes.What it guards, and why the armed guard can't
An author adding an entry under
## Unreleasedreplaces the heading below it instead of inserting above. Git merges that cleanly; the shipped section's body is silently absorbed into## Unreleased; the extraction anchor for that version is gone, and the next release republishes the absorbed prose as new. The armed guard (#5) is green on exactly that tree — it only checks the TOP heading. "A heading disappeared" is not a property of a tree; it is a property of a diff — which is why this is a separate script with a git-history input, not a clause inside changelog-armed (the source header gives three reasons; keep them).The rule (exact)
## X.Y.Zheading in the changelog (runs even when no base is available).## X.Y.Zversion headings at HEAD must be a superset of the set at the merge base. Superset is exact — release headings are append-only in the documented flow; the ceremony's own stamp passes by construction (rewrites## Unreleased→## X.Y.Z — DATE: adds one, removes none).## Unreleasedis deliberately not in the guarded set — #5 owns that heading and the ceremony legitimately consumes it.CHANGELOG_MONOTONIC_STRICT=1, in which case it is a hard failure telling the operator to fix the checkout (fetch-depth: 0), not the script. CI always sets STRICT — "a guard that can silently stop guarding is the failure shape this whole family of checks exists to refuse."Composite action
actions/changelog-monotonic/{action.yml,changelog-monotonic.sh}, pattern from #5. Inputs:base-ref— defaultorigin/${{ github.base_ref || github.ref_name }}(this is exactly how all three ci.ymls invoke it, e.g. rig ci.yml L79); the action resolves the expression, the script just takes a ref.changelog— defaultCHANGELOG.md.strict— default"1"(it runs in CI; the local-run default lives in the script as today:CHANGELOG_MONOTONIC_STRICT:-0).Document in
action.yml's description: requiresfetch-depth: 0on the consumer's checkout, and what happens if it's missing (a red STRICT failure that names the fix). This guard needs no version source — it never reads VERSION/package.json.Tests (
test/changelog-monotonic.test.sh)These need real constructed git repos (
git initinmktemp -d, commit base changelog, branch, commit mutation, run against the base ref):## Unreleased→## X.Y.Z — DATE+ fresh## Unreleasedabove) → pass.## Unreleased) → fail, names the missing version.0.7.0vs0.7.0-rc1treated as distinct set members.Acceptance criteria
uses: ./actions/changelog-monotonicin this repo's CI (against this repo's own history once #11 gives it a changelog; until then a scratch fixture job).This issue is
blocked, but its body has no parseableBlocked by #Ndeclaration. The sweep will not guess the dependency.Unblocked →
ready.Named blockers have landed: #2 (scaffold + test harness, PR #25) and #5 (
actions/changelog-armed, PR #33 — the composite pattern this issue follows). Nothing else stands in the way; a builder can claim it now.Claiming — starting now. Branch
build/6-changelog-monotonic; draft PR follows shortly.