Skip to content

fix(docs): restore the Next build — REMOVED_PROVIDERS.md has no frontmatter (base-red #12581) - #12610

Merged
diegosouzapw merged 1 commit into
release/v3.8.51from
fix/release-v3.8.51-basereds-build
Sep 3, 2026
Merged

diegosouzapw merged 1 commit into
release/v3.8.51from
fix/release-v3.8.51-basereds-build

Conversation

@diegosouzapw

Copy link
Copy Markdown
Owner

Summary

Fixes the Package artifact (npm pack policy) hard failure behind base-red #12581 on release/v3.8.51, plus the Tarball boot-smoke failure that cascades from it.

Root cause. source.config.ts feeds docs/reference/**/*.md into defineDocs(), and fumadocs-mdx's default frontmatter schema requires a title string. #12478 added docs/reference/REMOVED_PROVIDERS.md with no frontmatter block at all, so every production build dies:

Error: Turbopack build failed with 1 error:
./docs/reference/REMOVED_PROVIDERS.md
Error: [MDX] invalid frontmatter in docs/reference/REMOVED_PROVIDERS.md:
- title: Invalid input: expected string, received undefined

One missing block turns three release-green gates red at once — the build itself, check:pack-artifact, and the boot-smoke that is skipped for lack of a valid dist/.

Changes

  1. docs/reference/REMOVED_PROVIDERS.md — add the frontmatter block, matching its sibling reference docs (title / version / lastUpdated). The document's content is untouched.
  2. scripts/check/check-docs-frontmatter.mjs (new) — validate that every Markdown file fumadocs compiles carries a non-empty title, wired into check:docs-all. It reads the globs from source.config.ts instead of duplicating them, so adding a docs directory there cannot silently escape the check.

Why the gate, and not just the one-line fix

Nothing in the current gate set catches this: it is not a broken link, not a fabricated reference, not a docs-sync drift — it surfaces only as a generic Turbopack error at the end of a full production build. Cost of catching it here: milliseconds. Cost of catching it in CI: a full build, three red gates, and a blocked release branch.

Verification

$ npm run check:docs-frontmatter
[docs-frontmatter] OK — 122 compiled doc(s) carry a valid frontmatter title.

# mutation check — gate actually catches the regression
$ (frontmatter removed) && node scripts/check/check-docs-frontmatter.mjs; echo $?
[docs-frontmatter] FAIL — 1 doc(s) would break the Next build:
  - docs/reference/REMOVED_PROVIDERS.md: no frontmatter block (fumadocs requires a `title`)
1

$ npm run check:docs-all   # passes (doc-links, fabricated-docs, counts, env-sync)

A scan of all 122 docs matched by source.config.ts found this file to be the only violation, so the branch is not one fix away from the next identical failure.

Refs #12581. Regression from #12478.

…matter (base-red #12581)

`source.config.ts` feeds `docs/reference/**/*.md` to fumadocs-mdx, whose default
schema requires a `title`. #12478 added `docs/reference/REMOVED_PROVIDERS.md`
with no frontmatter block at all, so every production build died with:

    [MDX] invalid frontmatter in docs/reference/REMOVED_PROVIDERS.md:
    - title: Invalid input: expected string, received undefined

That single missing block is what turns three release-green gates red at once —
`Package artifact (npm pack policy)` fails on the build, and both
`Tarball boot-smoke` and the packaged CLI checks are skipped for lack of a
valid `dist/`.

Fixes:
- add the frontmatter block, matching the convention of its sibling reference
  docs (`title` / `version` / `lastUpdated`).
- add `check:docs-frontmatter`, wired into `check:docs-all`, so the next doc
  added without a title fails in milliseconds instead of costing a full Next
  build and a red release branch. The gate reads its globs from
  `source.config.ts` rather than duplicating them, so a new docs directory
  cannot silently escape the check.

Verified: the gate reports OK across all 122 compiled docs, fails (exit 1) when
the frontmatter is removed, and `npm run check:docs-all` passes.
@diegosouzapw

Copy link
Copy Markdown
Owner Author

Verification: the build is fixed end-to-end

Full production build on this branch:

✓ Compiled successfully in 31.8min
BUILD_EXIT=0

Same command on the branch tip without this change fails with:

Error: Turbopack build failed with 1 error:
./docs/reference/REMOVED_PROVIDERS.md
- title: Invalid input: expected string, received undefined

Red discrimination

The two red checks are inherited from the base, not introduced here:

Check Verdict Evidence
Fast Quality Gates inherited fails on all 7 open PRs against release/v3.8.51 (#12604, #12606, #12607, #12608, #12590, #12591 and this one)
Unit Tests fast-path (2/4) inherited / flaky the failing case is tencent-aistudio-web executor returns wrapper shape — TimeoutError: Direct response did not start within 30000ms, a live-network test that waited 60s. #12591 fails the same job on a different shard (3/4).

This diff touches one Markdown frontmatter block, one new gate script, and one package.json line — no production code, no tests. tests/unit/removed-providers-blocklist.test.ts, the only test that reads the edited doc, passes 11/11 locally.

Base-red context: #12581.

@diegosouzapw
diegosouzapw merged commit 9ddb8e0 into release/v3.8.51 Sep 3, 2026
19 of 21 checks passed
@diegosouzapw
diegosouzapw deleted the fix/release-v3.8.51-basereds-build branch September 3, 2026 14:33
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…matter (base-red diegosouzapw#12581) (diegosouzapw#12610)

`source.config.ts` feeds `docs/reference/**/*.md` to fumadocs-mdx, whose default
schema requires a `title`. diegosouzapw#12478 added `docs/reference/REMOVED_PROVIDERS.md`
with no frontmatter block at all, so every production build died with:

    [MDX] invalid frontmatter in docs/reference/REMOVED_PROVIDERS.md:
    - title: Invalid input: expected string, received undefined

That single missing block is what turns three release-green gates red at once —
`Package artifact (npm pack policy)` fails on the build, and both
`Tarball boot-smoke` and the packaged CLI checks are skipped for lack of a
valid `dist/`.

Fixes:
- add the frontmatter block, matching the convention of its sibling reference
  docs (`title` / `version` / `lastUpdated`).
- add `check:docs-frontmatter`, wired into `check:docs-all`, so the next doc
  added without a title fails in milliseconds instead of costing a full Next
  build and a red release branch. The gate reads its globs from
  `source.config.ts` rather than duplicating them, so a new docs directory
  cannot silently escape the check.

Verified: the gate reports OK across all 122 compiled docs, fails (exit 1) when
the frontmatter is removed, and `npm run check:docs-all` passes.
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.

1 participant