ci(lint): check fragment presence for consumer-visible changes #183
Notifications
Due Date
No due date set.
Depends on
Reference: Mortis/Kamino#183
Reference in new issue
Block a user
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/ormeta/, orgalaxy.yml, without adding a file underchangelogs/fragments/. A change consumers cannot see (e.g. onlyroles/*/molecule/) adds atrivial:fragment, asCONTRIBUTING.mdalready asks for CI and docs changes. A change confined to an internal role (roles/_*/) needs a fragment like any other role change;trivialis 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).scripts/with its test intests/scripts/, run fromorigin/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 throughenv:, never interpolated intorun:.galaxy.ymlchange is theversion:line and whose only changes underchangelogs/fragments/are deletions. Judged by the diff's content, never by branch name.meta/runtime.ymland everyroles/*/meta/main.ymland brings its own fragment, so the check applies to bot pull requests like any other (see Supported and tested ansible-core versions, item 2).breaking_changes: also fail when a platform declared in anyroles/*/meta/main.ymlgalaxy_info.platformsat the merge base is gone (a version removed, a name removed, orallnarrowed to named versions) and the pull request adds no fragment with abreaking_changessection. Spec: Role interface and semver: output facts, handler names, dropped platforms and internal roles.major_changesis refused by the changelog lint hook once #176 removes the section fromchangelogs/config.yaml; this check owes nothing for it.Acceptance
trivial:fragment passes; tooling-only change passes.galaxy.ymlversion:line changed, fragments only deleted) passes; the same diff plus any othergalaxy.ymlline, or an edited fragment, still fails without a new fragment.meta/runtime.ymlandroles/*/meta/main.ymledited, with its fragment) passes, and fails without the fragment.breaking_changesfragment fails; with it passes; adding a platform passes with any fragment.Spec change from Release path: fragment check, failed publish and tarball integrity:
galaxy.ymlchange is theversion:line and whose only changes underchangelogs/fragments/are deletions (the release pull request). Judged by the diff's content, never by branch name.galaxy.ymlline, or an edited fragment, still fails without a new fragment.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.ymland everyroles/*/meta/main.ymland brings its own fragment (Supported and tested ansible-core versions, item 2). Add a test for that diff.Scope added by Role interface and semver: output facts, handler names, dropped platforms and internal roles (2026-11-20)
breaking_changes. Also fail when a platform declared in anyroles/*/meta/main.ymlgalaxy_info.platformsat the merge base is gone (a version removed, a name removed, orallnarrowed to named versions) and the pull request adds no fragment with abreaking_changessection. Tests: removal without that fragment fails; removal with it passes; adding a platform passes with any fragment.roles/_*/) needs a fragment like any other role change;trivialis enough. No special case in the check.Final validation round (link):
major_changesis refused by the changelog lint hook once #176 removes the section fromchangelogs/config.yaml; this check owes nothing for it.Final validation round, second pass (2026-11-20): body edited.
meta/runtime.ymlandroles/*/meta/main.ymlwith its own fragment (comment of 2026-11-17); test added.major_changesis owed nothing here.