ci(lint): check fragment presence for consumer-visible changes #183

Open
opened 2026-11-15 19:24:01 +00:00 by Claude · 5 comments
Owner

Spec: AGENTS.md structure and what happens to CLAUDE.md's content (resolution, section 4; the label escape there was replaced by a trivial: fragment after the session, see the comment on that ticket).

What to build

A Lint check that fails a pull request which changes anything under roles/ or meta/, or galaxy.yml, without adding a file under changelogs/fragments/. A change consumers cannot see (e.g. only roles/*/molecule/) adds a trivial: fragment, as CONTRIBUTING.md already asks for CI and docs changes. A change confined to an internal role (roles/_*/) needs a fragment like any other role change; trivial is enough, with no special case in the check. There is no label or branch-name escape. The one pass without a new fragment is content-based, for the release pull request (below).

  • Why: release automation derives the version from fragment sections, so a missing fragment means a release that misses the change. No control holds this today; the changelog-lint hook only validates the fragments that exist.
  • No standard tool fits: a small script in scripts/ with its test in tests/scripts/, run from origin/main's copy like the other judge scripts. Diff against the merge base, from git alone (no API call, so it behaves the same on fork runs). Pass ref values through env:, never interpolated into run:.
  • Release pull request: the check passes a pull request whose only galaxy.yml change is the version: line and whose only changes under changelogs/fragments/ are deletions. Judged by the diff's content, never by branch name.
  • Bot pull requests touch these paths: Renovate's ansible-core minor bump edits meta/runtime.yml and every roles/*/meta/main.yml and brings its own fragment, so the check applies to bot pull requests like any other (see Supported and tested ansible-core versions, item 2).
  • Platform removal needs breaking_changes: also fail when a platform declared in any roles/*/meta/main.yml galaxy_info.platforms at the merge base is gone (a version removed, a name removed, or all narrowed to named versions) and the pull request adds no fragment with a breaking_changes section. Spec: Role interface and semver: output facts, handler names, dropped platforms and internal roles.
  • major_changes is refused by the changelog lint hook once #176 removes the section from changelogs/config.yaml; this check owes nothing for it.

Acceptance

  • A test covers: role change without fragment fails; with a fragment passes; with only a trivial: fragment passes; tooling-only change passes.
  • A test covers: a release-shaped diff (only the galaxy.yml version: line changed, fragments only deleted) passes; the same diff plus any other galaxy.yml line, or an edited fragment, still fails without a new fragment.
  • A test covers: the ansible-core bump diff (meta/runtime.yml and roles/*/meta/main.yml edited, with its fragment) passes, and fails without the fragment.
  • A test covers: platform removal without a breaking_changes fragment fails; with it passes; adding a platform passes with any fragment.
  • The PR says what was verified and what was not.
Spec: [AGENTS.md structure and what happens to CLAUDE.md's content](https://git.rkdr.net/Mortis/Kamino/issues/101) (resolution, section 4; the label escape there was replaced by a `trivial:` fragment after the session, see the comment on that ticket). ## What to build A Lint check that fails a pull request which changes anything under `roles/` or `meta/`, or `galaxy.yml`, without adding a file under `changelogs/fragments/`. A change consumers cannot see (e.g. only `roles/*/molecule/`) adds a `trivial:` fragment, as `CONTRIBUTING.md` already asks for CI and docs changes. A change confined to an internal role (`roles/_*/`) needs a fragment like any other role change; `trivial` is enough, with no special case in the check. There is no label or branch-name escape. The one pass without a new fragment is content-based, for the release pull request (below). - Why: release automation derives the version from fragment sections, so a missing fragment means a release that misses the change. No control holds this today; the changelog-lint hook only validates the fragments that exist. - No standard tool fits: a small script in `scripts/` with its test in `tests/scripts/`, run from `origin/main`'s copy like the other judge scripts. Diff against the merge base, from git alone (no API call, so it behaves the same on fork runs). Pass ref values through `env:`, never interpolated into `run:`. - **Release pull request:** the check passes a pull request whose only `galaxy.yml` change is the `version:` line and whose only changes under `changelogs/fragments/` are deletions. Judged by the diff's content, never by branch name. - **Bot pull requests touch these paths:** Renovate's ansible-core minor bump edits `meta/runtime.yml` and every `roles/*/meta/main.yml` and brings its own fragment, so the check applies to bot pull requests like any other (see [Supported and tested ansible-core versions](https://git.rkdr.net/Mortis/Kamino/issues/206), item 2). - **Platform removal needs `breaking_changes`:** also fail when a platform declared in any `roles/*/meta/main.yml` `galaxy_info.platforms` at the merge base is gone (a version removed, a name removed, or `all` narrowed to named versions) and the pull request adds no fragment with a `breaking_changes` section. Spec: [Role interface and semver: output facts, handler names, dropped platforms and internal roles](https://git.rkdr.net/Mortis/Kamino/issues/257). - `major_changes` is refused by the changelog lint hook once [#176](https://git.rkdr.net/Mortis/Kamino/issues/176) removes the section from `changelogs/config.yaml`; this check owes nothing for it. ## Acceptance - [ ] A test covers: role change without fragment fails; with a fragment passes; with only a `trivial:` fragment passes; tooling-only change passes. - [ ] A test covers: a release-shaped diff (only the `galaxy.yml` `version:` line changed, fragments only deleted) passes; the same diff plus any other `galaxy.yml` line, or an edited fragment, still fails without a new fragment. - [ ] A test covers: the ansible-core bump diff (`meta/runtime.yml` and `roles/*/meta/main.yml` edited, with its fragment) passes, and fails without the fragment. - [ ] A test covers: platform removal without a `breaking_changes` fragment fails; with it passes; adding a platform passes with any fragment. - [ ] The PR says what was verified and what was not.
Claude added the
Status
Ready for Agent
label 2026-11-15 19:24:01 +00:00
Claude added this to the Continuous delivery milestone 2026-11-15 22:21:21 +00:00
Author
Owner

Spec change from Release path: fragment check, failed publish and tarball integrity:

  • The check passes a pull request whose only galaxy.yml change is the version: line and whose only changes under changelogs/fragments/ are deletions (the release pull request). Judged by the diff's content, never by branch name.
  • Add a test: a release-shaped diff passes; the same diff plus any other galaxy.yml line, or an edited fragment, still fails without a new fragment.
Spec change from [Release path: fragment check, failed publish and tarball integrity](https://git.rkdr.net/Mortis/Kamino/issues/211): - The check passes a pull request whose only `galaxy.yml` change is the `version:` line and whose only changes under `changelogs/fragments/` are deletions (the release pull request). Judged by the diff's content, never by branch name. - Add a test: a release-shaped diff passes; the same diff plus any other `galaxy.yml` line, or an edited fragment, still fails without a new fragment.
Author
Owner

Review of the map (2026-11-17).

"Not a Renovate concern: bot PRs do not touch these paths" no longer holds. Renovate's ansible-core minor bump edits meta/runtime.yml and every roles/*/meta/main.yml and brings its own fragment (Supported and tested ansible-core versions, item 2). Add a test for that diff.

Review of the map (2026-11-17). "Not a Renovate concern: bot PRs do not touch these paths" no longer holds. Renovate's ansible-core minor bump edits `meta/runtime.yml` and every `roles/*/meta/main.yml` and brings its own fragment ([Supported and tested ansible-core versions](https://git.rkdr.net/Mortis/Kamino/issues/206), item 2). Add a test for that diff.
Author
Owner

Scope added by Role interface and semver: output facts, handler names, dropped platforms and internal roles (2026-11-20)

  • Platform removal needs breaking_changes. Also fail when a platform declared in any roles/*/meta/main.yml galaxy_info.platforms at the merge base is gone (a version removed, a name removed, or all narrowed to named versions) and the pull request adds no fragment with a breaking_changes section. Tests: removal without that fragment fails; removal with it passes; adding a platform passes with any fragment.
  • A change confined to an internal role (roles/_*/) needs a fragment like any other role change; trivial is enough. No special case in the check.
## Scope added by [Role interface and semver: output facts, handler names, dropped platforms and internal roles](https://git.rkdr.net/Mortis/Kamino/issues/257) (2026-11-20) - **Platform removal needs `breaking_changes`.** Also fail when a platform declared in any `roles/*/meta/main.yml` `galaxy_info.platforms` at the merge base is gone (a version removed, a name removed, or `all` narrowed to named versions) and the pull request adds no fragment with a `breaking_changes` section. Tests: removal without that fragment fails; removal with it passes; adding a platform passes with any fragment. - A change confined to an internal role (`roles/_*/`) needs a fragment like any other role change; `trivial` is enough. No special case in the check.
Author
Owner

Final validation round (link): major_changes is refused by the changelog lint hook once #176 removes the section from changelogs/config.yaml; this check owes nothing for it.

Final validation round (link): `major_changes` is refused by the changelog lint hook once #176 removes the section from `changelogs/config.yaml`; this check owes nothing for it.
Author
Owner

Final validation round, second pass (2026-11-20): body edited.

  • "Not a Renovate concern: bot PRs do not touch these paths" replaced: the ansible-core minor bump edits meta/runtime.yml and roles/*/meta/main.yml with its own fragment (comment of 2026-11-17); test added.
  • "There is no label or other escape" now names the content-based pass for the release pull request (comment of 2026-11-16), with its tests.
  • Added the platform-removal check and its tests, and the internal-role line (comment of 2026-11-20); noted that major_changes is owed nothing here.
  • The comments above stay as history.
Final validation round, second pass (2026-11-20): body edited. - "Not a Renovate concern: bot PRs do not touch these paths" replaced: the ansible-core minor bump edits `meta/runtime.yml` and `roles/*/meta/main.yml` with its own fragment (comment of 2026-11-17); test added. - "There is no label or other escape" now names the content-based pass for the release pull request (comment of 2026-11-16), with its tests. - Added the platform-removal check and its tests, and the internal-role line (comment of 2026-11-20); noted that `major_changes` is owed nothing here. - The comments above stay as history.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: Mortis/Kamino#183