Skip to content

Commit cd29c5e

Browse files
committed
docs(rules): clarify changelog backport conventions
The previous Backports section only said "also add entry to stable changelog" without explaining that the stable release branch's changelog has a dual top-level structure (`# v{next} backports` section above `# v{this} changes`). Backport entries belong under `# v{next} backports > ## In this release`, not in the frozen `# v{this} changes > Regression fixes` section. Adds the structure, the lifecycle (In this release → In previous releases at patch release time), and the 3-step workflow.
1 parent 27b4a5b commit cd29c5e

1 file changed

Lines changed: 33 additions & 3 deletions

File tree

‎.claude/rules/changelog.md‎

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,39 @@ For external contributors (not core team):
7575

7676
## Backports
7777

78-
When a fix is backported to a stable branch:
79-
1. Entry exists in current version changelog (e.g., `changelog-1.9.md`)
80-
2. **Also add entry to stable version changelog** (e.g., `changelog-1.8.md`)
78+
A backport adds the entry to **two changelog files**, each with its own location:
79+
80+
### On `main` (current dev version, e.g. `changelog-1.10.md`)
81+
82+
Entry goes under `## Regression fixes` (or another appropriate section). One file, flat `##` section list — same as any other entry on main. The `Regression fixes` section signals the change is also backported to stable; non-backported fixes go under `## Other fixes and improvements`.
83+
84+
### On the stable release branch (e.g. `changelog-1.9.md` on `v1.9`)
85+
86+
The stable changelog has a dual top-level structure that does NOT exist on main:
87+
88+
```markdown
89+
# v1.10 backports
90+
91+
## In this release <- backports landing in the next v1.9.x patch
92+
## In previous releases <- backports already shipped in earlier v1.9.x patches
93+
94+
# v1.9 changes
95+
96+
## Shortcodes
97+
## Regression fixes <- original v1.9 release fixes (NOT backports)
98+
## Dependencies
99+
...
100+
```
101+
102+
**Backport entries always go under `# v{next} backports > ## In this release`.** Never under `## Regression fixes` of the `# v{this} changes` section — that section is frozen and tracks the original v1.x release.
103+
104+
**Lifecycle:** When the next v1.x.y patch ships, entries under `## In this release` get demoted to `## In previous releases` as part of release prep. Don't pre-empt this — leave them under `In this release` until release time.
105+
106+
### Workflow
107+
108+
1. Land the change on main with an entry in `changelog-{next}.md`.
109+
2. Backport via cherry-pick to the stable branch. Drop the main changelog change from the cherry-pick (it modifies a file that doesn't exist on stable).
110+
3. Add a separate commit on the stable branch adding the entry under `# v{next} backports > ## In this release` of `changelog-{this}.md`.
81111

82112
## What NOT to Put Here
83113

0 commit comments

Comments
 (0)