fix(docs): keep only the latest patch per minor in the version selector and choose the default by semver#286
Merged
Merged
Conversation
…or and choose the default by semver
Vulthil
marked this pull request as ready for review
July 4, 2026 11:38
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.
Summary
eng/update_versions.pyregisters a stable version slug, it now prunes every other stable entry sharing the same (major, minor) line fromversions.jsonand deletes that entry's directory under--root.mainand prerelease slugs are never pruned and never trigger pruning, and pruning never crosses minor lines (registering1.0.3does not touch1.1.x).--make-defaultdirectly. It is now always recomputed as the highest stable version present after pruning, falling back tomainwhen no stable version exists.--make-defaultis still accepted (docs.yml passes it on every call) but is now advisory only, so a servicing release on an older minor line can no longer steal the site default away from a newer minor.Behavior change to be aware of
Superseded patch docs directories are deleted from gh-pages when a newer patch in the same minor line is registered. Any deep link into a pruned patch's docs (e.g.
/1.0.1/...after1.0.2ships) will 404. This is intentional — patch docs are strictly superseded — but is a visible change from today's behavior, where old patch directories accumulated forever.Verification
No test harness exists for
eng/, so this was verified by running the script against a scratch gh-pages tree for the scenarios called out in the acceptance criteria:a)
{main, 1.0.0, 1.0.1, default=1.0.1}+ register1.0.2b)
{main, 1.0.2, 1.1.0, default=1.1.0}+ register1.0.3 --make-default truec) register
maind) register
1.2.0-previewBackport to v1.0: yes -- #287