Skip to content

docs: own the legacy content redirects on 2.38 - #32639

Merged
nickvigilante merged 1 commit into
release/2.38from
docs/redirects-backport-2.38
Nov 23, 2026
Merged

nickvigilante merged 1 commit into
release/2.38from
docs/redirects-backport-2.38

Conversation

@nickvigilante

Copy link
Copy Markdown
Collaborator

Moves the unversioned docs content redirects that coder.com and the docs router (coder/docs-engine) hold for 2.38 into this branch's docs/redirects.json, so the version owns them.
This lets those repos drop their copies later.

  • 310 rules, built from coder.com's redirects.json and the router's static redirects.json.
    URL-scheme rules (coder-oss, coder, v1, v2, code-server) and tagged-release patterns stay in the router.
  • Destinations are 2.38's own pages, so they differ from main's file where the docs tree has since moved.
  • about/architecture goes to /.
    The retired security advisory goes to GitHub Security Advisories, because its old blob URL returns 404.
    contributing/* becomes nine exact rules, because about/contributing has no pages.
    The ai-bridge and agent-boundaries exact rules sit above their wildcards.

Validation

Main's docsredirectscheck (-base origin/release/2.38 -branch release/2.38) against this branch's manifest: 310 rules OK, 464 routes still resolve.
This branch has no docsredirectscheck, so CI does not lint the file. Backporting the checker is out of scope.

Do not remove the matching rules from coder.com or the router until this is merged and 2.38 is republished.

Plan and decision log

Ownership rules agreed for redirects:

  1. /docs to /docs within one version (a wildcard or branch slug such as @main next): the version's docs/redirects.json in coder/coder.
  2. /docs to /docs across versions: the router's redirects.json in coder/docs-engine.
  3. Non-/docs source to a /docs destination: coder.com and coder.com-new.
  4. /docs source to a non-/docs destination: the router's redirects.json.
  5. Unversioned /docs/x to /docs/y is mainline same-version content, so it belongs to the release branch that is mainline.

Findings behind this PR:

  • coder.com and the router held about 300 unversioned content rules, many with destinations from the old docs tree.
    The router README says static rules answer before a version's own rules on the mainline, so the stale copies win.
  • docs/redirects.json existed on main and release/2.39 only.
    2.39 is mainline until 2.40 ships, and 2.38 becomes the mainline after that.
  • Where destinations conflict, the current tree for that branch wins.

Sequence: backport files to 2.38 and 2.39 (this PR and its sibling), then delete duplicated rules from coder.com, then slim the router's static file to URL-scheme rules.

Note

Generated by Coder Agents on behalf of @nickvigilante.

Moves coder.com's and the docs router's unversioned content redirects into docs/redirects.json, so 2.38 serves them from its own branch.
@github-actions

Copy link
Copy Markdown
Contributor

👋 Hey @nickvigilante!

This PR is targeting the release/2.38 release branch, but its title does not start with fix: or fix(scope):.

Only bug fixes should be cherry-picked to release branches. If this is a bug fix, please update the PR title to match the conventional commit format:

fix: description of the bug fix
fix(scope): description of the bug fix

If this is not a bug fix, it likely should not target a release branch.

@Jesswinters Jesswinters left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No P0/P1, so I'm approving.

What I checked: I parsed the file with docs-engine's own parseVersionRedirectsFile (legacy forms on), which is what version-redirects.mjs runs at publish, and then resolved every rule with resolveVersionRedirect against this branch's docs/manifest.json. I checked for:

  • every exact source ending on a live page after following the chain, with no loops and no chains over 3 hops;
  • every wildcard destination prefix having pages;
  • no duplicate sources;
  • no source that is itself a live page, which would be a rule that never fires;
  • no exact rule shadowed by an earlier wildcard.

The result was 0 problems. The external destinations all pass the engine's allowlist, and all nine blob/main/... files exist on coder/coder main. 310 rules against 463 routes. I also ran main's docsredirectscheck with this file and 2.38's manifest: 310 rules OK.

P3 (non-blocking)

  • 2.39's file keeps four older rules that 2.38's file lacks: templates → admin/templates, templates/open-in-coder, templates/troubleshooting, and workspaces → user-guides/workspace-management. coder.com doesn't hold these either, so they aren't part of "moving" anything. However, all four destinations exist on 2.38 and the sources aren't pages there, so /docs/v2.38/templates 404s today while /docs/v2.39/templates redirects. Adding them would make the two lines match.
  • 2.38 uses the relative form and 2.39 uses /docs/..., because each branch's checker forces it. The engine normalizes both, so this is just a note.
  • CI: Analyze PR for Documentation Updates Needed fails in its setup step (CODER_URL/CODER_TOKEN check), which is infrastructure and has nothing to do with this file. Everything else is green.
  • The PR body says "Do not remove the matching rules … until this is merged and 2.38 is republished". That's the right order, because the router's static rules answer first on the mainline.

This review was generated by Coder Agents on behalf of @Jesswinters.

@nickvigilante
nickvigilante merged commit 04dff5b into release/2.38 Nov 23, 2026
54 of 56 checks passed
@nickvigilante
nickvigilante deleted the docs/redirects-backport-2.38 branch November 23, 2026 23:36
nickvigilante added a commit that referenced this pull request Nov 24, 2026
Adds four rules to 2.38's `docs/redirects.json` that 2.39's file already
has, so `/docs/v2.38/templates` and the other three stop returning 404
where `/docs/v2.39/...` redirects:

- `templates` to `admin/templates`
- `templates/open-in-coder` to `admin/templates/open-in-coder`
- `templates/troubleshooting` to `admin/templates/troubleshooting`
- `workspaces` to `user-guides/workspace-management`

All four destinations are pages on 2.38 and none of the sources are.
2.38 becomes the mainline after 2.40 ships.
`main` needs no change: these four are live pages there.

Follow-up to #32639, from Jess's review.

Checks: main's `docsredirectscheck` against this branch (`-base
origin/release/2.38 -branch release/2.38`): 314 rules OK, 767 routes
still resolve.
This branch has no checker, so CI does not lint the file.

> [!NOTE]
> Generated by Coder Agents on behalf of @nickvigilante.

This branch had an error being deployed

1 failed deployment
docs-preview — 1b8d31a9 Deployed Nov 23, 2026 by nickvigilante via cleanup #372
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants