Skip to content

feat(changelog): add link: field to changelog entries — marker read side (Step 7) - #3928

Merged
Mpdreamz merged 7 commits into
mainfrom
fix/changelog-link-field
Aug 26, 2026
Merged

feat(changelog): add link: field to changelog entries — marker read side (Step 7)#3928
Mpdreamz merged 7 commits into
mainfrom
fix/changelog-link-field

Conversation

@Mpdreamz

Copy link
Copy Markdown
Member

Summary

  • Adds link: to ChangelogEntryDto, ChangelogEntry (domain type), BundledEntry, and BundledEntryDto so the field survives the full YAML → domain → YAML round-trip and the scrub pass
  • ChangelogEntry.IsMarker returns true when Link is non-null
  • ChangelogContentScrubber.ScrubChangelog explicitly preserves link: through both the BundledEntry passed to LinkAllowlistSanitizer and the with expression — link: is a bare PR number (never a URL), so no allowlist rule touches it
  • No markers exist in S3 today (the writer lands in Step 8), so this is inert on merge

Must ship before Step 8 (canonical keys + marker writing) so no bundler ever sees a marker it would treat as a malformed empty entry.

Test plan

  • Serialization round-trip: link: "12345" → deserialize → entry.Link == "12345", entry.IsMarker == true
  • Scrub preserves link: when private prs: are stripped
  • IsMarker is false on normal entries
  • dotnet test tests/Elastic.Changelog.Tests/ tests/Elastic.Documentation.Configuration.Tests/ — all passing
  • dotnet build -c Release — 0 errors

Part of the two-anchor plan (Step 7). Independent of Steps 4–6.

🤖 Generated with Claude Code

@Mpdreamz
Mpdreamz requested a review from a team as a code owner August 25, 2026 15:06
@Mpdreamz
Mpdreamz requested a review from theletterf August 25, 2026 15:06

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes: marker entries can currently serialize with additional fields (notably title: ''), which conflicts with the link-only marker contract introduced in this PR.


What is this? | From workflow: PR Review

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

Comment thread src/Elastic.Documentation.Configuration/ReleaseNotes/ReleaseNotesSerialization.cs Outdated

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes: please make probe failures distinguishable from authoritative 404 misses so transient CDN/HTTP errors cannot be treated as absent changelog entries.


What is this? | From workflow: PR Review

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

Comment thread src/Elastic.Documentation.Configuration/ReleaseNotes/CdnChangelogEntryFetcher.cs Outdated

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes: CDN probe selection should preserve PR repo/owner identity so cross-repo PR URLs cannot match by number alone.


What is this? | From workflow: PR Review

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

Comment thread src/services/Elastic.Changelog/Bundling/ChangelogBundlingService.cs
Mpdreamz and others added 7 commits August 26, 2026 13:53
Adds `link:` to `ChangelogEntryDto`, `ChangelogEntry` (domain type),
`BundledEntry`, and `BundledEntryDto` so the field survives the full
YAML → domain → YAML round-trip and the scrub pass.

`ChangelogEntry.IsMarker` returns true when `Link` is non-null. A marker
is a machine-written object containing only `link: {prNumber}` that
redirects a non-primary PR to the parent entry's key; no markers exist in
S3 today (the writer lands in Step 8), so this is inert on merge.

`ChangelogContentScrubber.ScrubChangelog` explicitly preserves `link:` in
both the `BundledEntry` passed to `LinkAllowlistSanitizer` and the `with`
expression applied after sanitization. `link:` is never a URL, so no
allowlist rule touches it.

Tests: serialization round-trip for marker entries; scrub preserves `link:`
when prs: are stripped; `IsMarker` false on normal entries.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…d other non-link fields

ToDto(ChangelogEntry) now short-circuits on IsMarker: only Link is emitted.
This enforces the marker contract (link: is the sole field) and prevents
'title: ''' from appearing in round-tripped marker YAML.
New test: SerializeEntry_MarkerEntry_YamlContainsOnlyLinkField.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…read (#3931)

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
…ly short-circuit pure markers

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… test

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ent failures now throw instead of returning null

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…o longer probe elasticsearch pool

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Mpdreamz
Mpdreamz force-pushed the fix/changelog-link-field branch from 3c68594 to 9b76977 Compare August 26, 2026 11:53
@Mpdreamz
Mpdreamz merged commit 80db806 into main Aug 26, 2026
30 checks passed
@Mpdreamz
Mpdreamz deleted the fix/changelog-link-field branch August 26, 2026 12:04

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes: marker entries can still carry additional populated fields (for example issues) without failing scrub validation, which allows the marker fast-path to bypass private-reference checks.


What is this? | From workflow: PR Review

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

Highlight = entry.Highlight,
Subtype = entry.Subtype
Subtype = entry.Subtype,
Link = entry.Link

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

link: is now preserved through scrub output, but marker validation above still only treats title, type, products, and prs as disallowed content. That means a payload like:

link: "12345"
issues:
  - https://github.com/private-org/private-repo/issues/1

is accepted as a marker and returned unchanged, skipping both allowlist scrubbing and ValidateNoPrivateReferences via the early return path.

Given the marker contract in this PR (link must be the only field), this should fail closed for any additional populated field (including issues, description, impact, action, areas, feature-id, highlight, subtype). Could you tighten the marker-content check to cover all non-link fields and add a regression test for link + issues?

@lcawl lcawl mentioned this pull request Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants