Skip to content

fix(docs): guard federated-content schema reads when artifact is absent - #48144

Merged
awaseem merged 1 commit into
masterfrom
fix/guard-federated-content-schema-reads
Jul 21, 2026
Merged

awaseem merged 1 commit into
masterfrom
fix/guard-federated-content-schema-reads

Conversation

@claude

@claude claude Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

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-markdown standalone — as apps/www's prebuild does, without first running build:federated-content — crashes with ENOENT ... ai-skills.json (and the equivalent for terraform.schema.json).

The AiSkillsIndex and TerraformProviderSchema markdown-schema handlers readFileSync a gitignored, build-time-generated JSON artifact unconditionally. In the full docs build these files exist because build:federated-content runs first (via the docs prebuild), 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-markdown succeeds in the standalone / www path.

When the artifact IS present (the full docs build, which runs build:federated-content first), 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 existsSync guard (from the already-imported node:fs) in each handler:

  • apps/docs/internals/markdown-schema/AiSkillsIndex.ts
  • apps/docs/internals/markdown-schema/TerraformProviderSchema.ts

No changes to any package.json, .gitignore, or the generators — the fix is confined to the two handlers.


Generated by Claude Code

@vercel

vercel Bot commented Jul 21, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment, Open in v0 Jul 21, 2026 1:25pm
zone-www-dot-com Ready Ready Preview, Comment, Open in v0 Jul 21, 2026 1:25pm
5 Skipped Deployments
Project Deployment Actions Updated (UTC)
studio Ignored Ignored Jul 21, 2026 1:25pm
design-system Skipped Skipped Jul 21, 2026 1:25pm
studio-self-hosted Skipped Skipped Jul 21, 2026 1:25pm
studio-staging Skipped Skipped Jul 21, 2026 1:25pm
ui-library Skipped Skipped Jul 21, 2026 1:25pm

Request Review

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Jul 21, 2026
@supabase

supabase Bot commented Jul 21, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project xguihxuzqibwxjnimxev because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@awaseem
awaseem marked this pull request as ready for review July 21, 2026 13:16
@awaseem
awaseem requested a review from a team as a code owner July 21, 2026 13:16
@awaseem
awaseem merged commit 3a085f9 into master Jul 21, 2026
35 checks passed
@awaseem
awaseem deleted the fix/guard-federated-content-schema-reads branch July 21, 2026 13:44
@github-actions

github-actions Bot commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

Braintrust eval report

Assistant (master-1784641703)

Score Average Improvements Regressions
Completeness 98.9% (+0pp) 1 🟢 1 🔴
Conciseness 39.7% (-3pp) 6 🟢 11 🔴
Correctness 64.4% (-1pp) 1 🟢 2 🔴
Docs Faithfulness 63.3% (+2pp) 4 🟢 2 🔴
Goal Completion 79.1% (-2pp) 3 🟢 8 🔴
Knowledge Usage 94.9% (-3pp) - 1 🔴
SQL Identifier Quoting 100% (+0pp) - -
SQL Validity 97.4% (-3pp) - 1 🔴
Tool Usage 70.6% (-3pp) 1 🟢 2 🔴
Safety 90.5% (+1pp) 1 🟢 1 🔴
Time_to_first_token 2.78tok (+0.04tok) 15 🟢 14 🔴
Llm_calls 7.24 (+0.4) 16 🟢 11 🔴
Tool_calls 2.92 (+0.02) 9 🟢 10 🔴
Errors 0.02 (-0.84) 13 🟢 1 🔴
Llm_errors 0.01 (-0.01) 2 🟢 1 🔴
Tool_errors 0 (+0) - -
Prompt_tokens 27263.3tok (+4022.38tok) 9 🟢 16 🔴
Prompt_cached_tokens 7938.94tok (-123.59tok) 7 🟢 10 🔴
Prompt_cache_creation_tokens 0tok (+0tok) - -
Prompt_cache_creation_5m_tokens 0tok (+0tok) - -
Prompt_cache_creation_1h_tokens 0tok (+0tok) - -
Completion_tokens 586.89tok (-9.05tok) 10 🟢 19 🔴
Completion_reasoning_tokens 92.79tok (-1.13tok) 11 🟢 14 🔴
Completion_accepted_prediction_tokens 0tok (+0tok) - -
Completion_rejected_prediction_tokens 0tok (+0tok) - -
Completion_audio_tokens 0tok (+0tok) - -
Total_tokens 27850.18tok (+4013.33tok) 7 🟢 22 🔴
Estimated_cost 0$ (+0$) 9 🟢 16 🔴
Duration 16.53s (-0.45s) 19 🟢 10 🔴
Llm_duration 12.13s (+1.32s) 11 🟢 18 🔴

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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants