From c5885c0cb846537795d43fb4a1306ba759f7d021 Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Tue, 22 Sep 2026 17:06:19 +1000 Subject: [PATCH] docs(prds): make the Woodpecker repository registration a prerequisite Adding a release workflow to this repository and enabling the repository in Woodpecker are two steps, and only the first is a file in this tree. A pipeline that is correct and never runs is invisible until someone asks why no release happened, so the second step is stated as a prerequisite of the design rather than left as an assumption behind it. --- docs/data/generated/dev-docs.json | 2 +- docs/prds/release-stream-and-commit-rules.md | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/data/generated/dev-docs.json b/docs/data/generated/dev-docs.json index a775ba184..e471a2e90 100644 --- a/docs/data/generated/dev-docs.json +++ b/docs/data/generated/dev-docs.json @@ -340,7 +340,7 @@ "url": "/dev/prds/release-stream-and-commit-rules/", "title": "One release stream, one page per version, and commit rules — decision", "section": "PRDs", - "body": "# One release stream, one page per version, and commit rules — decision\n\n**Status:** Draft\n**Date:** 2026-09-22\n**Authority:** `RELEASING.md` for the process this changes, `AGENTS.md` for the\ncommit rules it enforces, and `tools/newsgen` for the artifact shape.\n\n**Supersedes:** `docs/prds/news-and-releases.md`, sections \"Source of truth\" and\n\"Two components\" — one changelog replaces two, and one page per version replaces\none page per component. Its remaining decisions stand.\n\n## Decision\n\n**A release is one version covering whatever changed.** One changelog holds every\nrelease section, one generated page holds every version's notes, and an operator\ncutting a release names one version.\n\n## One changelog\n\nEvery release section lives in `CHANGELOG.md`, newest first. `CHANGELOG.archied.md`\nand `CHANGELOG.archie.md` are deleted, and `CHANGELOG.md` stops being a pointer to\nthem. The changelog is the only source of release prose, and tags are not a source:\nCI and deployment check out shallow, so tags are absent from a site build while the\nchangelog is always present.\n\n## One version stream\n\n**`GATEWAY` and `RUNTIME` stop being release inputs.** `release:prepare` and\n`release:tag` take one version, and `tools/release.sh` loses the two flags.\n\nThey may stay as build-time stamps, because a binary must still report what it\ncontains. A release that must name three versions forces an operator to pass skip\nvalues for components that did not change, and that ceremony is what this decision\nremoves — along with the drift it allows, where two components' tags fall a release\napart.\n\n**Per-component detail stays, as sections inside the release.** A reader still needs\nto know whether `archied` or the agent changed; what goes away is the separate\nnumbers and the separate pages, not the information.\n\n**History is not re-tagged.** Existing tags keep their names, because tags are not a\nsource and nothing reads them to build a page. A future reader must not \"fix\" the\nunified changelog by rewriting tags to match it.\n\n## One release page per version\n\n`docs/news/\u003cversion\u003e.md` replaces `docs/news/\u003ccomponent\u003e/\u003cversion\u003e.md`, carrying the\nrelease's per-component sections inside it.\n\n**Every release URL already published keeps working.** `/news/archied/\u003cversion\u003e` and\n`/news/archie/\u003cversion\u003e` route to the unified page for that version. The generator\nemits the redirect table beside the pages so it cannot drift from them; if the\nrenderer needs the table in its own repository, that is a change in that repository\nrather than a hand-maintained list here.\n\n## The reviewer runs between prepare and tag\n\nRelease notes are prose, and the review agent exists to review prose. **`release:tag`\nrefuses to tag when the review has not been run for that version, or when it reports\nat the level.**\n\nThe invocation is verified rather than assumed. `tl rules --lint` reports `corpus ok`\nand exits 0. `tl review \u003cpath\u003e --deadline \u003cms\u003e --max-turns \u003cn\u003e` reports\n`0 findings (0 high, 0 medium) · 1/1 files reviewed · clean` and exits 0 on\n`docs/news/archied/1.36.0.md`.\n\n**`--fail-on` must be passed explicitly.** It defaults to `never`, so an invocation\nwithout it cannot refuse anything and the step would be decorative. `--fail-on high`\nis the level: a medium finding in a release note is worth acting on, and it should not\nstop a release on its own.\n\n**The rule is stated once.** It belongs in the reviewer's own rule set, which\n`tl rules --from-doc` can draft from this document; `RELEASING.md` points at that\nrule beside the step it governs rather than restating it, because two statements of\none rule drift.\n\n## Commit rules and their enforcement\n\n- **Conventional commits**, with the scope taken from the package map.\n- **One logical change per commit.** A commit that does two things is two commits.\n- **The subject is imperative and short**; the body says why the change is right\n rather than restating the diff.\n- **A commit depends on the gate's exit status.** The gate and the commit run as one\n conditional chain, never as separate statements on one command line, where nothing\n reads the gate's status but the operator who typed it.\n- **Enforcement is a `commit-msg` hook** installed by one documented target, plus a\n check in CI over the pushed range, so the rule holds for a person who never\n installed the hook.\n- **Scopes are derived, not invented**, and an unknown scope fails loudly rather than\n being accepted.\n\n## The release pipeline\n\n**A Woodpecker workflow performs the release**: gate, generate the release page, run\nthe reviewer over it, commit the changelog and the generated pages, tag, push,\npublish images, and trigger the site's artifact sync. No step in that list is an\noperator's.\n\n**It triggers on a push to main**, not on a manual run. A pipeline a human must start\nis a pipeline that can be forgotten, which is the property this change removes. The\ntrigger is also not dependent on repairing manual triggering: in this estate a manual\nrun fails with zero steps while the same configuration runs on a push, and the\nestate's own Woodpecker configurations trigger on push with cron, manual or\npull-request events *added* to it rather than instead of it.\n\n**One tag, and the duplicate-build problem shrinks as a consequence.** Concurrency\nkeyed on a commit identifier treats an annotated tag as a ref distinct from its\ncommit, which starts three builds for one release. One version and one tag removes\ntwo of those refs. Nothing in the pipeline may depend on a tag object's\nidentity, and this is a consequence of one version stream rather than a separate fix.\n\n### The version is computed, not typed\n\nThe version is derived from the conventional commits since the last release, which is\nwhat the commit rules above exist for.\n\n- `feat` bumps the minor version; `fix`, `perf` and `refactor` bump the patch.\n- **A breaking change bumps the major version.** Its form is `!` after the type or\n scope, as in `feat(api)!:`, and a `BREAKING CHANGE:` trailer — either marks it.\n- `chore`, `docs`, `test`, `style` and `build` bump nothing alone.\n- **No release is a legitimate outcome.** A commit set that justifies no version\n produces no version, and the pipeline reports that rather than inventing one.\n\n### `tools/release.sh` is designed for the pipeline\n\n- **It never prompts.** Every input arrives as an argument or in the environment, so\n it runs with no terminal.\n- **Its version is a result as well as an argument.** It may be given one or asked to\n derive one, and it reports the version it used in a form a pipeline can read.\n- **\"Nothing to release\" has its own exit code**, distinct from failure, so the\n pipeline finishes green without tagging.\n- **It commits and tags nothing.** The pipeline owns the commit, the tag and the push;\n the script writes the notes and reports what it did. A script that pushes cannot be\n run twice safely, and this one runs on every push to main.\n\n### Which CI is authoritative\n\nThree surfaces exist: GitHub Actions, the Gitea workflow files, and Woodpecker.\n\n- **Woodpecker owns releases**, which is the production path this repository's deploy\n workflow already names.\n- **GitHub Actions keeps the checks a pull request needs.**\n- **The Gitea workflow files are retired in favour of Woodpecker** once Woodpecker\n runs the same checks, and are not edited in the meantime: two copies of a pipeline\n diverge.\n- No check lives in two places with neither authoritative. Where a check must run in\n both, the second runs the same file rather than a copy of it.\n\n## Verification\n\n- One changelog file exists, the two component changelogs do not, and the generated\n pages match it.\n- A release prepared with `VERSION` alone writes its notes and tags, with no\n `GATEWAY` or `RUNTIME` input.\n- Every release URL published before this change resolves.\n- `release:tag` refuses after a review that reported at the level, and refuses when\n no review ran.\n- The `commit-msg` hook and the CI range check each refuse a non-conforming subject\n and an unknown scope, with the hook absent and present.\n- A push to main carrying releasable commits produces a version, a release page, a\n tag and a published image with no operator step.\n- A push whose commits justify no release ends green and tags nothing.\n- `tools/release.sh` runs to completion with stdin closed, and exits with its\n distinct code when there is nothing to release.\n- The release workflow reads no tag object's identity, so one release starts one\n build.\n" + "body": "# One release stream, one page per version, and commit rules — decision\n\n**Status:** Draft\n**Date:** 2026-09-22\n**Authority:** `RELEASING.md` for the process this changes, `AGENTS.md` for the\ncommit rules it enforces, and `tools/newsgen` for the artifact shape.\n\n**Supersedes:** `docs/prds/news-and-releases.md`, sections \"Source of truth\" and\n\"Two components\" — one changelog replaces two, and one page per version replaces\none page per component. Its remaining decisions stand.\n\n## Decision\n\n**A release is one version covering whatever changed.** One changelog holds every\nrelease section, one generated page holds every version's notes, and an operator\ncutting a release names one version.\n\n## One changelog\n\nEvery release section lives in `CHANGELOG.md`, newest first. `CHANGELOG.archied.md`\nand `CHANGELOG.archie.md` are deleted, and `CHANGELOG.md` stops being a pointer to\nthem. The changelog is the only source of release prose, and tags are not a source:\nCI and deployment check out shallow, so tags are absent from a site build while the\nchangelog is always present.\n\n## One version stream\n\n**`GATEWAY` and `RUNTIME` stop being release inputs.** `release:prepare` and\n`release:tag` take one version, and `tools/release.sh` loses the two flags.\n\nThey may stay as build-time stamps, because a binary must still report what it\ncontains. A release that must name three versions forces an operator to pass skip\nvalues for components that did not change, and that ceremony is what this decision\nremoves — along with the drift it allows, where two components' tags fall a release\napart.\n\n**Per-component detail stays, as sections inside the release.** A reader still needs\nto know whether `archied` or the agent changed; what goes away is the separate\nnumbers and the separate pages, not the information.\n\n**History is not re-tagged.** Existing tags keep their names, because tags are not a\nsource and nothing reads them to build a page. A future reader must not \"fix\" the\nunified changelog by rewriting tags to match it.\n\n## One release page per version\n\n`docs/news/\u003cversion\u003e.md` replaces `docs/news/\u003ccomponent\u003e/\u003cversion\u003e.md`, carrying the\nrelease's per-component sections inside it.\n\n**Every release URL already published keeps working.** `/news/archied/\u003cversion\u003e` and\n`/news/archie/\u003cversion\u003e` route to the unified page for that version. The generator\nemits the redirect table beside the pages so it cannot drift from them; if the\nrenderer needs the table in its own repository, that is a change in that repository\nrather than a hand-maintained list here.\n\n## The reviewer runs between prepare and tag\n\nRelease notes are prose, and the review agent exists to review prose. **`release:tag`\nrefuses to tag when the review has not been run for that version, or when it reports\nat the level.**\n\nThe invocation is verified rather than assumed. `tl rules --lint` reports `corpus ok`\nand exits 0. `tl review \u003cpath\u003e --deadline \u003cms\u003e --max-turns \u003cn\u003e` reports\n`0 findings (0 high, 0 medium) · 1/1 files reviewed · clean` and exits 0 on\n`docs/news/archied/1.36.0.md`.\n\n**`--fail-on` must be passed explicitly.** It defaults to `never`, so an invocation\nwithout it cannot refuse anything and the step would be decorative. `--fail-on high`\nis the level: a medium finding in a release note is worth acting on, and it should not\nstop a release on its own.\n\n**The rule is stated once.** It belongs in the reviewer's own rule set, which\n`tl rules --from-doc` can draft from this document; `RELEASING.md` points at that\nrule beside the step it governs rather than restating it, because two statements of\none rule drift.\n\n## Commit rules and their enforcement\n\n- **Conventional commits**, with the scope taken from the package map.\n- **One logical change per commit.** A commit that does two things is two commits.\n- **The subject is imperative and short**; the body says why the change is right\n rather than restating the diff.\n- **A commit depends on the gate's exit status.** The gate and the commit run as one\n conditional chain, never as separate statements on one command line, where nothing\n reads the gate's status but the operator who typed it.\n- **Enforcement is a `commit-msg` hook** installed by one documented target, plus a\n check in CI over the pushed range, so the rule holds for a person who never\n installed the hook.\n- **Scopes are derived, not invented**, and an unknown scope fails loudly rather than\n being accepted.\n\n## The release pipeline\n\n**A Woodpecker workflow performs the release**: gate, generate the release page, run\nthe reviewer over it, commit the changelog and the generated pages, tag, push,\npublish images, and trigger the site's artifact sync. No step in that list is an\noperator's.\n\n**It triggers on a push to main**, not on a manual run. A pipeline a human must start\nis a pipeline that can be forgotten, which is the property this change removes. The\ntrigger is also not dependent on repairing manual triggering: in this estate a manual\nrun fails with zero steps while the same configuration runs on a push, and the\nestate's own Woodpecker configurations trigger on push with cron, manual or\npull-request events *added* to it rather than instead of it.\n\n**Prerequisite: Woodpecker must watch this repository.** Adding the workflow to the\nrepository and enabling the repository in Woodpecker are two steps, and the second is\na configuration action rather than a file. A release pipeline that is correct and\nnever runs is invisible until someone asks why no release happened, so the repository\nbeing enabled is a prerequisite of this design rather than an assumption behind it.\n\n**One tag, and the duplicate-build problem shrinks as a consequence.** Concurrency\nkeyed on a commit identifier treats an annotated tag as a ref distinct from its\ncommit, which starts three builds for one release. One version and one tag removes\ntwo of those refs. Nothing in the pipeline may depend on a tag object's\nidentity, and this is a consequence of one version stream rather than a separate fix.\n\n### The version is computed, not typed\n\nThe version is derived from the conventional commits since the last release, which is\nwhat the commit rules above exist for.\n\n- `feat` bumps the minor version; `fix`, `perf` and `refactor` bump the patch.\n- **A breaking change bumps the major version.** Its form is `!` after the type or\n scope, as in `feat(api)!:`, and a `BREAKING CHANGE:` trailer — either marks it.\n- `chore`, `docs`, `test`, `style` and `build` bump nothing alone.\n- **No release is a legitimate outcome.** A commit set that justifies no version\n produces no version, and the pipeline reports that rather than inventing one.\n\n### `tools/release.sh` is designed for the pipeline\n\n- **It never prompts.** Every input arrives as an argument or in the environment, so\n it runs with no terminal.\n- **Its version is a result as well as an argument.** It may be given one or asked to\n derive one, and it reports the version it used in a form a pipeline can read.\n- **\"Nothing to release\" has its own exit code**, distinct from failure, so the\n pipeline finishes green without tagging.\n- **It commits and tags nothing.** The pipeline owns the commit, the tag and the push;\n the script writes the notes and reports what it did. A script that pushes cannot be\n run twice safely, and this one runs on every push to main.\n\n### Which CI is authoritative\n\nThree surfaces exist: GitHub Actions, the Gitea workflow files, and Woodpecker.\n\n- **Woodpecker owns releases**, which is the production path this repository's deploy\n workflow already names.\n- **GitHub Actions keeps the checks a pull request needs.**\n- **The Gitea workflow files are retired in favour of Woodpecker** once Woodpecker\n runs the same checks, and are not edited in the meantime: two copies of a pipeline\n diverge.\n- No check lives in two places with neither authoritative. Where a check must run in\n both, the second runs the same file rather than a copy of it.\n\n## Verification\n\n- One changelog file exists, the two component changelogs do not, and the generated\n pages match it.\n- A release prepared with `VERSION` alone writes its notes and tags, with no\n `GATEWAY` or `RUNTIME` input.\n- Every release URL published before this change resolves.\n- `release:tag` refuses after a review that reported at the level, and refuses when\n no review ran.\n- The `commit-msg` hook and the CI range check each refuse a non-conforming subject\n and an unknown scope, with the hook absent and present.\n- A push to main carrying releasable commits produces a version, a release page, a\n tag and a published image with no operator step.\n- A push whose commits justify no release ends green and tags nothing.\n- `tools/release.sh` runs to completion with stdin closed, and exits with its\n distinct code when there is nothing to release.\n- The release workflow reads no tag object's identity, so one release starts one\n build.\n" }, { "url": "/dev/prds/review-calibration/", diff --git a/docs/prds/release-stream-and-commit-rules.md b/docs/prds/release-stream-and-commit-rules.md index dabe24d2f..6b8bffae6 100644 --- a/docs/prds/release-stream-and-commit-rules.md +++ b/docs/prds/release-stream-and-commit-rules.md @@ -103,6 +103,12 @@ run fails with zero steps while the same configuration runs on a push, and the estate's own Woodpecker configurations trigger on push with cron, manual or pull-request events *added* to it rather than instead of it. +**Prerequisite: Woodpecker must watch this repository.** Adding the workflow to the +repository and enabling the repository in Woodpecker are two steps, and the second is +a configuration action rather than a file. A release pipeline that is correct and +never runs is invisible until someone asks why no release happened, so the repository +being enabled is a prerequisite of this design rather than an assumption behind it. + **One tag, and the duplicate-build problem shrinks as a consequence.** Concurrency keyed on a commit identifier treats an annotated tag as a ref distinct from its commit, which starts three builds for one release. One version and one tag removes