Skip to content

Redirect retired pages' Markdown URLs and explain when variable changes apply - #90

Open
batuhan wants to merge 1 commit into
mainfrom
md-redirects-and-env-rollout
Open

batuhan wants to merge 1 commit into
mainfrom
md-redirects-and-env-rollout

Conversation

@batuhan

@batuhan batuhan commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Fixes two problems from Komunite's docs feedback.

.md URLs for retired pages returned 404

llms.txt tells agents to "append .md to any docs URL". Retired routes such as /docs/configuration, /docs/redirects, /docs/access-control and /docs/custom-domains only exist as Blume meta-refresh HTML stubs, and moved pages leave no file behind. Neither has a Markdown twin, so /docs/configuration.md returned 404 while /docs/configuration worked in a browser.

redirect-rules.mjs now emits a real 301 for every entry in redirects.ts and every authored rule, from <from>.md to <to>.md. A #fragment is dropped, and / maps to /index.md. Examples:

  • /docs/configuration.md → /docs/config-file.md
  • /docs/api/docs.md → /docs/api/reference.md
  • /docs/collab.md → /docs/index.md

verify:routes asserts that each of the 76 rules compiles to a 301 with the expected target and that the target is a built Markdown file. Before writing this, I checked that every target's .md returns 200 in production today.

Budget: the routing rule count goes from 1,857 to 1,933 (1,925 static, cap 2,000), which leaves 75 static rules of headroom.

Env var page: when a change applies

The callout said a write "applies at the next finalize, which the write itself queues". That reads as "republish". It now says:

  • a Space variable write queues a new version with the new values, so no republish is needed;
  • a team variable write queues nothing and reaches each Space at its next publish.

This matches the control plane. Space writes call createSpaceVariableRuntimeSync, which forces a settings version. Team writes go through applyVariableUpsert with no sync, and the setTeamVariable contract already says "applies when a version next finalizes". The lanes section also now states that plain variables reach both templates and server code, while secrets reach only server code; a template that references a secret is blocked with secret_variable_in_template.

Checks

  • bun run build and bun run verify:routes pass.
  • verify:public-safety and verify:prose (Vale 3.17.1) are clean.
  • test:docs: 27/28 pass. The one failure (openapi-prose-scope, "allows compatibility protocol terms only in compatibility API prose") also fails on main in this environment.

Companion monorepo PR: spacefast/monorepo#4637. It makes sf docs search every doc and points the catalog's links at live pages instead of these retired routes. After that CLI ships, the sf docs section in cli/agent-commands.mdx (the --full search example) needs a follow-up; it isn't in this PR because docs only describe shipped behavior.

View in Indent View in Slack
Tag @indent to continue the conversation here.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

…es apply

Retired routes live on only as HTML redirect stubs with no .md twin, so an
agent following the llms.txt advice to append .md got a 404. Each retired
route's .md URL now 301s to its replacement's .md, and verify:routes checks
every one lands on a built Markdown file.

The environment variables page now says a Space variable change needs no
republish, a team variable change waits for each Space's next publish, and
secrets reach server code but not templates.
@indent

indent Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Issues

No issues found.

CI Checks

All required CI checks passed on 43f3c81.

Review agents

Select any unchecked box below to run or rerun that agent.

Passed (1)
  • Indent Review Agent · No bugs found in the redirect or docs changes.
Full results

Indent Review Agent

  • Summary: No bugs found in the redirect or docs changes.
  • Last ran on commit: 43f3c819
  • Latest result
    {
      "summary": "No bugs found in the redirect or docs changes.",
      "findings": []
    }

@coderabbitai

coderabbitai Bot commented Oct 28, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 44 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 738b9eae-4354-401a-838c-0c0853ab3b45
Commits

Reviewing files that changed from the base of the PR and between 195f31c and 43f3c81.

Files selected for processing: 3
  • content/(dynamic)/environment-variables.mdx
  • scripts/redirect-rules.mjs
  • scripts/verify-routes.mjs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

This branch was successfully deployed

1 active deployment
preview/md-redirects-and-env-rollout — 43f3c819 Deployed Oct 28, 2026 by spacefast[bot]
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.

1 participant