Plan: Cut v0.2.0 and move release notes to changelog fragments

Status

Done (2026-11-11) — U1–U3 merged and v0.2.0 cut; U4’s pre-push fragment check is dropped by ruling (#2976); correcting the pre-commit reminder to name changelog.d/ is #2989’s change.

Erratum (2026-11-11): U4 is not built. The maintainer ruled the pre-push branch check and its Changelog: none trailer out; cargo xtask changelog check and MR review hold the rule. The pre-commit reminder still names CHANGELOG.adoc until #2989 lands, which makes it accept a staged fragment.

Erratum (2026-11-11): the release cadence this plan left out of scope (#2977) is ruled weekly, on the day the scheduled release-build runs; it is recorded in the git-workflow standard’s Release procedure.

Issues: #2861 (the release cut), #2862 (fragments). Unit issues are filed when the plan is approved, one per unit. Branches: chore/changelog-verb, chore/release-notes-ci, chore/release-v0-2-0, chore/changelog-fragment-check.

A Design + Scope plan: GitLab owns tracking; the plan freezes when U1 starts. The maintainer decided the eight forks below on 2026-11-06 (recorded on #2861 and #2862).

Context

  • The file. CHANGELOG.adoc is 3.8 MB and 40,716 lines. Its header (lines 1-9) claims Keep a Changelog and SemVer "starting from the first tagged release". == Unreleased (line 10) is its only level-2 heading, so everything in it is unreleased. Three eras sit below it: about 20 repeated === Added/Changed/Removed/Fixed groups (lines 12, 4552, 8867, 9208 … 20591) holding * #N (type; scope; impact): summary. … bullets; 913 per-commit === type(scope): subject (date) sections from 2026-05-02 to 2026-07-26 (lines 20603 … 39122); and a tail (lines 40637-40716) holding the v0.1.0-alpha content mixed with later bullets.

  • Ops notes are an inline clause, Ops: none. or prose (e.g. lines 61, 74, 93), 454 occurrences. Breaking changes are marked "pre-1.0 BREAKING/CHANGED" inside the bullet, as coding-conventions.adoc:246 and git-workflow.adoc:72 ask.

  • Versions. Cargo.toml:91 [workspace.package] version = "0.1.0", inherited by 69 crates. The one tag is v0.1.0-alpha (2026-03-20), annotated but unsigned, with a hand-written GitLab Release and no CHANGELOG section. Nine #[openapi(info(version = …))] literals have drifted: services/craig-{cases,composition,exchange,financial, placement,reporting,rules,security}/src/api/openapi.rs say "0.1.0", services/craig-intake/src/api/openapi.rs:15 says "0.2.0". utoipa-gen 6.0.1 falls back to CARGO_PKG_VERSION when version is omitted (utoipa-gen-6.0.1/src/openapi/info.rs:65-93).

  • Release CI. On a tag, .gitlab-ci.yml:333-364 runs sbom then release (release-cli:v0.24.0) with the fixed description "See CHANGELOG.adoc for release notes" (line 361). xtask/src/cmd/ci/pipeline_tests.rs:65-69 allow-lists the release-cli create prefix.

  • What reads the file. The pre-commit reminder (.githooks/pre-commit:63-68); the union merge driver (.gitattributes:19-21, #2860); the Docker-context canary (xtask/src/cmd/validate.rs:2446-2490; its test canary_dockerfile_lists_the_tracked_changelog_as_a_known_leak at 4213-4228); .dockerignore:10-13; lychee’s inputs (xtask/src/cmd/docs.rs:708-714); the host-gateway lint’s exemption (xtask/src/cmd/lints/host_gateway.rs:28). No lint parses entries. Antora does not include the file (docs/antora.yml), and could not: the body holds at least 222 unescaped {id}-style references that doc-attr-refs (xtask/src/cmd/lints/doc_attr_refs.rs) and Antora’s missing-attribute check reject.

  • Rules. "Entry under == Unreleased`" appears at `coding-conventions.adoc:221, delivery-protocol.adoc:111, plans/_template.adoc:76 and (as "the CHANGELOG.adoc entry") CONTRIBUTING.adoc:44, and in the injected agency guidance. The tagging protocol is annotated tags, a Release "with changelog highlights", and "every tag must have a corresponding entry" (git-workflow.adoc:133-141). AGENTS.md:54 maps "ops notes" to CHANGELOG.adoc.

So every MR inserts at the same line (train cars conflict; the union driver only hides that locally), the file is far beyond any reviewer’s budget, and v0.1.0-alpha breaks the "every tag has an entry" rule.

Decisions (maintainer, 2026-11-06)

  1. Old release notes live in a root changelog/ folder outside Antora.

  2. The v0.2.0 section is hand-written highlights plus the full verbatim archive. Upgrade posture: no in-place upgrade from v0.1.0-alpha; deploy fresh.

  3. The tag is v0.2.0, signed.

  4. Every MR carries a fragment, or a Changelog: none - <reason> trailer.

  5. The union merge driver for CHANGELOG.adoc is dropped at the cut.

  6. Fragment types are Keep a Changelog’s six.

  7. v0.1.0-alpha’s entry is recreated from its tag.

  8. The AGENTS.md Project Override reads: "Release notes are changelog.d/ fragments, not CHANGELOG.adoc == Unreleased."

Design

Fragments: changelog.d/<issue>[.<slug>].<type>.adoc

  • <issue> is the GitLab issue number; <slug> ([a-z0-9-]+) separates a second MR on the same issue; <type> is added | changed | deprecated | removed | fixed | security. Docs-only changes use changed.

  • The body is today’s bullet: one top-level * #<issue> … item with indented continuation lines, carrying exactly one Ops: clause (none. or prose), no headings and no attribute entries.

  • At release the fold derives an === Ops notes list (* #N: <clause>) from every fragment whose clause is not none.: operators get one list, and authors write the note once.

  • changelog.d/README.adoc states the grammar, keeps the directory present with no fragments, and is the canary’s probe.

  • Rejected: a separate ops fragment (two files, one forgettable); YAML front matter (not the house style); towncrier-style names without a slug (two MRs on one issue collide).

Assembly: cargo xtask changelog

Surveyed 2026-11-06 (PyPI, crates.io and GitHub release APIs): towncrier 26.9.0 (Python; a second toolchain in a repo whose only task runner is xtask, and the ops index needs custom templates); git-cliff 2.14.2 and GitLab’s changelog API (built from commit subjects or trailers, Markdown out; CRAIG’s notes are reviewed prose and can’t be fixed after merge); changie 1.26.0 (Go binary, YAML-wrapped fragments); knope 0.23.2 and scriv 1.8.0 (Markdown/reST only). An xtask verb is AsciiDoc-native, plugs into the existing step machinery and nextest/proptest coverage, and adds no dependency (xtask already has toml_edit, regex and proptest).

xtask/src/cmd/changelog.rs (submodules; functions ≤ 40 lines), a Command::Changelog variant in xtask/src/cmd/mod.rs (its help test at line 349) dispatched from xtask/src/main.rs:

  • check: every fragment’s grammar is valid, and == Unreleased holds only the fixed pointer paragraph. Both are state checks on the tree, so they are correct on a merge-train result.

  • release --version X.Y.Z [--date D]: refuses if == vX.Y.Z exists or there are no fragments; moves the previous latest release section verbatim to changelog/v<prev>.adoc, refusing if that file already exists (v0.2.0’s section is highlights whose archive U3 writes by hand, so the first post-cut release leaves the highlights where they are and changelog/v0.2.0.adoc untouched: the refusal, not a convention, protects the 40,716-line archive); writes == vX.Y.Z (D) as Ops notes then the six groups in Keep a Changelog order, each sorted by issue number descending then slug; sets Cargo.toml [workspace.package] version through toml_edit; deletes the fragments. It neither commits nor tags. Steady state: CHANGELOG.adoc holds Unreleased, the latest release in full, and any earlier section whose archive already existed.

  • notes --version vX.Y.Z --out <file>: that release’s section as Markdown for the GitLab Release, with absolute links to CHANGELOG.adoc and changelog/ at the tag.

Guard, lint and docs

  • State check (blocking everywhere): changelog check runs in run_doc_lint_head (validate.rs:575, beside enforce_no_sleep_polls at line 600), so it is in ci lint --quick, the pre-push hook and the train lint job, which runs on every train with no path filter (.gitlab-ci.yml:86-89).

  • Branch check (blocking, pre-push only): a step of validate --profile fast outside run_doc_lint_head. The branch must add at least one changelog.d/ fragment against git merge-base HEAD origin/main, or carry a Changelog: none - <reason> trailer in that range. It runs only before push: on a train the diff from the base includes the cars ahead, whose fragments would satisfy a car that has none.

  • Pre-commit reminder (.githooks/pre-commit:63-68, non-blocking): passes when a changelog.d/*.adoc is staged or already on the branch, and names changelog.d/. Only the maintainer edits .githooks/; U3 ships the text for the maintainer to apply. If pi carries its own copy of the reminder, that is one comment on the gadhs/pi standing feedback issue.

  • Docs: "entry under == Unreleased`" becomes "a fragment in `changelog.d/ (README there), folded at release" in coding-conventions.adoc:221, delivery-protocol.adoc:111, plans/_template.adoc:76, CONTRIBUTING.adoc:44,223 and known-issues.adoc (lines 292, 300 and 321, which describe the CHANGELOG.adoc rebase conflicts fragments end). git-workflow.adoc § Tagging Protocol gains the release procedure (its canonical page; no new page). AGENTS.md:54 is repointed and the dated override added. The frozen plans that say == Unreleased are not edited: the README says that phrase now means a fragment.

The v0.2.0 cut

  • CHANGELOG.adoc becomes: the header, the Unreleased pointer, == v0.2.0 (D) with hand-written highlights (≤ 150 lines: one bullet per delivered epic or area, a paragraph on pre-1.0 breaking changes, and the upgrade posture) and a link to changelog/v0.2.0.adoc; then == v0.1.0-alpha (2026-03-20) linking changelog/v0.1.0-alpha.adoc.

  • changelog/v0.2.0.adoc is today’s body moved verbatim (git mv, title and heading edited). changelog/v0.1.0-alpha.adoc is git show v0.1.0-alpha:CHANGELOG.adoc (86 lines) with its heading renamed. The ~75 alpha lines interleaved in the v0.2.0 archive stay where they are (verbatim beats perfect). GitLab renders both files.

  • Version sites: Cargo.toml:91 → 0.2.0, Cargo.lock regenerated, the nine utoipa version = … literals deleted (they fall back to CARGO_PKG_VERSION), and api-docs --check refuses a spec whose info.version differs from the workspace version.

  • Tag: git tag -s v0.2.0 -m "v0.2.0 - <one line>" <cut merge SHA>, OpenPGP-signed with the maintainer’s key, pushed explicitly, pointing at the cut’s merge commit even if later MRs have merged.

  • Release: the tag pipeline’s sbom job runs cargo xtask changelog notes, and release-cli create --description reads that file (U2 verifies release-cli v0.24.0 reads a path). The SBOM link stays.

Migration and the train race

  • The cut MR is announced on #2861 and runs as the only car; its commits are regenerated on fresh main at rebase time (git mv again, never a hand-merge of 40k lines). Proof the move is verbatim: git diff -M90% <main>:CHANGELOG.adoc changelog/v0.2.0.adoc shows only the title and heading lines.

  • Dropping merge=union makes a stale branch conflict loudly on rebase. If a stale bullet still reaches a train, the state check fails the car with "move it to `changelog.d/<issue>.<type>.adoc`".

  • After the cut, CHANGELOG.adoc changes only through changelog release.

Risks

Risk Class Mitigation and the test that pins it

A car merged ahead of the cut adds a bullet that lands in neither the archive nor a fragment.

silent

The state check fails the cut car on the train; the verbatim -M diff is a U3 verification step.

A fragment lands without its ops note.

silent

check requires exactly one Ops: clause; fixture tests for zero and two (U1).

The branch check counts the cars ahead on a train.

fail-open

It runs pre-push only; trains run state checks only. U4 test: a range whose only fragment came from a merged ancestor fails.

A fragment or the archive busts Docker’s COPY . . cache layers (#1977), so every image rebuilds on each car.

silent

.dockerignore gains changelog.d/ and changelog/; the canary lists changelog.d/README.adoc (U1; the canary_dockerfile_lists_the_tracked_changelog_as_a_known_leak test, validate.rs:4213-4228, updated).

An OpenAPI version drifts from Cargo again.

silent

api-docs --check refuses a spec whose info.version differs from the workspace version (U3).

A later changelog release archives v0.2.0’s highlights over the hand-written archive.

silent

release refuses to overwrite an existing changelog/v<prev>.adoc. Test (U1): a fixture with that file present leaves it byte-identical and keeps the section in CHANGELOG.adoc.

Scope — units (one MR each, in order)

Unit Delivers Proves (tests)

U1 (#2862)

cargo xtask changelog check / release / notes and changelog.d/README.adoc. .dockerignore gains changelog.d/ and changelog/; host_gateway.rs:28 exempts both; DEADLINK_INPUTS adds changelog/.adoc and changelog.d/.adoc; the canary gains the probe. Not yet wired into validate.

Property (proptest): release keeps every fragment body byte for byte, and its order is a deterministic function of the filenames. Golden: a fixture changelog.d/ folds into the expected section, Ops notes included. Refusals: bad filename, wrong type, #N not matching the filename, zero or two Ops:, a heading in a body, an existing version, an existing archive file for the previous section. The toml_edit bump keeps Cargo.toml comments. The canary and host-gateway tests are updated. Docs: quality-gates.adoc gains the verb. Relates to #2862.

U2 (#2861)

The sbom job runs cargo xtask changelog notes --version $CI_COMMIT_TAG --out release-notes.md into its artifacts; release passes the file to --description; pipeline_tests.rs updated.

Golden Markdown for a highlights section (bold, code, links to the tag). Pipeline contract: the release job’s description comes from the artifact and no new shell line appears, with a fail case. Relates to #2861.

U3 (#2861)

The cut, in reviewable commits: (1) git mv CHANGELOG.adoc changelog/v0.2.0.adoc plus the title and heading edit; (2) changelog/v0.1.0-alpha.adoc; (3) the new CHANGELOG.adoc with the highlights and the upgrade posture, and the union line dropped from .gitattributes; (4) the version bump, the nine OpenAPI literals deleted, the api-docs --check version rule; (5) the switch: the state check in run_doc_lint_head, the pre-commit text (for the maintainer to apply), every doc in § Guard, and the AGENTS.md override. After merge, outside the MR: the signed tag on the merge SHA, the tag pipeline, the Release page checked. Closes #2861 (the SHA noted there).

The verbatim -M diff. check fails on a planted Unreleased bullet. api-docs --check fails on a planted version = "9.9.9", and every served spec reports 0.2.0. cargo xtask validate green. The Release page shows the highlights and the SBOM link.

U4 (#2862)

The pre-push branch check with the Changelog: none - <reason> trailer. quality-gates.adoc lists both checks. Closes #2862; the plan’s Status is set to Done and the plan is archived with its archive.adoc row (plans/_template.adoc, CONTRIBUTING.adoc:49-55).

Real git in a temp repo (hermetic, #2964): a branch with a fragment passes; one without fails; one with the trailer passes; a trailer without a reason fails; a fragment that only an ancestor merge brought fails.

Every unit carries its own release note: U1 and U2 as CHANGELOG.adoc bullets (the switch is U3), U3’s highlights cover U1 and U2, and U4 as a fragment. Each unit updates its canonical doc page as listed.

Out of scope (issues filed at approval)

  • A release cadence (#2861’s item 3).

  • Replacing release-cli with glab release.

  • Escaping the archive for an Antora rendering.

  • Splitting the ~75 interleaved alpha lines out of the v0.2.0 archive.

Verification

After U3, CHANGELOG.adoc is under 300 lines. git tag -v v0.2.0 verifies. The v0.2.0 GitLab Release carries the highlights and the SBOM. A test MR with no fragment is refused at push. A stale MR that edits == Unreleased is refused on the train.

Edit this page · latest