Skip to content

docs: implement changelog generation audit findings (#7522)#7667

Open
jongio wants to merge 5 commits intomainfrom
fix/changelog-audit-findings
Open

docs: implement changelog generation audit findings (#7522)#7667
jongio wants to merge 5 commits intomainfrom
fix/changelog-audit-findings

Conversation

@jongio
Copy link
Copy Markdown
Member

@jongio jongio commented Apr 11, 2026

Summary

Implements the 6 audit findings from #7522, which audited 10 releases (1.23.5–1.23.14) and identified systematic issues in changelog generation.

What Changed

Skill Rule Updates

pr-processing.md — 3 new rules:

  • F1: Dual PR number extraction — when a commit message contains both the original PR and the merge/cherry-pick PR number, use the canonical (original) PR
  • F4: Alpha/beta feature gating — features behind alpha/beta flags should be excluded from user-facing changelogs
  • F5: Borderline changes default to include — commits matching borderline keywords (e.g., UX, telemetry, logging improvements) should be included rather than excluded

SKILL.md — 3 new validation steps:

  • F2: PR link validation gate (Step 5) — every changelog entry must have a valid [[#NNN]](url) PR link before output
  • F3: Cross-release deduplication (Step 4) — check that entries weren't already published in a prior release
  • F6: Post-generation commit range cross-reference (Step 5) — verify every scoped commit is either included or explicitly excluded

Backtesting Audit Tool

A standalone Go tool at .github/skills/changelog-generation/audit/ that retroactively audits the last 20 releases against all 6 rules and generates a detailed report with:

  • Summary statistics (errors/warnings/info per release)
  • Per-rule aggregate counts
  • Side-by-side unified diffs for each release showing exactly how the changelog section would change under the new rules

The diff blocks render with GitHub's syntax highlighting (red/green coloring) and include rule annotations (e.g., ← F2: add missing PR link) so reviewers can see the justification for each change at a glance.

Key Findings from 20-Release Audit

Severity Count Primary Rules
Error 9 F2 (missing PR links)
Warning 18 F1, F2b, F3b, F5, F6
Info 2 F4 (alpha/beta gating)

How to Review

  1. Rule changes: Review pr-processing.md and SKILL.md diffs for the 6 new rules
  2. Audit report: Open audit/report.md and scroll to any release's Side-by-Side Diff section to see how the rules would have changed that release's changelog
  3. Tool code: Review audit/main.go for the backtesting logic

How to Run the Audit Tool

cd .github/skills/changelog-generation/audit
go run main.go
# Generates report.md in the same directory

Closes #7522

jongio and others added 3 commits April 11, 2026 08:29
Address all 6 findings from the changelog generation audit:

1. Dual PR number extraction - use last PR number as canonical reference
2. Enforce PR links on every changelog entry in Step 5 validation
3. Cross-release deduplication check in Step 4 (PR + issue numbers)
4. Document alpha/beta feature gating in exclusion rules
5. Default borderline user-facing changes to included
6. Post-generation cross-reference validation against commit range

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add a Go tool that retroactively audits past changelog releases against the
updated generation rules, producing a side-by-side comparison report.

The tool checks for:
- F1: Dual PR number extraction (use last as canonical)
- F2: Missing PR links on changelog entries
- F2b: Issue links used instead of PR links
- F3/F3b: Cross-release and intra-release duplicate entries
- F4: Alpha/beta feature gating verification
- F5: Borderline excluded commits that should be included
- F6: Phantom entries (PRs not in commit range)
- F6b: Link text/URL number mismatches

Results across 20 releases (1.22.2-1.23.15):
- 9 errors (all missing PR links in 1.23.9, 1.23.13)
- 18 warnings (phantoms, borderline exclusions, duplicates)
- 2 info (alpha/beta gating checks)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Enhance the changelog audit tool to generate GitHub-renderable diff blocks
showing exactly how each release section would change under the new rules.
Each corrected line includes annotations (e.g., ← F2: add missing PR link)
so reviewers can see the rule justification at a glance.

Changes:
- Add correctRelease() engine that mechanically applies all 6 finding rules
- Add renderUnifiedDiff() that produces unified diff with annotations
- Finding struct now carries LineNumber, OldPR, NewPR for precise corrections
- Report regenerated with diff blocks for all 20 audited releases

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 11, 2026 15:34
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 11, 2026

📋 Milestone: April 2026

This work is tracked for April 2026. The team will review it soon!

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the changelog-generation skill documentation to incorporate the audit findings from #7522 (rules/validation gates around PR number selection, deduplication, alpha/beta gating, and inclusion defaults) and adds a standalone Go-based audit tool under .github/skills/changelog-generation/audit/ to retroactively check recent releases and emit a Markdown report.

Changes:

  • Extend SKILL.md and references/pr-processing.md with new rules/validation steps for deduplication, PR-link validation, alpha/beta gating, and “borderline include” guidance.
  • Add a Go audit tool (main.go + go.mod) with docs and a generated report.md example output.
  • Add minimal repo hygiene for the tool (.gitignore for Windows executables).

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
.github/skills/changelog-generation/SKILL.md Adds cross-release dedup + PR-link validation + commit-range cross-check steps to the skill workflow.
.github/skills/changelog-generation/references/pr-processing.md Adds dual-PR-number extraction guidance and expands exclusion/include heuristics (alpha/beta + borderline defaults).
.github/skills/changelog-generation/audit/main.go Implements the audit engine, report generator, and “side-by-side diff” rendering.
.github/skills/changelog-generation/audit/README.md Documents running the audit tool and explains checks/flags.
.github/skills/changelog-generation/audit/report.md Adds a generated sample audit report for reviewers.
.github/skills/changelog-generation/audit/go.mod Introduces a standalone Go module for the audit tool.
.github/skills/changelog-generation/audit/.gitignore Ignores Windows .exe outputs in the audit tool folder.

jongio and others added 2 commits April 11, 2026 09:13
Replace monolithic report.md with per-release comparison files:
- published/<version>.md: verbatim changelog extract from CHANGELOG.md
- corrected/<version>.md: deterministic corrections only (F1, F2b, F3, F6, F6b)
- findings.md: clean findings report without embedded diffs

Key improvements:
- No more fake [[#???]] placeholders — only apply corrections when the
  right answer is provable (e.g., F1 PR swap, F6 phantom removal)
- Per-release files are small and diffable with standard tools
- Findings use indented code blocks to avoid backtick nesting issues
- 5 of 20 releases have corrections; 15 are identical

Reviewers: diff -ru published/ corrected/ to see all corrections.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Reorder PR extraction rules: check dual PR numbers first (before
  single-match squash merge) to avoid ambiguity when multiple (#NNNN)
  patterns are present
- Add warning log when changelog entries contain multiple PR links
  (only first is tracked; affects F3/F6 accuracy for older releases)
- Regenerate findings.md with updated commit range display

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Changelog generation: audit findings and improvement recommendations

2 participants