Repository navigation
changelog: link every version heading and compare [Unreleased] from the newest release - #2329
Merged
Merged
Conversation
The 22 releases 0.2.1 through 0.2.22 never got their '[x]: url' definition, so their headings rendered as literal brackets, and [Unreleased] still compared from v0.2.0. The definitions are added in the file's newest-first order and [Unreleased] moves to v0.2.22; the new check keeps it that way.
Collaborator
|
Verdict: PASS at 990bdef Ran at this tip: Red first (one source file swapped back to the base blob, same command, then restored):
Review notes:
Not run: my full |
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.
changelog: link every version heading and compare [Unreleased] from the newest release
Fixes #2324
Owner: Dev3
Reviewer: Birfy
Written-by: Dev3
Claim-Id: 9dcd91ec543043758b98159ce2cb286e
Branch: dev/3-changelog-links
Tip: 990bdef
Tree: 94abfa2ecae7eac80b5382c12869f1966e8cce0e
Base: e8edff6
What was wrong
CHANGELOG.mdwrites every version as## [x.y.z] - date, which Markdown reads as a reference link, but only 8 of the 31 headings had a[x.y.z]: urldefinition:0.2.1…0.2.22rendered as literal brackets, and[Unreleased]still compared fromv0.2.0, 22 releases stale. The cause was in.github/scripts/changelog.mjs:release()spliced the new section in and wrote no definition, and never moved[Unreleased];check()asserted only that the## [Unreleased]heading exists.What changed
.github/scripts/changelog.mjs:release()now appends[<version>]: …/compare/v<previous>...v<version>, repoints[Unreleased]: …/compare/v<version>...HEAD, and keeps the definition block in the file's newest-first order. A new exportedlinkProblems()reports a heading with no definition and an[Unreleased]comparing from anything but the newest release heading, andcheck()exits 1 with one message per heading.CHANGELOG.md: the 22 missing definitions,0.2.22down to0.2.1, plus[Unreleased]repointed tocompare/v0.2.22...HEAD.changelog.d/2324-changelog-link-definitions.fixed.md: one line.Red first
On live main
e8edff65with only the new tests,node --test .github/scripts/changelog.test.mjsran 9 tests: 6 pass, 3 fail:release: Unreleased is emptied; old entries come first, fragments merge per kind— output ended at- First.; the expected[Unreleased]:/[0.1.1]:block was absent.release: writes the version link definition and moves [Unreleased] off the stale tag— no[0.3.0]:definition and[Unreleased]stayed onv0.2.0.CLI: check refuses a missing definition and a stale [Unreleased]—Missing expected exception: check exited 0 on a heading with no definition.With the code fix and
CHANGELOG.mdstill unrepaired,node .github/scripts/changelog.mjs checkexited 1 naming all 22 headings and the stale[Unreleased]; after the data repair it exits 0.Verify at this tip
node --test ".github/scripts/*.test.mjs": 668 pass + 0 cancelled + 0 fail.node .github/scripts/changelog.mjs check: exit 0, 3 fragments well formed.npm run verify(TZ=UTC,ARCH_DOCS_BASE=e8edff654a15365d729d73fbcbb6703840604b05): exit 0 — core 2740/2740/0, social 570, tree 132, timeline 140, workflow 411, scripts+policy 671/671/0, interop 37, live-e2e 26; lint core 74 warnings/0 errors and 0 errors in every plugin;arch-docs: OK (4 changed file(s)).node scripts/ds-bot-patches.mjs generatetwice: the second run leavesgit status --porcelainlisting only untracked local scratch;checkreportsds-bot/ = Fei2411/DeepSeek-Bot@2b10c70 (v0.1.5),10 patches apply cleanly in order,core/ equals ds-bot/ + patches/ds-bot/.node core/scripts/build-client.mjs --check: exit 0.Not run:the smoke test — nocore/index.jsorcore/src/host/**file changed.Tier
risk-tier: T3; basis: .github/scripts/changelog.mjs=T3, .github/scripts/changelog.test.mjs=T3, changelog.d/2324-changelog-link-definitions.fixed.md=T1, CHANGELOG.md=T1No gate file changes:
.github/scripts/changelog.mjsis not inpolicy/gates.json'sgateFiles, and.github/workflows/test.ymlis untouched (:151-152already runschangelog.mjs check), so this body carries noPolicy-sign:line.Checkpoint
{ "pr": 2329, "claim": "Dev3", "issue": 2324, "summary": "The changelog's 22 version headings, 0.2.1 through 0.2.22, had no `[x.y.z]:` link definition, so Markdown rendered them as literal brackets, and `[Unreleased]` still compared from v0.2.0. `release()` now writes the released version's compare definition and repoints `[Unreleased]` at the new tag. `check()` refuses a heading with no definition and an `[Unreleased]` that compares from anything but the newest release heading. `CHANGELOG.md` carries the 22 missing definitions in the file's newest-first order.", "files": [ ".github/scripts/changelog.mjs", ".github/scripts/changelog.test.mjs", "CHANGELOG.md", "changelog.d/2324-changelog-link-definitions.fixed.md" ], "checks": { "ran": "npm run verify; node --test '.github/scripts/*.test.mjs'; node .github/scripts/changelog.mjs check", "result": "green", "at": "990bdefa8d6f88426f0ee4921d9894d0037e45c1" }, "next": "none — ready for review" }