Repository navigation
fix(docs): guard federated-content schema reads when artifact is absent - #48144
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
5 Skipped Deployments
|
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
awaseem
marked this pull request as ready for review
July 21, 2026 13:16
awaseem
approved these changes
Jul 21, 2026
Contributor
Braintrust eval report
|
awaseem
added a commit
that referenced
this pull request
Jul 21, 2026
… is absent" (#48159) Reverts #48144 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Documentation generation now surfaces missing or unreadable AI skills and Terraform schema data instead of silently producing empty sections. * This improves visibility into incomplete documentation builds and helps ensure generated reference content is available and accurate. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: Ali Waseem <[email protected]>
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.
Requested by Ivan Vasilov · Slack thread
I have read the CONTRIBUTING.md file.
YES
What kind of change does this PR introduce?
Bug fix.
What is the current behavior?
Running
pnpm --filter=docs run build:guides-markdownstandalone — asapps/www's prebuild does, without first runningbuild:federated-content— crashes withENOENT ... ai-skills.json(and the equivalent forterraform.schema.json).The
AiSkillsIndexandTerraformProviderSchemamarkdown-schema handlersreadFileSynca gitignored, build-time-generated JSON artifact unconditionally. In the full docs build these files exist becausebuild:federated-contentruns first (via the docsprebuild), but in the standalone / www path they do not, so the read throws.These unguarded reads were introduced in #48045 (ai-skills) and #48010 (terraform), which surfaced as the www Vercel build failure.
What is the new behavior?
Both handlers now render an empty section (return an empty string) when the generated artifact is absent, so
build:guides-markdownsucceeds in the standalone / www path.When the artifact IS present (the full docs build, which runs
build:federated-contentfirst), behavior is byte-for-byte unchanged — the file is parsed and rendered exactly as before. The full docs build is not affected.Additional context
Implemented with a minimal
existsSyncguard (from the already-importednode:fs) in each handler:apps/docs/internals/markdown-schema/AiSkillsIndex.tsapps/docs/internals/markdown-schema/TerraformProviderSchema.tsNo changes to any
package.json,.gitignore, or the generators — the fix is confined to the two handlers.Generated by Claude Code