Repository navigation
fix(docs): run the awaited fumadocs-mdx write after next typegen in type-check - #313
Merged
Merged
Conversation
…ds or fewer Adds a `seoTitle:` frontmatter line to every English page whose built `<title>` read as one or two words plus the ` | ObjectOS` suffix, so the tab/result title carries the terms a reader searches for while the H1, sidebar and breadcrumb keep the short noun (#166's mechanism). - 67 pages: each gains exactly one line; no `title`, `description` or body line changes. - Every title leads with the page's own specific term, lifted from its description and headings, and renders at 52–60 characters including the suffix (measured on the built HTML). - The three duplicated titles (Approvals, Dashboards, Notifications — each used by a build/configure page and a use page) are now distinct. - English only. Locale siblings are translation artifacts that a non-translator commit may not modify (AGENTS.md, Translation workflow; check-translation-ownership.mjs); the translation pass carries the new key over, and the output report lists the 163 siblings now missing it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FeA1nwBz1ohH65dvffUGKr
…AQ headings, title-weighted per-locale search, consistency pass - Light-mode muted foreground to hsl(0 0% 40%); code comments recoloured in both shiki themes. - Tables get an always-drawn scrollbar and a scroll-driven trailing fade. - FAQ and License FAQ questions become headings. - /api/search builds one locale's index on that locale's first search and weights title > heading > text; check-search-locales gains own-title-buried; smoke-docs asks /api/search in every locale with a nonce control. - Consistency: one data-residency table, one license-validation sentence, ObjectSchema.create, "license" spelling, Configure title, glossary order plus AI seat and Position, logo to the docs home, a translated llms.txt example, three unsourced configure/ai claims removed (with their locale siblings), release-following lines pointed at a populated feed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FeA1nwBz1ohH65dvffUGKr
…ests Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FeA1nwBz1ohH65dvffUGKr
…comments Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FeA1nwBz1ohH65dvffUGKr
…ix apiMethods primitives
The Views page declared views inside a defineObject call under an
object-level `view` key. ObjectStack provides no defineObject, and
ObjectSchema.create rejects `view` as an unknown key. Its views are a
defineView container ({ list, listViews, form, formViews }, each view
bound through `data`) registered on the stack with `views: [...]`, which
both samples now show; both parse with @objectstack/spec 17.6.0.
The REST API page's allowed apiMethods values drop the eight retired ones
the spec strips at parse.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FeA1nwBz1ohH65dvffUGKr
…ype-check `next typegen` loads next.config.mjs, and fumadocs-mdx 15.0.7's createMDX() starts init() without awaiting it (dist/next/index.js:14-20). init rewrites every .source/*.ts with fs.writeFile (dist/core-DlDe_Eze.js:232-236), which truncates first. typegen ends in process.exit(0), so it can exit inside that window and leave .source/server.ts empty for tsc: TS2306, CI run 37478051451. Running the fumadocs-mdx CLI after typegen makes the CLI, which awaits its writes, the last writer before tsc. typegen does not read .source. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FeA1nwBz1ohH65dvffUGKr
This was referenced Oct 6, 2026
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.
Fixes #311
What changed
apps/docstype-checknow runsnext typegen && fumadocs-mdx && tsc --noEmit. Before, it ranfumadocs-mdx && next typegen && tsc --noEmit.The awaited
fumadocs-mdxCLI is now the last process to write.source/*beforetscreads it.AGENTS.mdis not in this PR. Its Commands line documents the old order.AGENTS.mdis governed, human-merge only, so the one-line update (staged locally as4afa327) goes with the seat's pending governedAGENTS.mdchange. That keeps this fix from waiting on a maintainer merge.Why
The root cause in #311 checks out against the installed fumadocs-mdx 15.0.7 and next 16.2.6:
dist/next/index.js:14-20:createMDX()callsinit(isDev, core)and does not await it.initrunsinitOrReload(:84-88,:120), which ends incore.emit({ write: true }).dist/core-DlDe_Eze.js:232-236:emitrewrites every.source/*.tswithfs.writeFile, which truncates the file first.next/dist/bin/next:170-172:typegenruns.then(()=>process.exit(0)), which kills a pending write mid-flight.fumadocs-mdx/dist/bin.js:4-11: the CLI awaitspostInstall, which awaitsemit. It never loadsnext.config.mjs; it only checks that the file exists.next typegendoes not read.source. With.sourcedeleted it still exits 0 and prints✓ Types generated successfully.Red, then green
The harness is a throwaway
NODE_OPTIONS=--requirepreload, not committed and not innode_modules. It makes.source/*.tswrites truncate at once and land after a delay, which widens the window. With no delay set, it does nothing. The red runs are on5d2f837. The green runs are on treee06625d, which is this PR's tree (the commit message was rewritten afterwards; the tree did not change)..source.sourceIn all 20 green jitter runs, typegen still exited with writes pending, so the race fired every time and the CLI absorbed it.
A red run, on the old order, at 3000 ms:
This shows the same signature as CI run 37478051451: one
[MDX] generated filesline instead of two, andserver.tsat 0 bytes after the run.Other entry points
postinstall(fumadocs-mdx): not exposed. The CLI awaits its writes. Under the 3000 ms harness it printed[MDX] generated files in 3052msand leftserver.tsat its full 99755 bytes.next build: not exposed in the same way. The process outlives the write, so no truncated.sourceis left behind. It does have a related window inside the one process: Turbopack can read.source/server.tswhilecreateMDX's rewrite is truncating it. Measured with the harness, build passed at 50 ms and 200 ms delays and failed at 1000 ms and 5000 ms. The failure is loud (Export docs doesn't exist in target module), not a bad artifact. On a natural build,[MDX] generated filesprints beforeCreating an optimized production build. See Acceptance notes.next dev: not exposed in the same way. The process is long-lived andinit(dev=true)goes on to start the watcher. In a probe with a 20 s delay, a request sent while the files were truncated returned 200. The first compile took 104 s, so it outlasted the window, and no error was logged.preview/deploy: these runnext buildthroughopennextjs-cloudflare build, sonext buildcovers them. CI packages with--skipNextBuild.Gates
All ran on
4afa327, with exit codes captured before any pipe. The pushed head5e666c3carries the sameapps/docs/package.jsonchange and drops only theAGENTS.mdline, which no gate reads; CI re-runs every gate on it.node apps/docs/scripts/gen-zh-hant.mjs --check: exit 0,✓ zh-Hant: 60 generated file(s) match the zh-Hans sources byte for byte.pnpm turbo run type-check --continue --force: exit 0,Tasks: 1 successful, 1 totalNEXT_PRIVATE_STANDALONE=true pnpm turbo run build --force: exit 0,Tasks: 1 successful, 1 totalpnpm turbo run test --force: exit 0,Tasks: 1 successful, 1 totalcheck-translation-ownership.mjs --actor hotlong --files changed.txt, with the workflow's--name-status --no-renameslist: exit 0. It also exits 0 withTRANSLATION_BOT_LOGINset:✓ 2 file(s) changed, no translation artifacts touched.(On the pushed head the diff is 1 file.)check-node-floor.mjs --self-testand the check itself: exit 0. They ran because they readapps/docs/package.json.Locale surface,PositioningandSearch answers every locale. This diff changes no content and no route.Acceptance notes
_FUMADOCS_MDX=1, fumadocs-mdx's private recursion guard, which would stopcreateMDXfrom rewriting duringnext build. That depends on an internal variable, so it is left as a decision. The real fix belongs upstream:createMDXshould awaitinit, oremitshould write to a temp file and rename it. A report from public facts is welcome. Carrier: none.Failed to load dynamic font ... self-signed certificate in certificate chain. That is the sandbox's TLS proxy blocking OG font fetches. The build still exits 0.维护者速读(草稿)
type-check的三步顺序调换,next typegen先跑,fumadocs-mdx后跑。AGENTS.md的对应说明属受管文件,另走维护者合并,不在本 PR。main上一次 CI 红在类型检查,原因是next typegen退出时 fumadocs 的后台写入刚清空文件还没写完;红了的main不部署。next build内的同源窗口未关,见 Acceptance notes。Generated by Claude Code