feat(altdoc-multiversion-docs): pattern-and-template legacy-paths for shape-changing migrations (closes #851) - #856
Draft
dem-extra1 wants to merge 1 commit into
Draft
Conversation
Collaborator
Author
|
Driving this PR to clean --- please hold off until I am done (issue #851). Posted by Claude Code (AI agent) --- not written by a human. |
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 #851
What
legacy-pathsgains a pattern-and-template form, within the same input:reference/index.html=latest-tag/reference.html-- an exact, whole-path key.reference/*=latest-tag/man/*-- a prefix glob whose*receives the remainder.main=devkeeps meaning exactly what it means today (a prefix rename).An exact key is tried before any prefix, and the longest prefix wins among prefixes.
Keys that could never fire (a
*anywhere but at the end, a*in the value with none in the key, a bare*) now fail the build inparse_legacy_paths(), closing the silent-inert case the issue reports for multi-segment keys.A target that would itself match another entry is rejected too, so the loop guard is stated for the pattern form.
Coverage
run-redirect-js-tests.mjs: the emitted matcher executed against the serocalculator table from the issue plus the paths that must not redirect._selftest.ymlaltdoc-docs: the composite call'slegacy-pathsextended with the glob and exact mappings, and the 404 page asserted.🤖 Generated with Claude Code