Skip to content

fix(changelog): probe-based CDN sourcing replaces dead pool-registry read - #3931

Merged
Mpdreamz merged 4 commits into
fix/changelog-link-fieldfrom
fix/changelog-probe-sourcing
Aug 26, 2026
Merged

fix(changelog): probe-based CDN sourcing replaces dead pool-registry read#3931
Mpdreamz merged 4 commits into
fix/changelog-link-fieldfrom
fix/changelog-probe-sourcing

Conversation

@Mpdreamz

Copy link
Copy Markdown
Member

Summary

Fixes the reported regression: `changelog bundle --prs` against CDN finds zero entries because `FetchAsync` reads `changelog/{org}/{repo}/{branch}/registry.json`, which nothing has written since #3760 retired the writer.

The fix: replace the registry-read with one direct GET per PR number for the `--prs` / `--report` / `--release-version` CDN path:

  • `CdnChangelogEntryFetcher.FetchPrEntryAsync` — probes `{pr}.yaml` directly; 404 is authoritative-null (not retried); 5xx uses the existing retry budget
  • `ChangelogBundlingService.FetchCdnProbedEntriesAsync` — fans out concurrently over the PR list, resolves `link:` markers depth-1, deduplicates by parent file name, warns on probe misses (not hard errors)
  • `--issues` on CDN path gets an explicit error (issue→PR resolution requires reading every body, which probing cannot do)

Old `FetchAsync` / `FetchCdnEntriesAsync` kept for the git-range CDN path (separate follow-up). This PR stacks on #3928 (`link:` field / `IsMarker`).

Test plan

  • 945 changelog tests pass
  • 680 configuration tests pass
  • Probe hit → entry included
  • Probe 404 → warn + skip, exactly 1 request (not retried)
  • Probe 5xx → retried with existing budget
  • Marker depth-1 → parent entry used, original marker not in bundle
  • Marker chain → hard error
  • Marker parent missing → hard error
  • Duplicate markers for same parent → exactly one entry in bundle
  • `--issues` on CDN → error pointing at `--force-local`
  • Pool org override (`--owner acme-corp`) → probes correct pool path regardless of PR URL's GitHub org

🤖 Generated with Claude Code

@Mpdreamz
Mpdreamz requested review from a team as code owners August 25, 2026 16:54
@Mpdreamz
Mpdreamz requested a review from theletterf August 25, 2026 16:54
@Mpdreamz
Mpdreamz force-pushed the fix/changelog-link-field branch from e5a8cbd to be1a0bd Compare August 26, 2026 07:57
@Mpdreamz
Mpdreamz force-pushed the fix/changelog-probe-sourcing branch from 5a5f953 to 2eb27fa Compare August 26, 2026 07:58
@Mpdreamz
Mpdreamz force-pushed the fix/changelog-link-field branch from be1a0bd to 4b5a43a Compare August 26, 2026 08:21
Mpdreamz and others added 2 commits August 26, 2026 10:25
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>
@Mpdreamz
Mpdreamz force-pushed the fix/changelog-link-field branch from 4b5a43a to a565180 Compare August 26, 2026 08:25
Mpdreamz and others added 2 commits August 26, 2026 10:30
…read

Replace FetchAsync (reads changelog/{org}/{repo}/{branch}/registry.json, which
nothing has written since #3760) with per-PR probing for the --prs / --report /
--release-version CDN path. For each requested PR, the bundler now fetches
{pr}.yaml directly:

- 404 = no changelog for this PR (warn + skip, not retried — it is authoritative)
- 5xx / transport errors use the existing retry budget
- Marker entries (link: {parentPr}) are resolved depth-1; marker chains and
  missing parents are hard errors
- Duplicate markers pointing to the same parent yield one entry

Also adds an explicit --issues CDN error (issue→PR resolution requires reading
every body, which probing cannot do).

Fixes the reported regression: changelog bundle --prs against CDN returned zero
entries because the pool registry was never written after #3760 retired the writer.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Mpdreamz
Mpdreamz force-pushed the fix/changelog-probe-sourcing branch from 2eb27fa to f5dc4c3 Compare August 26, 2026 08:34
@Mpdreamz
Mpdreamz force-pushed the fix/changelog-link-field branch from a565180 to 6d229d1 Compare August 26, 2026 09:03
@Mpdreamz
Mpdreamz merged commit 690c5c0 into fix/changelog-link-field Aug 26, 2026
28 of 30 checks passed
@Mpdreamz
Mpdreamz deleted the fix/changelog-probe-sourcing branch August 26, 2026 09:25
Mpdreamz added a commit that referenced this pull request Aug 26, 2026
…read (#3931)

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Mpdreamz added a commit that referenced this pull request Aug 26, 2026
…read (#3931)

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Mpdreamz added a commit that referenced this pull request Aug 26, 2026
…ide (Step 7) (#3928)

* feat(changelog): add link: field to changelog entries — marker read side

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>

* fix(changelog): marker entries serialize as link-only — omit title and 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>

* fix(changelog): probe-based CDN sourcing replaces dead pool-registry read (#3931)

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(changelog): marker guard — allow link: alongside other fields, only short-circuit pure markers

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

* fix(changelog): restore marker-only guard; remove contradictory scrub test

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

* fix(changelog): propagate probe error from FetchPrEntryAsync — transient failures now throw instead of returning null

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

* fix(changelog): TryExtractPrNumber validates repo name — kibana PRs no longer probe elasticsearch pool

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

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
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