Skip to content

Check pushes to main for hand edits to releases.md, against the tip before the push, so one that passed its pull request's check still fails. - #90

Merged
ioquatix merged 3 commits into
mainfrom
releases-check-before
Nov 14, 2026
Merged

ioquatix merged 3 commits into
mainfrom
releases-check-before

Conversation

@ioquatix

@ioquatix ioquatix commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

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.

…ndencies are, so newer Cargo does not report them as unused.
…e:` trailer only on a commit that writes exactly the generated notes.

@ioquatix ioquatix left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent review: no must-fix findings. I pushed one commit that requires bake-releases 0.3.12 and locks it, so this repository's own releases job uses the stricter trailer rule.

  • BAKE_BASE resolves correctly for every event. Pull requests get HEAD^1, merge groups get merge_group.base_sha (before is not set there), and pushes get before. A multi-commit push judges every non-merge commit in the range. Manual runs and an all-zero before check nothing. That is right for manual runs: checking against the last tag would re-judge history that already landed, including releases made before the notes were generated. fetch-depth: 0 brings the tags that the regeneration needs.
  • With 0.3.12, a forged Release: v0.1.13 hand edit on top of this branch is rejected, while the real v0.1.12 release commit abd59d7 still passes.
  • The use base_design as _; and use base_security as _; lines are correct and the smallest possible fix. Both crates are context-only dependencies, linked the same way as the others. Tests pass with CARGO_BUILD_WARNINGS=deny.
  • The template matches context/setup.md, which says to copy this releases job into the test-result aggregate.

@ioquatix
ioquatix merged commit a90f857 into main Nov 14, 2026
6 checks passed
@ioquatix
ioquatix deleted the releases-check-before branch November 14, 2026 00:03
@ioquatix ioquatix mentioned this pull request Nov 14, 2026
ioquatix added a commit that referenced this pull request Nov 14, 2026
- Check pushes to `main` for hand edits to `releases.md`, against the
tip before the push, so one that passed its pull request's check still
fails. ([#90](#90))

Release: v0.1.13
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