ci: redirect check accepts deletions whose route is still served - #825
Merged
Conversation
check-deleted-pages demanded a redirect for every deleted .mdx, even when the URL keeps resolving (deleting foo.mdx while foo/index.mdx exists). Such deletions are dedupes, not dead routes; skip them with a note instead of failing Signed-off-by: khushalsonawat <khushalsonawat@gmail.com>
atharva-bhange
approved these changes
Aug 18, 2026
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.
What
Teaches
scripts/check-deleted-pages.mjsto skip a deleted page when its URL is still served by another page file (.mdx/.astro/.md sibling or index variant). Genuinely dead routes still require a redirect and still fail the check.Why
#822 correctly deletes
admin-settings.mdxto resolve a duplicate-route collision:admin-settings/index.mdxkeeps serving/docs/admin-settings, so no redirect is possible or needed. The check failed it anyway, and would fail every future dedupe deletion the same way.What cases were covered
admin-settings.mdx): script passes with "still served by another page file, no redirect needed" and exit 0How
One
routeStillServed()helper checking the six page-file variants that could own the URL, consulted before the redirect lookup.Recording
Not applicable: CI-only change. Proof is #822 going green after Update branch once this merges.
🤖 Generated with Claude Code