Repository navigation
redirects: remove 358 exact duplicate rules - #1966
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
marcleblanc2
enabled auto-merge (squash)
September 16, 2026 00:51
pjlast
approved these changes
Sep 16, 2026
marcleblanc2
force-pushed
the
marc/redirects/remove-exact-duplicates
branch
from
September 17, 2026 00:39
3440139 to
1efe118
Compare
Contributor
The middleware picks the first rule whose source matches, so a rule with the same source and destination as an earlier one can never fire. Most were added by 5e64db1 (Batch Changes Revamp), which appended a near-full copy of the list. Removes only rules identical to an earlier rule (source, destination, flags); the ordered list of distinct rules is unchanged (966 before and after). Duplicates whose destination differs from the earlier rule are left alone. Amp-Thread-ID: https://ampcode.com/threads/T-01a0a75d-51fc-74d7-a322-bd60e7891852 Co-authored-by: Amp <amp@ampcode.com>
marcleblanc2
force-pushed
the
marc/redirects/remove-exact-duplicates
branch
from
September 17, 2026 00:45
1efe118 to
7e87e1e
Compare
This was referenced Sep 25, 2026
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.
Site middleware uses the first matching redirect rule it finds
This PR removes 358 rules from
src/data/redirects.tswhich are exact duplicates (same source, destination and flags) of a rule higher up in the fileRules with the same source but a different destination are left untouched; those need a human decision.
Most duplicates came from 5e64db1 (Batch Changes Revamp), which appended a near-full copy of the list.
Section comments left with no rules under them were removed too.
Verified by parsing the file before and after: the ordered list of distinct (source, destination, flags) rules is identical (966 rules)
git diff --diff-algorithm=patienceshows deletions only (1,637 lines)npx tsc --noEmitreports the same 29 pre-existing errors asmain, none in this file