fix: changelog extractor drops redundant version-heading lines (audit P2-7)#55
Merged
Conversation
aggregate_changelog.py rendered each release as the tag line followed by the release body's first line. GitHub release bodies open with a heading that only restates the version (e.g. "## v1.7.1 (2026-07-19)"), so the changelog page echoed a duplicate "## vX" heading with no notes, which also corrupted the page's heading hierarchy (audit P2-7). Add summarize_body(): skip a leading heading that merely restates the version, strip leading "#" so the first real note renders inline, and emit nothing when the body carries no notes beyond the version header. Widen the fetched body window (200 -> 400 chars) so real notes below the header survive truncation. Covered by four new tests. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NyCHrzA1psrKMFfroYbzaM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context: the docs-audit P0/P1 findings were already resolved on
mainThis branch started from a docs.openadapt.ai audit (
docs-findings.md, IDENTIFICATION pass) that flagged P0/P1 issues. On investigation, that audit was run against a stale checkout: it referencesdocs/packages/openadapt-ml.md,-wright,-evals,architecture.md, and a package-first nav that no longer exist onorigin/main. The current site has since been rewritten to a hand-authored, flow-first, product-first structure, and every P0/P1 is already fixed there:openadapt-flowis inrepos.yml(core/beta) and featured as the "Canonical compiler and governed runtime" indocs/ecosystem/index.md; the entireindex.md,concepts/, andreference/cli.md("openadapt flow CLI") are about it.index.mdalready leads with the demonstration-compiler framing ("Show it a repeated workflow. OpenAdapt compiles it into governed, deterministic replay") — deterministic model-free replay, effect verification, halt-don't-guess, all substrates, local-first + Cloud.packages/*.mdmirrors were deliberately retired.repos.ymlsets nodoc_page,sync_readmes.pytherefore syncs nothing, andvalidate_docs.py+test_sync_readmes.pynow enforce the page-free, no-package-first-nav contract. Re-introducing README-mirroring (and the requestedsync_readmes.pypath-rewrite) would regress the site and break those guards, so it is intentionally not done. The oldpackages/openadapt.mdis a redirect stub to/ecosystem/.whats-new.mdregenerates on thesync.ymlcron (last updated today);architecture.mdwas removed in favor ofconcepts/.What this PR changes: the one genuine residual owned-file bug (P2-7)
aggregate_changelog.pyrendered each release as the tag line plus the release body's first line. GitHub release bodies open with a heading that only restates the version (## v1.7.1 (2026-07-19)), so the livechangelog.mdechoed a duplicate## vXheading with no notes, also corrupting the page's heading hierarchy.summarize_body(): skip a leading heading that merely restates the version, strip leading#so the first real note renders inline, and emit nothing when the body has no notes beyond the version header.## vXheading leaks into the changelog).The
sync.ymlcron runsaggregate_changelog.py, so the live changelog picks this up on the next sync.changelog.mditself is not hand-edited (it is bot-regenerated), per the "do not hand-fake changelog content" instruction.Verification
pytest tests/— 68 passed (was 64; +4).python scripts/validate_docs.py— Validation passed.mkdocs build --strict— exit 0.🤖 Generated with Claude Code
https://claude.ai/code/session_01NyCHrzA1psrKMFfroYbzaM