Skip to content

fix(llms): add recovery links to markdown 404s - #123

Open
nibzard wants to merge 1 commit into
mainfrom
plan/agent-readiness-audit
Open

fix(llms): add recovery links to markdown 404s#123
nibzard wants to merge 1 commit into
mainfrom
plan/agent-readiness-audit

Conversation

@nibzard

@nibzard nibzard commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • return a short recovery Markdown body for missing agent-readable documentation
  • preserve the real 404 status, noindex, Markdown content type, and existing Vary policy
  • use the same generic response for llm: false pages without disclosing excluded content
  • leave the branded browser HTML 404 unchanged

Why

Missing Markdown pages previously returned a real 404 with an empty body. Agents now receive links to the docs home, llms.txt, sitemap, and API catalog so they can recover from stale or mistyped URLs.

Impacted paths

  • app/llms.mdx/[[...slug]]/route.ts
  • tests/e2e/llm-endpoints.test.ts
  • plans/009-make-markdown-404s-agent-recoverable.md
  • plans/README.md

Verification

  • bun test tests/e2e/llm-endpoints.test.ts: 26 passed
  • bun run test: 335 passed
  • bun run typecheck: passed
  • bun run check: passed
  • bun run validate-links: passed
  • bun run build: passed, 571 static pages generated
  • git diff --check: passed
  • authenticated Vercel preview probes passed explicit Markdown, negotiated Markdown, HTML 404, and HEAD behavior

No visual design changed, so screenshots are not applicable.

@vercel

vercel Bot commented Aug 24, 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 Aug 24, 2026 11:20am

Request Review

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