docs+ci(changelog): AI-draft entries for merges that skip the changelog, and backfill the gaps - #73
Merged
Merged
Conversation
…og, and backfill the gaps CHANGELOG.md relied on every PR remembering to write its own [Unreleased] entry. An audit of the 22 merges since v0.1.0 whose numbers never appear in the file found 9 user-visible changes with no entry at all — including the OCP -> CGP rename itself, the repo's biggest breaking change. The Unreleased section had also accumulated duplicate category headings (two '### Added', two '### Changed', two '### Fixed') from PRs appending their own blocks. Go-forward: .github/workflows/changelog.yml watches pushes to main. When a merge lands without touching CHANGELOG.md, it drafts the missing entries from the merge's actual diff (.github/scripts/changelog-ai.sh, Vercel AI Gateway, degrade-open: no key or a failed call is a log line, never a red check) and proposes them as a bot/changelog PR — a draft for human review, never a direct push. The gap is measured from the last commit that touched CHANGELOG.md, so merging the bot PR resets it, and each run regenerates the whole current gap, so a superseded bot PR loses nothing. Backfill: entries for the rename (#1), frame identity/composition/usage reports (#32), golden wire fixtures (#35), ADR 0007 (#61, #27), composition conformance + the canary scheduled-run gate (#70) — written from each PR's diff, in the file's existing voice. Three further audit hits (#68, #69, #71) turned out to be already covered by newer entries and were left alone. Duplicate category headings merged: one heading per category, Keep-a-Changelog order.
Reviewer's GuideAdds an AI-assisted workflow to automatically draft changelog entries for merges that skipped updating CHANGELOG.md, and backfills missing entries while normalizing the Unreleased section layout. Sequence diagram for the changelog AI-drafting workflow on pushes to mainsequenceDiagram
participant GithubActions
participant Git
participant changelog_ai_sh
participant AIGateway
participant GitHubAPI
GithubActions->>Git: git log -1 HEAD -- CHANGELOG.md
Git-->>GithubActions: last_changelog_commit (base)
GithubActions->>Git: git rev-list --count base..HEAD
Git-->>GithubActions: gap_count
alt gap_count == 0
GithubActions-->GithubActions: [no gap, workflow ends]
else gap_count > 0
GithubActions->>changelog_ai_sh: run changelog-ai.sh base..HEAD
changelog_ai_sh->>Git: git log / git diff (range base..HEAD)
Git-->>changeling_ai_sh: commits, stat, diff
alt AI_GATEWAY_API_KEY set
changelog_ai_sh->>AIGateway: POST /v1/chat/completions (prompt, diff)
AIGateway-->>changelog_ai_sh: changelog markdown bullets
changelog_ai_sh-->GithubActions: entries file path
alt entries file non-empty
GithubActions->>Git: insert entries under [Unreleased], commit
GithubActions->>GitHubAPI: push bot/changelog branch
GithubActions->>GitHubAPI: gh pr list/edit/create
GitHubAPI-->>GithubActions: bot PR opened/updated
else entries file empty
GithubActions-->GithubActions: [internal-only or invalid response, no PR]
end
else AI_GATEWAY_API_KEY missing or call fails
changelog_ai_sh-->GithubActions: [prints nothing]
GithubActions-->GithubActions: [log line, no PR]
end
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
macanderson
added a commit
to macanderson/stella
that referenced
this pull request
Aug 1, 2026
…entry (#1085) Cleanup of the residue the first post-#1076 releases exposed: 1. **`[0.6.42]` appeared twice** — #1076's backfill inserted the heading main was missing while the 0.6.42 version-sync PR concurrently created the same one; the squash-merge kept both. Now one heading (the #1070 entry). 2. **The #822 entry was filed under the wrong version** — #1072 merged *after* v0.6.42 was tagged, so its change shipped in v0.6.43. Moved there (the version-sync roll inherently files late entries under the version being synced — worth knowing, not worth machinery). 3. **`[0.6.43]` and `[0.6.44]` rolled blank** — the new draft step ran in both releases and degraded exactly as designed: `AI_GATEWAY_API_KEY` is **not set** as a repo secret. (Which also means `release.yml`'s AI notes step has been silently falling back to commit lists since it landed.) Entries for both versions are hand-written here from their release ranges. **To activate AI drafting for future releases** (changelog *and* GitHub-release notes): ``` gh secret set AI_GATEWAY_API_KEY --repo macanderson/stella ``` with a Vercel AI Gateway key. The CGP repo needs the same for macanderson/context-graph-protocol#73. Changelog-only diff on a CI-green main tip; pushed `--no-verify` since the Rust gate cannot observe an `.md`-only change. Ladder verified: 95 sections, none blank, strictly descending, single `[0.6.42]`. ## Summary by Sourcery Update changelog entries for versions 0.6.42–0.6.44 to accurately reflect shipped changes and remove duplicated version headings. Bug Fixes: - Document the fix that treats renamed witness test files as tampering by tracking canonical artifact locations. - Clarify that release commits are now tagged after version sync, aligning manual releases with the auto-tag workflow (#822, #1072). Enhancements: - Add a note that changelog sections can be AI-drafted from the released diff, including reconstruction of past empty or missing sections. - Record the visual rebrand of `stella observe` with updated Observatory dashboard styling. Documentation: - Describe the updated docs front page focused on installation, including layout and typography changes to highlight install paths. Co-authored-by: Stella Test <test@stella.local>
macanderson
marked this pull request as ready for review
August 1, 2026 07:01
There was a problem hiding this comment.
Sorry @macanderson, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
An audit of the 22 merges since v0.1.0 whose PR numbers never appear in CHANGELOG.md found 9 user-visible changes with no entry at all — including the OCP → CGP rename itself (#1), the repo's biggest breaking change. (7 others were covered under issue numbers; 6 were internal chores.)
[Unreleased]had also accumulated duplicate category headings — two### Added, two### Changed, two### Fixed— from PRs appending their own blocks.Go-forward: a changelog that cannot silently fall behind
.github/workflows/changelog.yml— on every push to main, measures the gap since the last commit that touched CHANGELOG.md. If a merge landed without touching it, drafts the missing entries from the merge's actual diff (.github/scripts/changelog-ai.sh) and proposes them as abot/changelogPR — a draft for human review, never a direct push.AI_GATEWAY_API_KEYsecret, a failed call, or an internal-only gap → a log line, never a red check and never a PR.Backfill (written from each PR's diff, in the file's voice)
Three other audit hits (#68, #69, #71) turned out to be already covered by newer entries and were deliberately left alone. Duplicate category headings merged into one per category, Keep-a-Changelog order — all 39 existing bullets preserved verbatim.
To activate drafting
Add the
AI_GATEWAY_API_KEYrepo secret (same key stella's release notes use). Until then the workflow no-ops with a log line.Summary by Sourcery
Keep the changelog aligned with main by auto-drafting missing entries for merges and backfilling past gaps.
Enhancements:
CI:
Documentation: