DES-16: redirect the 129 dead URLs left by the IA revamp [render preview] - #95
Merged
Conversation
Adds one exact rule per dead URL recovered from the Git history, deletes the SPA_FALLBACK list that made 81 of them return 200, and moves the resolver into resolve-redirect.js so server.mjs, the vocs dev middleware and CI all agree. Adds npm run check:redirects as a CI gate. /modules/offramp and /smart-wallet/offramp stay 404 by design.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The source list came from git log --all, which swept in pages that only ever existed on unmerged branches (smart-recipes-docs, omar/react-kit-docs, chain-abstracted-smart-account, zerodev-wallet and others). Those URLs were never deployed and never indexed, and the rules would have 301'd the real pages away had any of those branches merged. Rebuilt from --first-parent --full-history origin/main. Coverage is unchanged: 311 of 313 dead URLs have a rule, the 2 without are the offramp stubs that 404 by design.
Package-level comparison of each deleted page against its target found redirects that matched on topic word but sent readers to a different SDK. Corrects the worst: /modules/signin and /smart-wallet/signin pointed at /onboarding/auth-providers (third-party wallet services) when the old pages documented ZeroDev's own passkey, social and ECDSA validators. Pages built on @zerodev/waas now go to the current wallet SDK rather than the unmaintained hooks tree. The 20 /react/* rules still point there because those URLs were the waas docs and the content moved.
/smart-wallet/one-click-trading had moved from transaction-automation (in the sidebar) to 1-click-trading (orphaned), which would have dropped readers on a page with no navigation. Reverted. /sdk/permissions/getting-started now goes to permissions/session-keys, which matches the old session-key tutorial and is in the sidebar. check:redirects now fails on any target no sidebar links to. The React hooks tree (DES-21) and the api-and-toolings gaps are allowlisted so the existing backlog does not block the build.
Drop the workflow. Fail closed when the sidebar block will not parse, and flag pages a prefix rule shadows.
a-thomas-22
temporarily deployed
to
des-16-ship-redirects - docs-dynamic PR #95
September 1, 2026 15:03 — with
Render
Destroyed
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.
Fixes DES-16
Stacked on #94 (DES-15). Review that one first; this branch targets
des-15-blog-redirects.Problem
313 URLs were live on
mainin a past build and are dead today.redirects.config.jscovered none of them.81 returned 200, not 404, because of this line in
server.mjs:Any path under one of those prefixes got the app shell. The shell has no content for a dead path, so Google reads it as a soft 404 and drops the URL. That list arrived in
d358dc0as a verbatim copy of the old Render static-site rewrites, the same copy that carried the/blogrule #94 removes. Vocs prerenders every page to its ownindex.html, so the fallback was never needed here: 4 of the 5 prefixes have zero built pages, and for/sdkthe asset server answers first, so the fallback only ever masked a dead path.Fix
redirects.config.js, grouped by family. Each target was picked by comparing the deleted page against the live tree.SPA_FALLBACK,isSpaFallbackand theshellsirv instance deleted fromserver.mjs.resolve-redirect.jsadded: one resolver, imported byserver.mjs, the Vocs dev middleware and the new check. Before this the dev middleware had its own exact-match-only copy, so dev silently disagreed with production on trailing slashes and on/magic-account/*.npm run check:redirects, an audit script to run by hand. No CI job, on purpose: this is a reviewer's aid, not a gate. It reports a target with no page, a redirect chain, a duplicate source, a rule (exact or prefix) that shadows a page that still exists, and a target no sidebar links to. It also fails if it cannot parse the sidebar block, so a rename invocs.config.tsxcannot turn the reachability check into a silent pass.redirects.config.js:133corrected (it claimedrender.yamlhandled/magic-account/*subpaths; nothing did).Note for reviewers: 96 rules were removed before this was ready
The first pass of this branch shipped 225 rules. An audit found that 96 of them pointed at URLs that were never deployed.
The source list had been built with
git log --all, which reads every ref in the repo. That swept in pages living only on unmerged branches:chain-abstracted-smart-account(39),smart-recipes-docs(13),zerodev-wallet(9),omar/react-kit-docs(6),wallet-docs-refresh(4),capabilities-rewrite(4) and others. Onlymaindeploys, so none of those URLs were ever reachable or indexed.Keeping them would have been worse than useless.
smart-recipes-docsholds 13 finished pages and is a merge candidate; had it merged, every one of those pages would have been 301'd away on its first day.Rebuilt with
git log --first-parent --full-history origin/main. Two independent methods agreed on the count, and a control path known to have been live returns a hit, so the query is not silently matching nothing.Coverage did not change. 311 of the 313 URLs that genuinely died on
mainhave a rule. The 2 without are the offramp stubs below.Deliberate omissions
/modules/offrampand/smart-wallet/offrampget no rule and return 404. Both were one-line# Offrampstubs for their entire life, with no successor page (DES-12)./blogitself stays unmapped, per DES-15: redirect blog posts to their marketing-site URLs [render preview] #94./resources/*rules and/advanced/go-sdkalso point at never-deployed URLs, but they predate this branch and a comment in the file says they were added deliberately in case an old link escaped. Left alone./magic-accountprefix rule stays as a catch-all. All 19 known subpaths now have exact rules.Verification
Against a local
npm run build+npm start:Ground truth, recomputed from
mainalone after the strip:npm run check:redirects:353 redirects ok, 249 routes.Relevance audit, and why 15 targets changed
Every rule was scored by comparing the recovered old page against its target: 316 good, 23 acceptable, 14 poor, mean content similarity 81%, mean relevance 9.1/10.
Scoring on prose alone proved unreliable, so a second pass compared imported packages and API symbols instead. That caught redirects matching on topic word while sending the reader to a different SDK. 106 rules failed the package test, 69 of which the prose pass had called good.
The two worst were plainly wrong:
/modules/signinand/smart-wallet/signinpointed at/onboarding/auth-providers, which documents third-party wallet services (Privy, Dynamic, Portal), when the old pages documented ZeroDev's owncreatePasskeyValidator,createSocialValidatorandcreateEcdsaValidator. Both now go to/onboarding/create-a-smart-account.@zerodev/waasis unmaintained, so pages that merely used it now point at the current wallet SDK rather than the legacy hooks tree. The 20/react/*rules still point there, because those URLs were the waas docs and the content genuinely moved. That tree's future is DES-21.Sidebar reachability
A redirect that lands on a page no sidebar links to leaves the reader with no navigation. Auditing this found one regression introduced earlier in this branch:
/smart-wallet/one-click-tradinghad moved fromtransaction-automation(in the sidebar) to1-click-trading(orphaned). Reverted.check:redirectsnow reports any orphan target. Three areas are allowlisted so the existing backlog does not drown the output: the React hooks tree (DES-21), the/api-and-toolings/gap (21 rules land on real pages that no sidebar lists), and1-click-trading. No sidebar entries were added in this PR.Note on the preview
Vercel serves
docs/diststatically and never runsnpm start, so none of these redirects apply on the preview URL. Production is the Render web service, where they do. Verify after merge againsthttps://docs.zerodev.app.