Skip to content
Like what we’re building? Star on GitHub

Release and changelog — how the cut reaches main ​

Floors, mirrors, refused cuts and the changelog pipeline, for the change that ships or reviews one (merge and gate).

Release and changelog ​

  • Floor pins — a syntax floor (bundle.SyntaxFloors: parser.ProfileSince, ImportSince, ContractSince, bundle.ToolAliasesSince) is pinned by the lot that ships the syntax to "next" while its release is uncut. It stays strictly above every numeric release, including when main advances while a branch waits. A numeric pin at exactly the next minor above the newest release still works; the release-floors report warns C168, pointing to "next". The cut writes the real number: release-it's before:git:beforeRelease hook runs go run ./cmd/release-floors --apply (internal/floorsalign) in the one slot where package.json is bumped and CHANGELOG.md is rendered while nothing is staged, so every pin the cut claims — strictly above the previous release, measured there and not against the version being cut, since a major bump leaves the pin below it — is rewritten to the version being released inside the chore: release commit itself. A pin already at a released version is left alone. Every requires: {iterion: ">= next"} in the shipped bot and example manifests joins the same staged rewrite; numeric manifest floors keep their own contract. Two symbolic pins in one cut receive the same version. Every other shape aborts the release before that commit: a numeric pin that is not the next minor above the previous release (an over-pin, or one a release overtook), a pin naming a release never cut, an unorderable pin, a floor with no entry in releaseNotesMarkers, and — the #1154 shape — a floor whose word the notes just rendered do not carry, which is what a feat merged under a non-conventional subject leaves behind. The rule is bundle.HoldSyntaxFloor, the same predicate TestSyntaxFloorsNameReleasesThatExist runs on every tree — the cut runs the test's predicate plus the resolution its rewrite needs (the pin's identifier declared in exactly one non-test file under pkg/, bound to a plain release literal or "next"), so it can refuse what the test lets pass, never the reverse. Either refusal is loud, and devbox run -- task release:floors previews the whole verdict on any checkout and writes nothing (--apply belongs to the hook and refuses to run unless package.json's version differs from the one HEAD carries). The hatch is the marker table's exemption (an empty marker with its reason beside it, parser.ProfileSince[2] the precedent): an exempted floor realigns through notes that say nothing about it.
  • After a realigned cut, the mirrors. The cut moves the CONSTANT, and whatever spells the number out has to follow. Two guards hold that, and both are required checks: the floor tests derive their expectations from the constants rather than repeating them — a probe that needs a release below a floor derives it from that floor (internal/floortest.Below), never from a lower pin, which names the floor itself the day two floors are cut in one release; floortest.EachPinOrder replays such a case with two pins on one release — keyed on parser.MaxProfile, the pin the cut moves, and run once where the live pins already carry that state — and floortest's own sweep (TestNoTestSpellsABelowFloorAsAnotherPin) fails any _test.go, the files routed through the helper included, that builds a floor from one pin while naming another, or that keys a collapse case on a profile pin read by a literal index. The hatch is a floortest:exempt comment NAMING the pin it covers, with the reason: it reaches that pin and no other, so one case cannot vouch for a sibling pin spliced in beside it. The sweep rejects literal symbolic test floors too ("next", ">= next"), unless floortest:exempt next explains a test of the symbolic contract itself. Below(t, "next") derives a numeric probe below the uncut floor. Also, TestEveryShippedBundleDeclaresAFloorThatReachesWhatItNeeds (pkg/bundle) walks the 41 shipped bots/*/ and examples/*/ manifests and refuses one whose requires.iterion no longer reaches what its own sources need — where iterion validate only warns (C252 is a warning, exit 0) while the push admission refuses the same bundle with a 409. What neither guard covers is a manifest left one release too HIGH after a downward realignment: that over-declares (the bundle refuses runners that could read it), and no arithmetic can tell an intended floor from a stale one. The cut names it instead of deciding: after realigning a pin DOWN (3.180.0 → 3.179.1), its report warns on every shipped bots/*/ and examples/*/ manifest whose requires.iterion still equals the pin's old value — path and value, right under the realignment line — and exits 0; a manifest already lowered, or carrying a deliberate floor, warns nothing, and whether to lower a warned one stays the operator's call.
  • A refused cut leaves the bump behind. The hook fails before release-it arms its rollback, so package.json, CHANGELOG.md, charts/iterion/Chart.yaml and internal/mdcode/testdata/committed-reading.txt stay modified and a second local run reports "Working dir must be clean". Restore them (git checkout -- package.json CHANGELOG.md charts/iterion/Chart.yaml internal/mdcode/testdata/committed-reading.txt) before retrying. CI is unaffected: version.yml runs on a fresh checkout and nothing was committed or pushed.
  • The cut re-pins the corpus reading. internal/mdcode's committed-reading golden pins every tracked .md, .yaml and .yml git does not mark linguist-generated, each pin keyed by its file's content hash: a file edited since the pin is not checked, so a doc edit needs no re-pin. The same slot then runs go run ./cmd/corpus-reading --cut (internal/corpusreading), the golden's periodic re-pin: it re-pins the whole corpus in the release commit, which keeps the witness above its floor. A reading that moved on a file whose content the golden pins unchanged — a reader change main carries without its re-pin — refuses the cut and names the paths, and so does a pinned file git still tracks, and the tree still holds, that the walk no longer reads. Land the re-pin through a reviewed change (task corpus:reading -- --write --accept-moved for a moved reading, which --write alone refuses; then review the moved lines) and cut again. While the major hold stops automatic cuts, nothing re-pins: after about ten days without a cut the check falls under its 75 % floor on every pull request. One pull request running task corpus:reading -- --write re-pins the corpus; a moved reading still needs --accept-moved. What the golden cannot see — a reader change that moves only the reading of files the same pull request edits — the A reader change names itself step of test-unit does (#3979): it reads those files with the base's reader and the head's, and refuses a moved reading unless the pull request carries the reader-change label (task corpus:reader-change locally).
  • A breaking change names its migration anchor. A ! commit or pull request carries the Conventional Commits breaking-change footer naming its section of docs/migrations/v8.md, and adds that section and its entry in the registry pkg/removed in the same change. The page's summary is the 8.0.0 release body: when 8.0.0 is cut it replaces, by hand, the notes release-it generates from the commits. The registry side is a test (pkg/removed: every entry has a remedy and an anchor that is a heading naming it under its kind's section of the page). The footer is held by review only: a pull request's title and body live on GitHub, the repository ships no pull request template, and release-it reads commit messages from git history, so no check of the tree can decide it (the rule).
  • tests.yml — on push/PR: gofmt, go vet, unit tests, e2e tests
  • release.yml — on git tags (v*): multi-platform builds (linux/darwin/windows × amd64/arm64), GitHub release
  • No shipped artifact carries iterion_exact (ADR-181 D1). The guarantee is a probe at every shipping boundary, whatever built the binary: in release.yml and desktop-release.yml, every step that signs, uploads or releases is immediately preceded by scripts/ci/exact-tag-probe.sh --payload over the paths it ships (it opens the zip, AppImage, .deb, tarball and NSIS packages and the gzip, xz, zstd and bzip2 streams, a package inside a package included, and reads every Go binary's buildinfo, a universal binary slice by slice; it refuses what it cannot read, a UPX-packed executable among them); every Dockerfile an image workflow builds ends with an exact-tag-probe stage that reads every Go binary of the image and gates the last stage (it reads the image's final filesystem, not its layers: a tagged binary a later instruction deletes or overwrites still ships in a lower layer). internal/ciguard's exact_release_* tests (a best-effort tripwire over the shipping markers they recognise, not a proof against a step written to hide its upload) pin each probe step and stage, fail on a shipping workflow nobody classified or a step shipping through a route the probe does not read (a repository file or Taskfile task the step runs, read transitively; in a binary workflow, an execution the guard cannot read or an unknown action), and trip on the tag's name in a build source of what ships.
  • version.yml — conventional changelog via release-it, version from package.json. It releases after a green heavy run of 🧪 Tests on main, at most once a day, and only the commit that run proved; a workflow_dispatch releases main's tip now, for a fix that cannot wait (releases). While main carries a breaking change, the major hold skips automatic runs green with a notice and refuses a non-major dispatch — only the exact N+1.0.0 cuts (the major hold). release-it writes the new section into CHANGELOG.md as part of the release commit itself (infile + git add . --update), so the file cannot drift from the tags — never hand-edit it. The same hook slot then re-pins internal/mdcode's committed-corpus golden LAST, after the aligner, with go run ./cmd/corpus-reading --cut (above), so the golden pins the bytes the release commit ships. CHANGELOG.md holds the current major only; earlier ones are archived under docs/changelog/ because GitHub stops rendering markdown past 512 KB. Each entry carries a collapsed why excerpt taken from the commit body — the rendering lives in scripts/changelog-writer.mjs, shared by release-it (.release-it.mjs) and the regenerator (task changelog:gen), so a rebuilt section is byte-identical to a released one. Re-run task changelog:gen after a major bump, or when it warns the file is nearing the ceiling.