Skip to content

fix(changelog): sort fragments descending so most recent lands on top - #69

Merged
sumitake merged 1 commit into
mainfrom
claude/changelog-version-order-8ec2ba
Jul 28, 2026
Merged

fix(changelog): sort fragments descending so most recent lands on top#69
sumitake merged 1 commit into
mainfrom
claude/changelog-version-order-8ec2ba

Conversation

@sumitake

Copy link
Copy Markdown
Owner

Summary

Fix changelog.d/ fragment ordering: build-changelog.py sorted fragments ascending by filename, which put the oldest entry at the top of [Unreleased] and the newest at the bottom — backwards from the Keep a Changelog "most recent on top" convention this file's own header cites. Fragments now sort descending (reverse-lexical), and CHANGELOG.md is regenerated from that corrected order. No entry content changed, only position.

Boundary declaration

  • No provider executor source, raw provider command, credential, private absolute path, retired package tree, downloader, or post-install hook is included.
  • Native-runtime changes, if any, contain only a final signed artifact and reviewed public verification metadata; implementation and credentials remain private. (N/A — no runtime files touched.)
  • The change does not create a host-specific preset or provider-specific plugin.

Generated and release surfaces

  • Skill specs and generated SKILL.md files are in parity.
  • Claude and Codex marketplaces/manifests are in parity.
  • A unique changelog.d/ fragment is present for a user-visible change; generated CHANGELOG.md changes only in a release/bootstrap PR. (This PR is the exception: the fix itself is a CHANGELOG.md ordering change, so regenerating it here is the point of the PR, not incidental drift.)
  • Version metadata is bumped when behavior or distributed content changes. (N/A — no distributed package behavior changed; this is a doc-ordering/build-tooling fix, not a release.)

Verification

  • python3 scripts/build_skills.py --check
  • python3 scripts/build_marketplace.py --check
  • python3 scripts/build-changelog.py --check
  • python3 -m unittest discover -s tests -t . -v (579 tests, OK)
  • python3 -m unittest discover -s scripts -p 'test_*.py' -v (254 tests, OK)
  • python3 scripts/check_release_consistency.py
  • python3 scripts/secret_scan.py
  • python3 scripts/check-public-export-safety.py --active-tree --history (--active-tree alone: SAFE. --history fails on pre-existing legacy blobs unrelated to this diff — verified identical failure on origin/main HEAD with no local changes; tracked separately, not introduced or touched by this PR.)
  • git diff --check

Review and post-condition

Tier 2 (user-visible build-tooling behavior + tests). Independent cross-family review could not be completed synchronously: migration-doctor reports PROVIDER ROUTING: BLOCKED / BROKER RUNTIME: unavailable in this session, so no live Gemini/Codex/Grok route is reachable. Post-condition: build-changelog.py --check passes against the regenerated CHANGELOG.md; full test suites and release/export gates pass as listed above.

Compliance trace

author: claude (Sonnet 5)
standing_directives: AGENTS.md build/validation steps followed; no executor source, credentials, or private paths touched
tier: 2
cross_check: IN-FLIGHT — native broker unavailable this session (migration-doctor: PROVIDER ROUTING BLOCKED); no live cross-family route reachable; not yet converged to PROCEED
post_condition: build-changelog.py --check + full test suites + release-consistency + secret-scan + export-safety(active-tree) all pass; export-safety --history failure verified pre-existing/unrelated on origin/main HEAD
mcp_coverage_gap: NONE
contributor_rights: OWNER-AUTHORED
operator_reserved: no

build-changelog.py sorted changelog.d/ fragments ascending by filename,
which placed the oldest entry at the top of [Unreleased] and the newest
at the bottom -- backwards from the Keep a Changelog convention this
file's own header cites. Reverse the sort, update the two tests that
pinned the old order, and regenerate CHANGELOG.md from the corrected
compiler (content unchanged, only reordered).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@sumitake
sumitake merged commit 6c3073e into main Jul 28, 2026
15 checks passed
@sumitake
sumitake deleted the claude/changelog-version-order-8ec2ba branch July 28, 2026 06:47

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5c2bfbf20f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread CHANGELOG.md
<!-- changelog-fragments:start (auto-generated by build-changelog.py — do not hand-edit) -->

### Added
### Fixed

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep generated CHANGELOG out of this non-release commit

This build-tooling commit is not a release/bootstrap change, but it commits a 1,300-line regeneration of the shared generated file. The repository contract requires user-visible PRs to commit only their unique fragment and leaves CHANGELOG.md compilation to the release flow; retaining this edit reintroduces the merge-conflict surface that fragments are intended to avoid. Remove the generated file change and let the next release compile the new ordering.

AGENTS.md reference: AGENTS.md:L32-L33

Useful? React with 👍 / 👎.

return []
fragments: list[Path] = []
for entry in sorted(FRAGMENTS_DIR.iterdir()):
for entry in sorted(FRAGMENTS_DIR.iterdir(), reverse=True):

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve chronology among same-day fragments

When multiple fragments share an ISO-date prefix, reversing the entire filename sorts their arbitrary slugs rather than their chronology. This already puts 2026-07-25-gemini-governance-proof-v2-client.md (agent-collab 4.3.5) above 2026-07-25-execute-output-fail-closed.md (4.4.2), whereas the parent changelog correctly had 4.4.2 first. Thus the claimed most-recent-first ordering is false for the repository's existing naming convention; the sort key or fragment naming contract needs a chronological within-day discriminator.

Useful? React with 👍 / 👎.

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