Skip to content

feat: broader CHANGELOG headers + --summary flag for LLM context#3

Merged
justi merged 1 commit into
mainfrom
feat/changelog-formats-summary
May 8, 2026
Merged

feat: broader CHANGELOG headers + --summary flag for LLM context#3
justi merged 1 commit into
mainfrom
feat/changelog-formats-summary

Conversation

@justi
Copy link
Copy Markdown
Owner

@justi justi commented May 8, 2026

Summary

Two follow-ups from the 10-app smoke report.

1. Header regex accepts [v0.16.0]

Some gems (faraday-style, Keep-a-Changelog with leading v) ship CHANGELOG headers like ## [v0.16.0] - 2025-12-27. The previous regex required the bracket to come after the v (v?\[?), so the natural Keep-a-Changelog ordering was rejected.

Reordered to \[?v? — both still independently optional, but the bracket can now precede the v. Three header forms verified:

## [0.16.0]    # already worked
## v0.16.0     # already worked
## [v0.16.0]   # broken before, now parses

2. --summary flag

Post-process filter (awk) that retains headers + blank lines verbatim and keeps bullet lines only if they mention CVE-/GHSA-/security/breaking/deprecat/CRITICAL. Designed for compact LLM context: an LLM mostly needs to know what changed broadly + what's risky, not every patch's release notes.

Sieroced headers are kept on purpose — knowing a gem moved at all is itself signal, even when no high-severity bullets exist.

$ postcut --summary --since 2025-09-01 --path ~/Projects/ruby_llm_fork
RECENT_DEPS_CHANGES (cutoff: 2025-09-01, ..., scope: 41 direct deps (Gemfile), summary):

async: 2.28.0 (last seen) → 2.39.0 (current, 2026-04-05)

googleauth: 1.15.0 → 1.16.2 (2026-02-26)
  1.15.1: Deprecate method make_creds in DefaultCredentials
  1.16.0: Include security warning in ExternalAccount and ImpersonatedServiceAccount

nokogiri: 1.18.9 → 1.19.3 (2026-04-27)
  1.18.10: Vendored libxml2 v2.13.9 (security fixes)
  1.19.1: GHSA-wx95...
  1.19.3: GHSA-c4rq..., GHSA-v2fc... (memory leak)

rails: 8.0.2.1 → 8.1.3 (2026-03-24)
  [activesupport] 8.1.0: Remove deprecated passing a Time object to `Time#since`...

The scope label includes , summary so the consumer knows the output was post-filtered.

Test plan

  • tests/test_summary.sh — synthetic deltas through the awk filter, asserts both retention (CVE, GHSA, Breaking, deprecated) and dropping (routine maintenance, unrelated fixes). 11/11 pass.
  • tests/test_ruby_local_notes.sh — adds bracketed-0.16.0 fixture, three regression assertions for [v0.16.0] parsing. 23/23 pass.
  • Full suite: 68/68 across 7 test files.
  • E2E --summary against ruby_llm_fork — output is coherent and high-signal.

🤖 Generated with Claude Code

Two changes from the 10-app smoke report's BUG #C ("missing notes for
non-Rails CHANGELOG formats") and follow-up wishlist.

1. Header regex now accepts `[v0.16.0]` (Keep-a-Changelog with `v`
   prefix). Reordered `\[?v?` so the bracket and the `v` are both
   independently optional in the natural order they appear:
     ## [0.16.0]      # already worked
     ## v0.16.0       # already worked
     ## [v0.16.0]     # broken before — now parses
   Adds bracketed-0.16.0 fixture and three regression assertions.

2. `--summary` flag in bin/postcut. After deltas are assembled, runs
   an awk filter that retains headers and blank lines verbatim and
   keeps bullet lines only if they mention CVE-/GHSA-/security/
   breaking/deprecat/CRITICAL. The filter doesn't drop sieroced
   headers — knowing that a gem changed at all is itself signal for
   an LLM, even when no high-severity bullets exist.

   Updated scope label includes ", summary" suffix so the consumer
   knows the output was post-filtered. Updated README usage block.

   Adds tests/test_summary.sh — duplicates the awk program (kept in
   sync via comment), feeds it a synthetic deltas string covering
   security/breaking/deprecation/maintenance bullets and asserts both
   retention and dropping.

E2E verified locally on ruby_llm_fork (--summary --since 2025-09-01):
the only bullets that survive belong to googleauth (Deprecate method),
nokogiri (4 GHSA advisories + 1 vendored-libxml2 security fix) and
rails [activesupport] (Remove deprecated APIs) — exactly the slice an
LLM needs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@justi justi merged commit 1494511 into main May 8, 2026
1 check passed
@justi justi deleted the feat/changelog-formats-summary branch May 8, 2026 08:36
justi added a commit that referenced this pull request May 8, 2026
fix: codex review #3 + README polish — v0.3.1
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.

1 participant