Skip to content

fix(routes): make docs root canonical - #97

Merged
nibzard merged 1 commit into
mainfrom
agent/canonical-docs-root
Jul 30, 2026
Merged

fix(routes): make docs root canonical#97
nibzard merged 1 commit into
mainfrom
agent/canonical-docs-root

Conversation

@nibzard

@nibzard nibzard commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

What changed

  • render the existing docs homepage directly at /
  • permanently redirect only the legacy exact /overview path to /
  • keep the /overview/* documentation namespace unchanged
  • make / invariant HTML for browsers, crawlers, user-directed agents, and Markdown Accept requests
  • retain explicit agent endpoints and Markdown negotiation on ordinary documentation pages
  • update canonical metadata, navigation and sidebar state, sitemap output, and the remaining exact /overview internal link
  • expand middleware and end-to-end regression coverage for the new contract

Why

The docs root was a routing shim: middleware either rewrote / to /AGENTS.md or redirected it to /overview. That made the natural homepage URL behave differently by request class and treated a non-equivalent agent guide as the Markdown representation of the homepage.

Making / the real homepage gives every client one canonical, indexable HTML entry point. The permanent exact-path redirect preserves existing /overview links without disturbing the established nested documentation URLs.

Impact

  • https://docs.steel.dev/ becomes the canonical homepage and appears once in the sitemap.
  • Existing links to https://docs.steel.dev/overview continue to work through a 308 redirect.
  • URLs below /overview/ do not move.
  • /AGENTS.md, /llms.txt, explicit .md URLs, and regular docs negotiation keep their existing behavior.

Validation

  • bun run check --error-on-warnings
  • bun run typecheck
  • bun run validate-links
  • bun run build
  • bun test tests/markdown-negotiation.test.ts tests/middleware.test.ts
  • bun test tests/e2e/llm-endpoints.test.ts — 19 passed
  • git diff --check
  • Full bun test: 288 passed; one unrelated image-generation integration test hit the global 120-second timeout. The exact timed-out test passed immediately on isolated retry in 485 ms.

@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview Jul 30, 2026 4:51pm

Request Review

@nibzard
nibzard marked this pull request as ready for review July 30, 2026 16:59
@nibzard
nibzard merged commit a26d992 into main Jul 30, 2026
2 of 3 checks passed
@nibzard
nibzard deleted the agent/canonical-docs-root branch July 30, 2026 16:59
nibzard added a commit that referenced this pull request Jul 31, 2026
…103)

The `.md suffix end-to-end` suite boots `next dev --turbopack` via `bunx`
and tears it down with `server.kill(); await server.exited`. `kill()` only
SIGTERMs the direct bunx child; the next-server/Turbopack grandchildren
survive, so `.exited` never resolves and afterAll blocks until Bun's
setDefaultTimeout(120000) -- failing the file and turning CI red on every
run since PR #97 (the fragility was latent since the teardown landed in
PR #81). PR #102 (timeout-minutes: 30) does not help: that bounds the
GitHub job timeout, but the job finishes in ~3-6 min and the 120s is
Bun's per-hook timeout, a different layer.

Spawn the dev server detached so it leads its own process group, then tear
the whole group down: SIGTERM, race `.exited` against a 3s budget, escalate
to SIGKILL if it hasn't exited. The awaited exit is now bounded, so teardown
can no longer hang regardless of how the child handles SIGTERM -- and the
full tree is reaped, keeping the port/CPU free for the later Chromium tests.

Validated: bun run typecheck, biome check, and
bun test tests/e2e/llm-endpoints.test.ts (22 pass).

Co-authored-by: Claude <noreply@anthropic.com>
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