Skip to content

Require bake-releases 0.3.10, reject hand edits to releases.md in CI, and have the skills ask for user-facing pull request titles and Breaking: paragraphs instead of release-note entries. - #88

Merged
ioquatix merged 3 commits into
mainfrom
generated-release-notes
Nov 12, 2026

Conversation

@ioquatix

@ioquatix ioquatix commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

bake-releases 0.3.10 generates each version's section of releases.md from the squash-merged commit subjects since the previous release tag (base-rs/bake-releases#35), so nobody edits the file by hand any more. This requires that release, which the unchanged cargo:after_version_bump hook now uses through releases:update TAG, and bake-cargo 0.11.0, whose release tasks verify the generated notes. It adds a releases job to this repository's test.yml, inside the test-result aggregate, that runs releases:check with full history. On a pull request it checks against the base branch as GitHub's merge commit has it, HEAD^1, because the event's base SHA is the base from when the pull request was opened. A merge group uses its own base. It also brings the skills in line. base-project-pull-requests says not to edit releases.md: write the title as the user-facing release note, and add a Breaking: paragraph to the description for a breaking change. That is the one exception to the rule against a closing Key: value line, and it points to the Release Notes guide that bake-releases now installs. base-project-releasing previews the notes with releases:notes Unreleased and describes the refusal to start a release with nothing to release, and the stricter detection that comes with base-rs/bake-cargo#71. base-project-setup and base-project-update add the releases job and the adoption steps, including the manifest repository and keeping an existing ## Unreleased. The conventions and the performance skill now say "pull request title" where they said "release notes".

… CI, and have the skills ask for user-facing pull request titles and `Breaking:` paragraphs instead of release-note entries.
@ioquatix

Copy link
Copy Markdown
Contributor Author

Independent review: looks good. I pushed one change and am merging once CI passes.

  • HEAD^1 is right for pull_request. The checkout is refs/pull/88/merge, whose first parent is the current tip of main (d1febdb), while the event's base SHA can be stale. merge_group.base_sha is right for a merge queue, but this workflow has no merge_group trigger and the ruleset has no queue, so that clause only matters to repositories that copy the job. On pushes the job checks nothing.
  • Bypass: releases:check exempts commits that carry a Release: trailer. A pull request commit with a forged trailer therefore passes the pull-request check, and the hand edit lands through the squash merge. I reproduced this locally. Running the check on pushes against github.event.before (… || github.event.merge_group.base_sha || github.event.before) fails the squashed commit on main; I confirmed that locally too. My token can't push workflow changes (it lacks the workflow scope), so this is left as a follow-up. It detects the edit after the fact rather than preventing it, and reviewers would see the trailer anyway.
  • Pushed 49707ba: require bake-cargo 0.11.0 (just released), because releasing.md now describes its refusal to start a release with nothing to release and its stricter detection.
  • The skills are consistent with bake-releases' context/release-notes.md: a Breaking: paragraph (not a trailer), and the title as the release note. Each fact is stated in one place, with cross-references. Semver: patch, 0.1.12.

@ioquatix
ioquatix merged commit 3bc83cc into main Nov 12, 2026
6 checks passed
@ioquatix
ioquatix deleted the generated-release-notes branch November 12, 2026 13:14
@ioquatix ioquatix mentioned this pull request Nov 12, 2026
ioquatix added a commit that referenced this pull request Nov 12, 2026
- Require `bake-releases` 0.3.10, reject hand edits to `releases.md` in
CI, and have the skills ask for user-facing pull request titles and
`Breaking:` paragraphs instead of release-note entries.
([#88](#88))

Release: v0.1.12
ioquatix added a commit to base-rs/bake-releases that referenced this pull request Nov 13, 2026
…writes exactly the generated release notes, so a hand edit cannot pass by copying it. (#39)

`releases:check` let any commit that changes `releases.md` through if
its message carried a `Release:` trailer, so a pull request could land a
hand edit by adding the trailer to its own commit or to its description,
which becomes the squash commit's body (found in review of
base-rs/base-project#88). It now counts a trailer only on a commit that
leaves `releases.md` exactly as `releases:update VERSION` writes it,
with the manifest's options, from the history of that commit's own first
parent, which is what the release hook commits; anything else with a
trailer is reported as a hand edit, with a note that the trailer alone
does not count. A new test reproduces the bypass (it fails on `main`)
for a pull request commit, a squash on `main` checked against the tip
before the push, generated notes with an edit elsewhere in the document,
a trailer naming another or an existing version, a deletion, a release
with nothing to release and a document added with no parent copy. I also
ran the new check over the real release commits made since notes were
generated (bake-releases v0.3.10 and v0.3.11, bake-cargo v0.11.0,
base-project v0.1.12), and over Tomori's next release prepared by
base-project's `cargo:after_version_bump`, including
`markdown:normalize`: all pass. A release prepared with non-default
`--since`, `--scope`, `--exclude` or `--repository` no longer passes the
check, as it already fails bake-cargo's release detection. The readme,
the Release Notes guide and the proposal's implementation notes describe
the rule, and that CI should also run the check on pushes against the
branch's previous tip.
ioquatix added a commit that referenced this pull request Nov 14, 2026
…ip before the push, so one that passed its pull request's check still fails. (#90)

The `releases` job ran `releases:check` only on pull requests and merge
groups, so a hand edit to `releases.md` that got past the pull request's
check, for example with a forged `Release:` trailer on its own commits
as the review of #88 reproduced, landed on `main` unchecked. On pushes
the job now checks against `github.event.before`, the tip of `main`
before the push, so the squash commit is judged by the commits it
landed; pull requests still use `HEAD^1`, the current base in GitHub's
merge commit, merge groups their own base, and manual runs check
nothing. A scripted repository with such a hand edit shows the effect:
with bake-releases 0.3.11, the pull request's check passes and the push
check now fails; a squash whose description carries the trailer still
passes both until base-rs/bake-releases#39, which counts a trailer only
on a commit that writes exactly the generated notes, is released and the
lockfile updated, after which all three fail. Repositories that copy
this job, as the `base-project-setup` and `base-project-update` skills
say, get the change from here. CI also needed one unrelated fix: the
runner's newer Cargo reports `base-design` and `base-security` as unused
dependencies, which `CARGO_BUILD_WARNINGS: deny` turns into an error, so
`src/lib.rs` now links them with `use … as _;` as it already does the
other crates that supply agent context.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant