Specify the API version stamps' phase 2 - #331
Merged
Merged
Conversation
The versionadded gate's phase-1 rule — every published object cites the target — turns main red at the first merge-back of any tag, a release candidate included: measured in a throwaway clone, main derives 0.2.0.dev after merging v0.1.x back and three tests in tests/test_api_docstrings.py fail over 94 correct stamps. stamps spec records the whole rule and phase 2: a committed snapshot of the published API, written at the release freeze, keeps released objects on their recorded version while new objects cite the target; removals are ignored until the next freeze; and the merge-back goes through a versionless branch, the one route by which a new object on main can be re-stamped without turning main red. The measured version tables are recorded, including why a versioned branch name disagrees with pull-request CI. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01C79QePZ862i61EJodupwVT
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01C79QePZ862i61EJodupwVT
Documentation build overview
13 files changed ·
|
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.
Specifies phase 2 of #227's API version stamps as a new living specification,
stamps spec(docs/src/developer/specs/2026-09-15-api-stamps-design.md), and adds it to the specifications index. Specification only — the plan and the build follow as their own pull requests, and the build closes #227. It must merge before the v0.1.0 release candidate: without it the rehearsal's merge-back turnsmainred.Why now
The gate's phase-1 rule — every published object cites the target, the base version the next tag will carry — is exact only while nothing has been released. Measured in a throwaway clone of
mainat1ffb603, it stops being right at the first merge-back of any tag, a release candidate included, not at the release itself:setuptools_scmtests/test_api_docstrings.pymain, no tag0.1.0.dev2230.1.0v0.1.0rc1onv0.1.x0.1.0rc10.1.0mainafter mergingv0.1.xback0.2.0.dev20.2.0The failures are the hard-coded
"0.1.0"in the version test, all 94 stamps ("cites 0.1.0, expected 0.2.0"), andmain()returning 1 — over stamps that are all correct. The release runbook's Two gates will move at the first tag note had the timing wrong.The design
.github/api-surface.txt, written at the release freeze (runbook step 4) bycheck_api_docstrings.py --write-snapshot, which refuses to write unless every object passes and a target can be derived. An object it records keeps its recorded version; an object it does not record cites the target. The snapshot half needs no derived version, so it keeps working in shallow clones.merge-back(runbook step 10). An object merged intomainafter the release branch is cut must cite0.1.0before the merge-back and0.2.0after, and the target moves in the merge commit — a pull request fromvA.B.xcannot contain the re-stamp, andmain's protection requires the checks to pass.Two things designing it got wrong first, both measured before this was written
semver-pep440-release-branchreads any branch name containing a version as a release branch. Measured:merge-back-v0.1.xandmerge-back/0.1derive0.1.0rc2.dev2locally while pull-request CI derives0.2.0.dev2— a correct re-stamp would fail locally and pass in CI.merge-backandmerge-back-releasederive0.2.0.dev2, agreeing with CI. §3.4 records the table, and a trap for whoever re-measures: tagging and merging with no commit on the release branch makes no merge commit and passes for the wrong reason.Verification
On
427e8e4: every hook passes on the two changed files;tests/test_citations.py,tests/test_github_references.py,tests/test_docs_readingtime.pyandtests/test_docs_landing_pages.py— 283 passed; a fail-on-warning docs build with no warnings, andcheck_rendered_citations.pyandcheck_documentation_links.pyboth pass.🤖 Generated with Claude Code
https://claude.ai/code/session_01C79QePZ862i61EJodupwVT