fix(changelog): break infinite changelog-regenerate loop - #221
Conversation
maa-framework#219 exposed an infinite CI loop: the changelog workflow (mode: pr-back) opens a PR to regenerate CHANGELOG.md; merging that PR adds a new conventional commit (`chore(changelog): regenerate from conventional commits (#NNN)`) which git-cliff picks up under Chores, producing a fresh diff and opening the next PR. The main branch accumulated 21 such commits (#192, #195, #199, #201-#218) before the loop was noticed; PR #220 was closed as part of this hotfix. Three-part fix (defense in depth): 1. **cliff.toml (local override)** — adds a skip = true commit_parser for the bot's own `chore(changelog): regenerate from conventional commits` subjects (placed BEFORE the generic ^chore matcher, since commit_parsers is first-match-wins). This is the primary fix because it survives GitHub squash-merge (which uses the PR title as the new commit subject on main). This local override is an emergency hotfix; the matching canonical fix is in standards#988 and this file should be deleted once that merges. 2. **CHANGELOG.md** — regenerated against the fixed config, which removes the 21 spammy `Regenerate from conventional commits` bullets. No other content changes (verified: 21 deletions, 0 additions). 3. **.github/workflows/changelog.yml** — adds a job-level `if:` guard so the reusable isn't even invoked when the push's head commit message contains [skip changelog]. This complements the reusable's internal guard job (added in standards#988). The canonical fix (standards#988) also hardens the reusable to close older open bot/changelog-* PRs and tag its own commits with [skip changelog]. Once that PR merges, the local cliff.toml can be deleted to re-consume the canonical standards config. Closes #219. [skip changelog]
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (3)
💤 Files with no reviewable changes (1)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📜 Recent review details⏰ Context from checks skipped due to timeout. (18)
📝 SummarySummary by CodeRabbit
WalkthroughThe pull request adds local git-cliff configuration, skips changelog regeneration for marked commits, and removes obsolete regeneration entries from ChangesChangelog safeguards
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The safeguards prevent generated changelog commits from recreating the loop; no actionable merge risk remains. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. A rabbit checks the changelog trail Comment |
#222) One-line CHANGELOG update: adds the missing bullet for the loop-fix PR (#221) itself. ## Why this PR exists When #221 merged, its commit body contained the `[skip changelog]` marker (added by the job-level `if:` guard that broke the infinite loop), so the workflow run after merge correctly skipped itself rather than opening a regeneration PR. That was the right call for loop-prevention, but it means the fix commit itself was never recorded in the changelog. This PR adds that one bullet. ## Why this is the LAST changelog PR Merging this PR will NOT open another changelog PR, because: 1. The PR title matches the subject-matcher skip rule in the local `cliff.toml` override (`^chore\\(changelog\\):\\s*regenerate from conventional commits`), so git-cliff will skip this commit when computing the next CHANGELOG. 2. The commit body (and this PR body) carry `[skip changelog]`, which triggers both the caller's job-level `if:` guard and the body-matcher skip rule in cliff.toml. The canonical fix in [standards#988](hyperpolymath/standards#988) applies the same skip rules to all estate repos. Once that merges, the local `cliff.toml` in this repo should be deleted in a follow-up. [skip changelog] Co-authored-by: hyperpolymath-bot <github-actions[bot]@users.noreply.github.com>
…rged (#223) ## Summary Follow-up to #221 / standards#988. The local `cliff.toml` was added as an emergency hotfix for the infinite changelog loop. The canonical fix has now landed in [hyperpolymath/standards#988](hyperpolymath/standards#988): the canonical `templates/cliff.toml` at `standards@main` contains the same `chore(changelog): regenerate …` subject-matcher skip rule. ## Verification - `git-cliff --config <canonical cliff.toml>` against current `main` produces byte-identical `CHANGELOG.md` — no changelog drift, no CHANGELOG.md update needed in this PR. - Returns the repo to the documented convention stated in `changelog.yml`: "no local cliff.toml by design — one config for the estate". - The reusable workflow checks out cliff.toml from `standards@main` at runtime (not from the SHA-pinned reusable), so future canonical updates continue to propagate immediately to this repo. [skip changelog] Co-authored-by: hyperpolymath-bot <github-actions[bot]@users.noreply.github.com>
Summary
Closes #219. The changelog workflow was caught in an infinite PR loop: merging one changelog PR added a new
chore(changelog): regenerate from conventional commits (#NNN)conventional commit, which git-cliff picked up under Chores, which produced a fresh CHANGELOG diff, which opened the next PR. 21 such commits accumulated onmain(#192, #195, #199, #201–#218) before detection; PR #220 (which appeared mid-fix) has been closed.What changed
Three complementary layers (defense in depth):
cliff.toml (new — local override) — adds a
skip = truecommit parser for the bot's ownchore(changelog): regenerate from conventional commitssubjects (placed before the generic^chorematcher becausecommit_parsersis first-match-wins). This is the primary fix because the regex matches both the bot's branch commit subject and the default GitHub squash-merge subject (… (#NNN)), which is what actually lands onmain.This is an emergency hotfix. The canonical fix is being submitted to
hyperpolymath/standardsin parallel (standards#988), and once that merges this local file should be deleted so the repo returns to consuming the canonical estate config (per the comment inchangelog.yml).CHANGELOG.md — regenerated against the fixed config. Only the 21 spammy
Regenerate from conventional commitsbullets are removed (verified: 21 deletions, 0 additions; no other content is altered)..github/workflows/changelog.yml — adds a job-level
if:guard (${{ !contains(github.event.head_commit.message, '[skip changelog]') }}) so the reusable isn't even invoked when the triggering push's head commit carries the[skip changelog]marker. This complements the reusable's own internal guard job (added in standards#988).Verification
git-cliff --config cliff.tomlagainst currentmainproduces a CHANGELOG with zeroRegenerate from conventional commitsbullets (was 21 before).git-cliffproduces no diff → idempotent; the next workflow run will be a no-op.chore(changelog): regenerate from conventional commits (#NNN)) and re-runninggit-cliff→ zero diff; loop is broken.Follow-up (after merge)
standards@main, delete the localcliff.tomlin a follow-up PR and rely again on the canonical configmain) to confirm the job exits cleanly withNo CHANGELOG changes; skipping PR.[skip changelog]