Skip to content

Log the decisions of a range bundle in batches - #4472

Merged
Mpdreamz merged 3 commits into
mainfrom
feature/changelog-decision-log
Oct 15, 2026
Merged

Mpdreamz merged 3 commits into
mainfrom
feature/changelog-decision-log

Conversation

@Mpdreamz

@Mpdreamz Mpdreamz commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

release unified bundle logs the per-pull-request decisions of a range in a few batched lines instead of one line each. A Kibana run's log goes from 706 lines to 47.

Affects: Release notes, CLI

Prompt summary: The output of the unified bundle run is too noisy to read. Log what was decided for each pull request in batches, every few seconds or after a number of items, grouped by outcome and reason. The optional "no release note" message is not worth a hint.

Why

A run over the Elastic Stack ranges printed a line for every excluded pull request, every entry a bundle rule left out, and every missing optional release note. The first workflow run logged 3,754 hints and 165 warnings, and the full run report added hundreds of lines more. The lines that matter, such as an error or a skipped product, were buried.

What

Decision log

DecisionLog collects decisions per section and logs a section when it holds 50 decisions or its oldest decision is 4 seconds old. Disposing it, or calling Flush(), logs what is left, so a run never loses the tail. A line groups a section by outcome and reason:

entries: pool #1 #2 · inferred (title) #3 · exclude (release_note:skip) #4 #5
bundle: exclude (disjoint from rule context 'kibana') 282149.yaml 290181.yaml
notes: no release note #6 #7

It has no locks and no timer. A section is a concurrent queue and a flush drains it, so every decision is logged exactly once even from several threads. Age is checked when a decision is added, so the timing is approximate, and a section that stops receiving decisions waits for the next flush.

Decisions are not diagnostics

An exclusion that a valid configuration asks for is not a warning or a hint. The excluded pull requests (rules.create), the entries a bundle rule leaves out, the entries inferred from pull request metadata, and the optional release-note hints are now decisions in every command, not diagnostics. DecisionLog.Immediate logs each one at once for a command with nothing to group, such as changelog add. Warnings and errors for something that needs attention, such as a pull request whose metadata could not be fetched, are still reported at once. release unified bundle passes a batching log in.

Report

The full run report has a row per pull request. A normal run logs a one-line summary (339 commits, 331 pull requests: 0 from the pool, 91 inferred, 240 excluded, 0 missing) and the report at debug level. --dry-run still prints the whole report.

Verify

dotnet test tests/Elastic.Changelog.Tests/
GITHUB_TOKEN=$(gh auth token) dotnet run --project src/tooling/docs-builder -- release unified bundle current --products kibana --changelog-configs <dir with prototype configs> --output-dir <dir>

Out of scope: The cache. The cached outcome will use this log when the cache lands.

🤖 Generated with Claude Code

A unified bundle run printed a line for every excluded pull request, every filtered entry and every optional release note: 3,754 hints and 165 warnings for Elasticsearch and Kibana, plus a 600-line report. A decision log now groups them per section and logs when a section holds 50 decisions or is 4 seconds old, and once more on flush or dispose. The log shows what was decided and why, such as "exclude (>non-issue) #1 #2". The full report moves to debug level, with a one-line summary at info. Other commands keep their messages.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@Mpdreamz
Mpdreamz requested a review from a team as a code owner October 15, 2026 11:32
@Mpdreamz
Mpdreamz requested a review from akira28 October 15, 2026 11:32
@github-actions

Copy link
Copy Markdown
Contributor

Mpdreamz and others added 2 commits October 15, 2026 13:44
An exclusion that a valid configuration asks for is not a warning or a hint, so the choice between a diagnostic and a decision line no longer depends on whether a decision log was passed in. Every service has one, unbatched where nothing groups. The warnings and hints for excluded pull requests, filtered entries and optional release notes are gone, and the lines show what was decided and why. The log has no locks and no timer: a section is a concurrent queue, a flush drains it, and the age of a section is checked when a decision is added.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
A decision that Record's own flush has taken from a section is not in the section any more, so a Dispose on another thread saw nothing pending and returned while the line was still being logged. Flushes are counted from before the first decision is taken until the line is logged, and Flush waits for the count to reach zero without a lock.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@Mpdreamz
Mpdreamz merged commit b067c46 into main Oct 15, 2026
32 checks passed
@Mpdreamz
Mpdreamz deleted the feature/changelog-decision-log branch October 15, 2026 13:17
theletterf added a commit that referenced this pull request Oct 15, 2026
Resolve the conflict in GitRangeEntryResolver: keep the labels-then-defaults product resolution of this branch and pass the decision log to the skip check, as #4472 does on main.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RyiyHmDHcUFt8rjMNR8TBm
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