fix(changelog): classify added fields as additive (feat), not fix#43
Merged
Conversation
A brand-new field is additive — a feature — but the SDK changelog was filing field additions under **Fixes** while the release correctly bumped minor. `model-added` and `enum-added` are hardcoded `additive`, but the `field-added` branch ran the differ's classification through `capSeverity`, which floors a would-be-breaking backend-only change at `fix`. The spec differ sometimes flags an added field `breaking` (it reads as a request-shape tightening), so the addition collapsed to `fix` -> **Fixes**, disagreeing with the `feat`/minor bump that came from a different additive fact in the same batch (e.g. workos-python 8.3.0, "Added `roles` to organization membership models"). Floor `field-added`/`value-added` at `additive` in `capSeverity`, regardless of the differ's classification: an addition can't break a caller and isn't a fix. This also covers a missing/odd classification, which previously fell through `severityToPrefix` to `fix`. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Greptile SummaryThis PR updates SDK changelog classification for added fields and enum values. The main changes are:
Confidence Score: 5/5The changes are narrowly scoped to changelog classification and covered by targeted regression tests. The implementation matches the described intent and adds tests for the key added-field cases plus a removal regression case.
What T-Rex did
Reviews (1): Last reviewed commit: "fix(changelog): classify added fields as..." | Re-trigger Greptile |
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.
Problem
An added field is showing up under Fixes in generated SDK changelogs even when the release correctly bumps minor.
Concrete case — workos-python#678 (8.2.0 → 8.3.0, minor):
The version bump is right (release-please read PR #676's squash subject
feat(generated): OrganizationMembership …→ minor), but the changelog text — which comes from this script's.changelog-pendingfragment, not release-please — files the new field under Fixes.Root cause
factsFromDiffhardcodesmodel-addedandenum-addedtoseverity: 'additive', but thefield-addedbranch runs the differ's classification throughcapSeverity:field-addedis inBACKEND_ONLY_DIFF_KINDS, andcapSeverityfloors a would-be-breaking backend-only change atfix. The spec differ sometimes flags an added fieldbreaking(it reads the new field as a request-shape tightening), so the addition collapsed tofix→severityToPrefix('fix')=fix→ Fixes section. A missing/odd classification would also fall throughseverityToPrefixtofix. Meanwhile the minor bump came from a different additive fact in the same batch, so the two disagree.Fix
Floor pure additions (
field-added,value-added) atadditiveincapSeverity, regardless of the differ's classification — an addition can't break a caller and isn't a fix. This brings field additions in line with the already-hardcodedmodel-added/enum-added.Tests
Added
scripts/__tests__/sdk-release-metadata.spec.mjs:field-addedflaggedbreaking/additive/ no-classification → all resolve toadditive(feat)field-removedflaggedbreakingstill caps tofix(the cap must not leak to altering/removing changes)Full suite: 45 pass, 1 skipped (built-bundle fixture), 0 fail.
🤖 Generated with Claude Code