Skip to content

docs(guide,api): one disposition per fabricated export, applied at every site (#5343) - #5364

Merged
os-support-ai merged 1 commit into
mainfrom
claude/issue-5343-guide-fabricated-exports
Aug 20, 2026
Merged

docs(guide,api): one disposition per fabricated export, applied at every site (#5343)#5364
os-support-ai merged 1 commit into
mainfrom
claude/issue-5343-guide-fabricated-exports

Conversation

@os-support-ai

Copy link
Copy Markdown
Collaborator

Fixes#5343
Part of #5174

The getting-started guides taught 14 symbols the packages do not export. A reader who copied one of those imports did not get a degraded render — they got a compile error. Same class as #5160 (five published READMEs), one directory over, on the pages people copy from most.

Every name set comes from each package's built dist/index.d.ts, resolved exactly as check-doc-snippet-types.mjs resolves it (each package's exports.types), never from a grep of src/ — the #5053 rule. The measurement harness reuses that script's own analyze() / compileSnippets(), so the numbers below are produced by the same pipeline that writes the ledger, over the whole corpus in one program (637 blocks, 541 semantically judged). Build artifacts sit between every edit and the thing under test, so the packages were built first (turbo run build, 43 tasks) and every measurement ran against that dist/.

Re-measured before working — and it agrees with the card

The card said its symbol table came from PR5341's run and the tree had moved. Re-derived here, the baseline reproduced the ledger's recorded mix exactly, for all seven entries — so this tree had not moved on these pages. One number disagrees with the card's body table: AppSchema / ThemeSchema / ReportSchema are 8 occurrences, not 9 (TS2305x2 + TS2724x6 in schema-overview.md). The card's ObjectStackProvider row lives at content/docs/utilities/index.md:163, outside this card's file surface; it is untouched, still on the ledger, and now filed on its own (see Findings).

One disposition per symbol, applied at every site

symbolclaimed fromdispositionresolves tosites
getComponentRegistry@object-ui/reactrenamed + wrong packageComponentRegistry, the process-level singleton @object-ui/core exports (Registry.d.ts:341; the spelling PR5260 landed in the core/react/components READMEs)component-registry ×5, schema-rendering ×1
registerDefaultRenderers@object-ui/componentsrenamed — settled by PR5341, not re-decidedinitializeComponents() plus the side-effect import '@object-ui/fields' (apps/site/app/components/ObjectUIProvider.tsx)component-registry ×4, schema-rendering ×1
registerAllComponents@object-ui/componentssame disposition, same evidenceas above (which also retired the registerAllFields(Registry) arity error — the real one takes no arguments and the module calls it itself at load)building-crud-app ×1
BaseSchema@object-ui/corewrong package@object-ui/types (base.d.ts:65, and it declares className — which is what retired the page's TS2339)component-registry ×3
PageSchema@object-ui/types / @object-ui/corerenamed + wrong packagePageNodeSchema in @object-ui/types — renamed by objectui#3074, which split the renderer NODE off the spec's Page documentschema-reference ×1, schema-rendering ×1
FormSchema@object-ui/corewrong package@object-ui/types (form.d.ts:1073)schema-rendering ×1
DashboardSchema@object-ui/typesrenamedDashboardComponentSchema (complex.d.ts:657)schema-reference ×1
AppSchema@object-ui/types, /zodrenamedAppComponentSchema (app.d.ts:283, zod app.zod)schema-overview ×3
ThemeSchema@object-ui/types, /zodrenamedThemeComponentSchema (theme.d.ts:79, zod theme.zod)schema-overview ×3
ReportSchema@object-ui/types, /zodrenamedReportComponentSchema — the presentation layer; Spec* is the definition layer (spec-report.d.ts header)schema-overview ×2
componentSchema@object-ui/types/zodrenamed (case)ComponentSchema (zod/blocks.zod.d.ts:482) — aliased at the site, because the same block already imports the TYPE of that nametroubleshooting ×1
InputRenderer@object-ui/componentsremoved, nothing replaces itbuilt-in renderers are registered by loading their package; they are not handed out one by one. The "Registering Individual Components" section is gonecomponent-registry ×1
ObjectSchema / Field@object-ui/typesremoved, nothing replaces itno builder API exists. Object metadata is the plain document a data source serves (DataSource.getObjectSchema() returns Promise<any>); the example now writes it as a literal whose fields record is typed against the real FieldMetadata unionbuilding-crud-app ×1 (two names)
getExpressionEvaluator@object-ui/coreremoved, nothing replaces itthere is no process-level evaluator — SchemaRenderer.tsx:420 constructs a fresh ExpressionEvaluator per evaluation, and each one builds its own FormulaFunctions. The section now teaches evaluateExpression(expr, context) and new ExpressionEvaluator(context)expressions ×1

Two same-spelling names were checked and deliberately not touched, because their source is real: layout.md's prose "an AppSchema JSON document" and dashboard-filters.md's "DashboardSchema.dateRange … are part of @objectstack/spec" both name spec exports (@objectstack/spec/ui does export AppSchema). The defect was always the claimed source, never the spelling in the abstract.

The two replacement claims in expressions.md were verified by running them against the built dist/, not by reading: a context-supplied function is callable under its exact name (evaluateExpression('${formatCurrency(price)}', { formatCurrency, price: 1234.5 })'$1,234.50'), and ${user.permissions.includes('admin')} returns true / false against the two obvious contexts.

Adjacent falsehoods the renames exposed — fixed here, and why that is not scope creep

Re-pointing an import at the real type turns a previously-unchecked literal into a checked one. Three blocks would have gained a new diagnostic class, which the ratchet forbids, so they were corrected in the same pass, each pinned by the same built d.ts the disposition came from:

  • schema-overview.md theme example — mode: 'system' (the vocabulary is auto / light / dark) and per-theme light / dark palettes (the spec Theme carries one colors map). Measured: TS2322x1 + TS2353x1 appeared, then went.
  • schema-rendering.md typed page — PageNodeSchema.body is SchemaNode[], so the nested form is an array element. Measured: TS2353x1 appeared, then went.
  • component-registry.mdregister(…) metadata — displayName / description / tags / schema / lazy: true are not ComponentMeta keys; the real ones (label, category, icon, inputs, labelling) are used, and lazy registration is registerLazy(type, loader). In the same page getRegisteredTypes() / getMetadata() became getAllTypes() / getMeta(), the names the Registry class declares.

Ledger — rewritten to the new measured mix, never widened

Every entry stays: none of the seven pages reaches zero, because #5174's fragment / self-containment half is a separate job.

entrybefore (= what the ledger recorded)after
api/schema-reference.md1 undef; TS2305x1 TS2724x11 undef
guide/building-crud-app.md1 parse; 20 undef; 4 unres; TS2305x2 TS2339x1 TS2345x1 TS2554x1 TS2724x1 TS2882x11 parse; 20 undef; 4 unres; TS2339x1 TS2345x1 TS2882x1
guide/component-registry.md3 parse; 51 undef; 6 unres; TS2305x13 TS2339x13 parse; 50 undef; 6 unres
guide/expressions.md8 parse; 6 undef; TS2724x1 TS7006x38 parse; 5 undef; TS7006x1
guide/schema-overview.md9 parse; 2 undef; TS2305x2 TS2724x68 parse; 2 undef
guide/schema-rendering.md8 parse; 10 undef; 1 unres; TS2305x4 TS2322x1 TS2451x2 TS7006x58 parse; 10 undef; 1 unres; TS2322x1 TS2451x2 TS7006x5
guide/troubleshooting.md8 undef; 1 unres; TS2322x1 TS2339x2 TS2559x1 TS2724x18 undef; 1 unres; TS2322x1 TS2339x2 TS2559x1

Every bucket is equal or lower and no new class appears. Nothing was added to the ledger, no threshold moved, and no export was added to any package — the accept set is untouched.

The ledger's header note is updated with it: after this change, exactly one entry in the whole file still names a missing export (content/docs/utilities/index.md, ObjectStackProvider), and it says so by name.

Verification (at d975803fb, the final commit)

node scripts/check-doc-snippet-types.mjs → 87/87 blocks judged, 0 failed; ledger exact; controls green
node scripts/check-doc-component-types.mjs → 564 type literals, 0 unregistered
node scripts/check-doc-links.mjs → links valid across 13 scan roots
node scripts/check-control-bytes.mjs → OK (4757 tracked text files)
node scripts/check-changeset-{no-major,fixed,presence}.mjs → green; no changeset owed
pnpm exec eslint scripts/check-doc-snippet-types.mjs → clean
pnpm exec vitest run scripts/__tests__/check-doc-{snippet,component}-types.test.ts → 47 passed

Corpus re-derivation at the same commit: over all 35 guide pages plus schema-reference.md, and again over the whole 637-block corpus, zero TS2305 / TS2724 / TS2614 remain anywhere under this card's file surface. The only missing-export diagnostic left in the corpus is ObjectStackProvider at content/docs/utilities/index.md:163.

Changeset: empty frontmatter (.changeset/guide-fabricated-exports-5343.md) — docs and gate ledger only, no package src/ touched, so nothing publishes. That is this repo's declared "no release" form (AGENTS.md §9; precedent .changeset/app-shell-docs-nav-examples.md) and it is what check-changeset-presence.mjs confirms is owed. The dispatch suggested patch; a patch would move all 39 packages of the fixed group for a change with no runtime effect, so the empty declaration is used instead and flagged here.

Findings, filed not fixed


Generated by Claude Code

…ery site (#5343)
The getting-started guides under `content/docs/guide/**` and
`content/docs/api/schema-reference.md` documented 14 symbols the packages do not
export. A reader copying one of those imports got a compile error, not a
degraded render — the same class as #5160, one directory over.
Every name set was taken from each package's built `dist/index.d.ts`, never from
a grep of `src/`. Each symbol got ONE disposition, applied at every site:
- renamed: `PageSchema` -> `PageNodeSchema`, `DashboardSchema` ->
`DashboardComponentSchema`, `AppSchema` / `ThemeSchema` / `ReportSchema` ->
`AppComponentSchema` / `ThemeComponentSchema` / `ReportComponentSchema` (type
AND zod entries), `componentSchema` -> `ComponentSchema`,
`registerDefaultRenderers` / `registerAllComponents` -> `initializeComponents()`
plus the side-effect `@object-ui/fields` import, `getComponentRegistry()` ->
the `ComponentRegistry` singleton;
- wrong package: `BaseSchema`, `PageSchema` and `FormSchema` were claimed from
`@object-ui/core` while they live in `@object-ui/types`;
- removed with nothing replacing it: `InputRenderer`, the `ObjectSchema` /
`Field` builder pair and `getExpressionEvaluator` — those examples are gone and
the pages teach the real surface instead.
The seven `UNGATED_DOCS` entries are rewritten to the mix each page now
measures. Every bucket is equal or lower; no new diagnostic class appears.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RV6yuVCxymHYE16PL9vQkE
@os-support-ai
os-support-ai marked this pull request as ready for review August 20, 2026 01:53
@os-support-ai
os-support-ai added this pull request to the merge queueAug 20, 2026
Merged via the queue into main with commit ae5fdceAug 20, 2026
21 checks passed
@os-support-ai
os-support-ai deleted the claude/issue-5343-guide-fabricated-exports branch August 20, 2026 01:54
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants

@os-support-ai@claude