chore: add script to report broken llms.txt links from docs.mapbox.com - #39
Open
mattpodwysocki wants to merge 3 commits into
Open
chore: add script to report broken llms.txt links from docs.mapbox.com#39mattpodwysocki wants to merge 3 commits into
mattpodwysocki wants to merge 3 commits into
Conversation
Discovers every llms.txt exposed via the root index, checks each for 2xx, and flags when docsSearchIndex.ts's curated list has drifted from the live root index (e.g. studio-manual/llms.txt vs console-tools/llms.txt). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Weekly 404 reports only surface broken sub-links customers already hit through the MCP server, not ones nobody's found yet. --deep extracts every docs.mapbox.com link referenced inside each llms.txt (~1,400 URLs today) and checks it with bounded concurrency, so we can catch a broken doc page before a customer does. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scripts/check-llms-links.cjs(npm run check-llms-links) which fetches the rootdocs.mapbox.com/llms.txtindex, discovers every productllms.txtit links to, and checks each URL for a 2xx statussrc/utils/docsSearchIndex.tsand flags any entries that have drifted from the live root index (currently:studio-manual/llms.txtvs the root'sconsole-tools/llms.txt)npm run check-llms-links:deep(--deepflag): additionally extracts everydocs.mapbox.comsub-link referenced inside eachllms.txt(~1,400 URLs today) and checks those too, with bounded concurrency (10 in flight). Our weekly 404 report only surfaces broken sub-links customers have already hit through the MCP server — this proactively catches broken doc pages nobody's found yet.Test plan
npm run check-llms-links— ran locally, all 25 discoveredllms.txtURLs return 200npm run check-llms-links:deep— ran locally, discovered 1,388 unique sub-links, all return 200npm test— 83 tests passingnpm run lintandnpm run format— passing🤖 Generated with Claude Code