fix(changelog): sort fragments descending so most recent lands on top - #69
Conversation
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>
There was a problem hiding this comment.
💡 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".
| <!-- changelog-fragments:start (auto-generated by build-changelog.py — do not hand-edit) --> | ||
|
|
||
| ### Added | ||
| ### Fixed |
There was a problem hiding this comment.
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): |
There was a problem hiding this comment.
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 👍 / 👎.
Summary
Fix
changelog.d/fragment ordering:build-changelog.pysorted 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), andCHANGELOG.mdis regenerated from that corrected order. No entry content changed, only position.Boundary declaration
Generated and release surfaces
SKILL.mdfiles are in parity.changelog.d/fragment is present for a user-visible change; generatedCHANGELOG.mdchanges only in a release/bootstrap PR. (This PR is the exception: the fix itself is aCHANGELOG.mdordering change, so regenerating it here is the point of the PR, not incidental drift.)Verification
python3 scripts/build_skills.py --checkpython3 scripts/build_marketplace.py --checkpython3 scripts/build-changelog.py --checkpython3 -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.pypython3 scripts/secret_scan.pypython3 scripts/check-public-export-safety.py --active-tree --history(--active-treealone: SAFE.--historyfails on pre-existing legacy blobs unrelated to this diff — verified identical failure onorigin/mainHEAD with no local changes; tracked separately, not introduced or touched by this PR.)git diff --checkReview and post-condition
Tier 2 (user-visible build-tooling behavior + tests). Independent cross-family review could not be completed synchronously:
migration-doctorreportsPROVIDER ROUTING: BLOCKED/BROKER RUNTIME: unavailablein this session, so no live Gemini/Codex/Grok route is reachable. Post-condition:build-changelog.py --checkpasses against the regeneratedCHANGELOG.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