fix(docs): keep every snippet alone on its line so seven pages stop returning 500 - #2390
Merged
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Seven live docs pages return HTTP 500.
/switchingwas the one reported; probing all 115 nav entries found the rest.Cause
A snippet is block content. Mintlify renders it as a block, and any prose sharing its line returns 500 in production while
mint validateand the Mintlify deploy both report success.The correlation is exact across the corpus. Every one of the 24 pages that imports a snippet and renders puts the call alone on its line. Every one of the 7 that returned 500 did not:
switching,faqfeatures/change-tracking,external-api/mcp-promptsfeatures/table-structureexternal-api/mcp-resourcesfeatures/pluginsThe snippet file itself is never the problem:
driver-counts.mdxhas three pages that render and three that did not, with a byte-identical<DriverCounts />call in all six. Props are not the problem either:registry-plugin.mdxtakes two props and its 17 pages all render.Why the existing guard was green
docs/scripts/check-links.pyalready has acheck_snippetscheck, added by #2375, and CI already runs it. It was built on a premise stated in its own docstring:That premise is false. #2375 fixed
features/table-structure.mdxby replacing;with a new sentence starting with a markdown link, and the page kept returning 500 for the next day. The check only matched aCONTINUESpattern (a leading comma, semicolon, colon, paren, or one of seven conjunctions), so six of these seven pages passed it, and it never looked at text before the snippet at all, which is whatfeatures/pluginshad.What changed
The seven pages put their snippet on its own line.
check_snippetsnow rejects any prose on the line, before or after, and names which side. The docstring carries the evidence rather than the premise:Verification
docs/scripts/check-links.pyok 115 navigation entries, 115 pages, every link resolvesdocs/scripts/check-writing-style.shdocs/ matches the house styledocs/scripts/check-docs-against-source.pydocs/ agrees with the sourceThe 500s are served from a build of
main, so they clear when this merges and the docs site redeploys. Worth re-probing the seven URLs afterwards.