Skip to content

feat(changelog): resolve Lisa's review on #789 — versions, amend reconciler, backport rule - #3939

Merged
Mpdreamz merged 4 commits into
mainfrom
feature/rn-continued
Aug 27, 2026
Merged

feat(changelog): resolve Lisa's review on #789 — versions, amend reconciler, backport rule#3939
Mpdreamz merged 4 commits into
mainfrom
feature/rn-continued

Conversation

@Mpdreamz

Copy link
Copy Markdown
Member

Summary

Resolves the four points Lisa raised on elastic/docs-eng-team#789.

  • target obsoleted on entry/note schema. versions (note-only, plural list) replaces it. Nothing writes target any more; readers still accept it for existing pool objects. BundledProduct.Target (bundle schema) is unchanged and tracked separately in elastic/docs-eng-team#790.
  • Notes pass through the pool — always did; updated decision 4 wording to reflect this.
  • NoteAmendReconciler: Lambda auto-generates .amend-notes.yaml sidecars for notes that arrive after their release bundle has shipped. One aggregate sidecar per parent bundle, rebuilt from state on every reconcile (idempotent). bundle_seq on NoteIndexEntry (0/1/2) reports shipped state cheaply.
  • Backport collision rule: same-leaf note on multiple branches at one version → prefer main/master, warn on discards, ordinal-first otherwise.

What changed

Area Change
Schema ProductInfoDto.Target[Obsolete]; ProductInfoDto.Versions added; NoteIndexEntry drops branch, adds bundle_seq; schema_version: 1
Authoring changelog note writes versions; changelog add errors if a version is supplied in --products
Reconciler NotesIndexKey param renamed target→version; conditional writes + retry; NoteAmendReconciler (new)
Bundling AmendDocumentBuilder extracted (pure); BundleAmendMerger / ChangelogBundleAmendService widen .amend-notes as reserved suffix; backport dedup in MergeNotesAsync
Docs New cmd-note.md; updated cmd-add.md, cmd-bundle-amend.md, changelog-fields.md, changelog-bundle-registry.md; CLI schema regenerated
Follow-ups elastic/docs-eng-team#790 #791 #792 #793 #794 filed

Test plan

  • dotnet build — 0 errors
  • dotnet test tests/Elastic.Changelog.Tests/ — all passing (1009 tests)
  • dotnet test tests/Elastic.Documentation.Configuration.Tests/ — all passing (681 tests)
  • ./build.sh lint — clean (pre-push hook passed)
  • New NoteAmendReconcilerTests (8 tests): late note → sidecar; already shipped → no sidecar, seq=1; human amend → no sidecar; no file annotations → skipped; delete path; idempotent redelivery; no matching bundle; no products in bundle tree
  • New BundleCdnSourcingTests backport tests (3 tests): main wins, ordinal pick, checksum dedup still works
  • Reply comment posted on elastic/docs-eng-team#789; decision list updated

🤖 Generated with Claude Code

@Mpdreamz
Mpdreamz requested review from a team as code owners August 26, 2026 14:09
@Mpdreamz
Mpdreamz requested a review from reakaleek August 26, 2026 14:09
Comment thread docs/cli/changelog/cmd-add.md
Comment thread docs/data/release-notes/_snippets/changelog-fields.md Outdated
Comment thread docs/cli/changelog/cmd-note.md
@Mpdreamz

Copy link
Copy Markdown
Member Author

Terminology can do a re-eval for sure

roughly:

release -> bundle
entry -> bundle entry

entry exists of

1 or more <pr>.yaml changelog files.
or 1 note-<name>.yaml.

A release entry is a single entry in the release that will be displayed as a single unit.

Mpdreamz and others added 4 commits August 27, 2026 11:02
…nciler, backport rule

- Obsoletes `target` on entry/note schema; `versions` (note-only, plural) replaces it
- Adds `NoteAmendReconciler`: Lambda auto-generates `.amend-notes.yaml` sidecars for notes
  that arrive after their release bundle has shipped; one aggregate sidecar per parent bundle,
  rebuilt from state on every reconcile (idempotent)
- `bundle_seq` on `NoteIndexEntry` (0/1/2) reports shipped state per note per version
- Backport collision rule in `ChangelogBundlingService`: same-leaf note on multiple branches
  at one version → prefer main/master, warn on discards, ordinal-first otherwise
- `AmendDocumentBuilder`: pure static helper factored out of `ChangelogBundleAmendService`
  so the Lambda reconciler can build amend documents without a filesystem dependency
- Widens `.amend-notes` as a reserved suffix in `BundleAmendMerger.IsAmendFile` and
  `ChangelogBundleAmendService`; `GetNextAmendNumber` skips it
- Drops `branch` from `NoteIndexEntry` (derivable from `path`, no standalone value)
- `NotesIndexKey` parameter renamed `target` → `version` (vocabulary only, key shape unchanged)
- Docs: new `cmd-note.md`, updated `cmd-add.md` / `cmd-bundle-amend.md` / `changelog-fields.md`
  / `changelog-bundle-registry.md`; CLI schema regenerated
- Filed follow-up issues elastic/docs-eng-team#790#794

Closes elastic/docs-eng-team#789

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Lisa Cawley <lcawley@elastic.co>
@Mpdreamz
Mpdreamz force-pushed the feature/rn-continued branch from 2d1a259 to b632051 Compare August 27, 2026 09:06
@Mpdreamz
Mpdreamz merged commit 41eb1e1 into main Aug 27, 2026
31 of 32 checks passed
@Mpdreamz
Mpdreamz deleted the feature/rn-continued branch August 27, 2026 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants