Leave what a release moves out of the container census - #325
Merged
Merged
Conversation
Assembling the changelog deletes every fragment and writes its text into CHANGELOG.rst. The census is keyed by file, so four rows moved at once on the commit that gets tagged: CHANGELOG.rst gained four citations on spec-3-2 and three fragments lost theirs. Recording the new counts would be a step at every release, and there is no judgement to make about a record of what a pull request did. The census now skips CHANGELOG.rst and every file towncrier would consume, recognised by its own rule rather than by directory, so the hand-written README.md and template stay counted. The corpus is unchanged: every citation in both still has to resolve. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01C79QePZ862i61EJodupwVT
Documentation build overview
13 files changed ·
|
anchor spec §7's census item is now Refined, with the reason: assembly moves every citation to a new key at each release, and a changelog entry leaves nothing to judge. Its two pull references were written as reStructuredText roles, which a MyST page renders as literal text; they are MyST roles now. whatsnew spec §5 recorded the defect, and now records it resolved. floors spec §3.3 quotes how many tests guard on a repository. The new census test is one more, so Forty is now Forty-one. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01C79QePZ862i61EJodupwVT
This branch was successfully deployed
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.
Closes #318.
What was wrong
Runbook step 3,
pixi run changelog --version X.Y.Z, left the suite red. The container census recorded by #297 is keyed by file, and assembly deletes every fragment and writes its text intoCHANGELOG.rst— so the citations are conserved and every key they sat under changes, on the commit that gets tagged:Re-measuring the issue body
Found by assembling
--version 0.1.0on a throwaway worktree of9c694b5, not by reading:CHANGELOG.rst— would have left the three fragment rows failing.It is also step 3 now, not step 2: What's New inserted one ahead of it.
The fix
The census leaves out what a release moves:
CHANGELOG.rstand every fragment. A fragment is recognised by towncrier's own rule — a configured type among the parts of its name after the first, asparse_newfragment_basenamereads it — rather than by directory, sochangelog/README.mdandtemplate.rst, which are hand-written and untouched by a release, stay counted. Measured rather than assumed: onmainthe predicate selects exactly the 176 files towncrier touched in the assembly, 175 deletions and one write.The corpus is unchanged. Resolution, keying and separation (docs spec §3.6) still cover both — the published changelog renders these citations as links, and all of them pass on the assembled file.
What is given up is the census noticing a new fragment that cites a container. It has done that once, for the two in #300, and both were upheld.
The record loses three rows, four citations on
spec-3-2, leaving 11, with a dated note.anchor spec §7's census item is tagged Refined with the reason, andwhatsnew spec §5, which recorded the defect, records it resolved.The new test
test_the_census_leaves_out_what_a_release_movesfails onmainfor exactly the three fragment rows. Its guard against passing vacuously — that something a release moves does cite a container — holds on both sides of a release: the fragments carry those citations before it andCHANGELOG.rstafter. With the fix applied to the assembled tree, it and the census both pass there.Two more edits it needed
floors spec §3.3says Forty-one, not Forty. It quotes how many tests stand down without a repository, and the new test is one of them —test_the_specification_quotes_the_number_of_repository_guarded_testscaught it.anchor spec §7's two references to Keep a census of the citations that name a subdivided section #297 were:pull:roles, which a MyST page renders as literal text rather than a link. They are{pull}now, confirmed as links in the built page. Two more specifications carry the same defect —tephpy-design.mdandplotting-tour-design.md, one each, both confirmed literal in the build — and are not touched here:check_github_references.pypasses an rst role in a MyST file, so that is A reStructuredText role in a MyST page renders as plain text, and the reference gate passes it #326 rather than a hand-fix here.Filed along the way
#324 — released changelog entries stay under resolution, and nothing says whether a citation in released history may be edited when a section it names is removed or renumbered. Pre-existing, and not this change's to settle.
Verification
On
28e99ad:pytest --mpl2289 passed, 6 skipped; a clean fail-on-warning docs build and all five docs gates pass; every hook passes on the changed files. CI is green.🤖 Generated with Claude Code
https://claude.ai/code/session_01C79QePZ862i61EJodupwVT