Skip to content

Validate llms.txt links and update verifier - #3049

Merged
shahbaz17 merged 1 commit into
mainfrom
fix-fern-listing
Sep 3, 2026
Merged

Validate llms.txt links and update verifier#3049
shahbaz17 merged 1 commit into
mainfrom
fix-fern-listing

Conversation

@shahbaz17

@shahbaz17 shahbaz17 commented Sep 3, 2026

Copy link
Copy Markdown
Member

Description

Add runtime validation that the root static/llms.txt only links to files present in the build. Introduced validateRootLlmsLinks() and call it at the end of postProcessLlmsOutput; the build now errors when static/llms.txt contains same-origin links to missing files (downgrades to a warning when sitemap.xml is absent). Copy static/llms.txt into the test outDir earlier in scripts/verify-llms-output.js so local verification exercises the same ordering as a real Docusaurus build. Clarify options.js docs to remind maintainers to update static/llms.txt alongside option changes, and update static/llms.txt content (Infura link and section edits).

Issue(s) fixed

Fixes #

Preview

Checklist

  • If this PR updates or adds documentation content that changes or adds technical meaning, it has received an approval from an engineer or DevRel from the relevant team.
  • If this PR updates or adds documentation content, it has received an approval from a technical writer.

External contributor checklist

  • I've read the contribution guidelines.
  • I've created a new issue (or assigned myself to an existing issue) describing what this PR addresses.

Note

Low Risk
Changes affect docs build/LLM artifact validation and curated index content, not runtime app auth or user data.

Overview
Adds build-time validation so hand-curated static/llms.txt cannot keep linking to generated llms*.txt files that no longer exist (the failure mode called out after Services/dashboard outputs were removed).

validateRootLlmsLinks() runs at the end of postProcessLlmsOutput, after Vercel preview host rewrites, and checks every same-origin markdown link in build/llms.txt resolves to a file under outDir. Full Docusaurus builds fail on broken links; when sitemap.xml is missing (typical for scripts/verify-llms-output.js), the same issues are warnings so local verification does not fail on absent llms-all-*.txt indexes.

The verify script now copies static/llms.txt into the test outDir before post-processing, matching production ordering (static copy before postBuild).

options.js documents that static/llms.txt must stay in sync with customLLMFiles and ALL_PAGES_BUCKETS. static/llms.txt drops stale Services/dashboard links and points Infura APIs/dashboard docs at docs.infura.io/llms.txt instead.

Reviewed by Cursor Bugbot for commit 3adb981. Bugbot is set up for automated code reviews on this repo. Configure here.

Add runtime validation that the root static/llms.txt only links to files present in the build. Introduced validateRootLlmsLinks() and call it at the end of postProcessLlmsOutput; the build now errors when static/llms.txt contains same-origin links to missing files (downgrades to a warning when sitemap.xml is absent). Copy static/llms.txt into the test outDir earlier in scripts/verify-llms-output.js so local verification exercises the same ordering as a real Docusaurus build. Clarify options.js docs to remind maintainers to update static/llms.txt alongside option changes, and update static/llms.txt content (Infura link and section edits). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@shahbaz17
shahbaz17 requested review from a team as code owners September 3, 2026 12:51
@vercel

vercel Bot commented Sep 3, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
metamask-docs Ready Ready Preview Sep 3, 2026 12:53pm UTC

Request Review

@shahbaz17
shahbaz17 merged commit 7fb9ee8 into main Sep 3, 2026
19 checks passed
@shahbaz17
shahbaz17 deleted the fix-fern-listing branch September 3, 2026 13:04
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.

2 participants