Filed unassigned by the os-dev seat while implementing #6075, which surfaced this bucket for the first time. Grading and domain:* are the triage seat's. ⛔ Not fixed in #6075's PR — that card changes the recogniser, not the corpus.
⚠️ Editor's note: the first revision of this body wrote a Zod literal with an angle-bracket placeholder. GitHub's body sanitizer ate the fragment on the way in, leaving z.literal('') — a sentence that read as a claim about the empty string. Placeholders are spelled in words below for that reason.
What was measured
objectui check now recognises a file either structurally or by validating it, and reports the files it refuses whose root type nevertheless names a registered component. On a clean checkout of origin/main @ 090927f4f that report names 54 files, of which 53 are real ObjectUI content that safeValidateSchema (AnyComponentSchema in @object-ui/types/zod) does not accept. The 54th is packages/vscode-extension/schemas/objectui-schema.json, a draft-07 JSON Schema document whose root type is object — a registered component key. That one is the known, pinned false positive of the report's discriminator, not a finding.
Method: reproduce the command's own predicate over globSync('**/*.{json,yaml,yml}', { ignore: ['node_modules/**','dist/**','.git/**'] }) restricted to tracked files, parse with jsonc-parser, then bucket. Full eligible accounting: 617 globbed / 475 eligible (root type string) / 375 recognised / 54 reported / 46 skipped.
⚠️ Measure on a clean tree. objectui check's ignore list only excludes a top-leveldist/, so in a built workspace every count roughly doubles — that is #6320, filed separately.
Two distinct causes, both real
A. Content that violates a schema the union does model — 49 files.
The clearest instance is examples/schema-catalog/src/schemas/components-basic-text/small.json:
{ "type": "text", "content": "Small text", "variant": "small" }TextSchema.variant (packages/types/src/zod/layout.zod.ts) is an enum of h1 h2 h3 h4 h5 h6 body caption overline. small is not in it, so the document is rejected. BaseSchema is .passthrough(), so the unknown content key is not what fails it — the enum is. Sibling files under components-basic-text/ (paragraph, muted, lead, large) share the shape. Other affected groups: button (14), text (5), toast/sonner fixtures, tree-view (4), filter-builder (4), data-table (2), timeline (3), object-map (3), object-gantt (3), kanban (2), tabs, select, tooltip, menubar, dropdown-menu, context-menu, button-group.
B. A registered component type with no Zod schema at all — 4 files.
examples/schema-catalog/src/schemas/plugin-editor/read-only-json-viewer.json (code-editor)examples/schema-catalog/src/schemas/plugin-editor/python-editor.json (code-editor)examples/schema-catalog/src/schemas/plugin-editor/javascript-editor.json (code-editor)examples/schema-catalog/src/schemas/plugin-charts/simple-bar-chart.json (bar-chart)
Searching packages/types/src/zod/ for a z.literal call naming either type — that is, z.literal applied to the string code-editor, and the same for bar-chart — returns zero occurrences. Both types render, and objectui validate cannot validate either. That is a coverage gap in the protocol package, not an authoring mistake in the file.
Adjacent measurement, recorded rather than acted on
36 files that the structural arm already admitted also fail safeValidateSchema today. objectui check does not report those: it checks a recognised file's type, and validation is objectui validate's job. Whether check should surface validation failures for files it already judges is a product decision, deliberately left out of #6075's scope — noted here so the number is on record rather than rediscovered.
Diagnosability note
Every failure in this bucket reports a single root issue: invalid_union — Invalid input. Zod 4 collapses union failures, so neither objectui validate nor a reader learns which member was intended or which field failed. Whoever picks this up will want a discriminated union or a type-keyed dispatch before triaging 53 files by hand.
Reproduce
node packages/cli/dist/cli.js check
after building @object-ui/cli from the #6075 branch (and before building the examples — see #6320), or on main once that PR lands.
Related
Generated by Claude Code
Filed unassigned by the
os-devseat while implementing #6075, which surfaced this bucket for the first time. Grading anddomain:*are the triage seat's. ⛔ Not fixed in #6075's PR — that card changes the recogniser, not the corpus.What was measured
objectui checknow recognises a file either structurally or by validating it, and reports the files it refuses whose roottypenevertheless names a registered component. On a clean checkout oforigin/main@090927f4fthat report names 54 files, of which 53 are real ObjectUI content thatsafeValidateSchema(AnyComponentSchemain@object-ui/types/zod) does not accept. The 54th ispackages/vscode-extension/schemas/objectui-schema.json, a draft-07 JSON Schema document whose roottypeisobject— a registered component key. That one is the known, pinned false positive of the report's discriminator, not a finding.Method: reproduce the command's own predicate over
globSync('**/*.{json,yaml,yml}', { ignore: ['node_modules/**','dist/**','.git/**'] })restricted to tracked files, parse withjsonc-parser, then bucket. Full eligible accounting: 617 globbed / 475 eligible (roottypestring) / 375 recognised / 54 reported / 46 skipped.objectui check's ignore list only excludes a top-leveldist/, so in a built workspace every count roughly doubles — that is #6320, filed separately.Two distinct causes, both real
A. Content that violates a schema the union does model — 49 files.
The clearest instance is
examples/schema-catalog/src/schemas/components-basic-text/small.json:{ "type": "text", "content": "Small text", "variant": "small" }TextSchema.variant(packages/types/src/zod/layout.zod.ts) is an enum ofh1 h2 h3 h4 h5 h6 body caption overline.smallis not in it, so the document is rejected.BaseSchemais.passthrough(), so the unknowncontentkey is not what fails it — the enum is. Sibling files undercomponents-basic-text/(paragraph,muted,lead,large) share the shape. Other affected groups:button(14),text(5), toast/sonner fixtures,tree-view(4),filter-builder(4),data-table(2),timeline(3),object-map(3),object-gantt(3),kanban(2),tabs,select,tooltip,menubar,dropdown-menu,context-menu,button-group.B. A registered component type with no Zod schema at all — 4 files.
examples/schema-catalog/src/schemas/plugin-editor/read-only-json-viewer.json(code-editor)examples/schema-catalog/src/schemas/plugin-editor/python-editor.json(code-editor)examples/schema-catalog/src/schemas/plugin-editor/javascript-editor.json(code-editor)examples/schema-catalog/src/schemas/plugin-charts/simple-bar-chart.json(bar-chart)Searching
packages/types/src/zod/for az.literalcall naming either type — that is,z.literalapplied to the stringcode-editor, and the same forbar-chart— returns zero occurrences. Both types render, andobjectui validatecannot validate either. That is a coverage gap in the protocol package, not an authoring mistake in the file.Adjacent measurement, recorded rather than acted on
36 files that the structural arm already admitted also fail
safeValidateSchematoday.objectui checkdoes not report those: it checks a recognised file'stype, and validation isobjectui validate's job. Whethercheckshould surface validation failures for files it already judges is a product decision, deliberately left out of #6075's scope — noted here so the number is on record rather than rediscovered.Diagnosability note
Every failure in this bucket reports a single root issue:
invalid_union — Invalid input. Zod 4 collapses union failures, so neitherobjectui validatenor a reader learns which member was intended or which field failed. Whoever picks this up will want a discriminated union or atype-keyed dispatch before triaging 53 files by hand.Reproduce
after building
@object-ui/clifrom the #6075 branch (and before building the examples — see #6320), or onmainonce that PR lands.Related
objectui checkskips 263 real corpus files it should judge — the recall debt #5329 could not repay #6075 — the recogniser card that surfaced this; its PR reports the bucket but changes no corpus fileobjectui checkscans build output: itsdist/**ignore only excludes a top-leveldist/#6320 — the scan-scope hole that makes these counts depend on build stateobjectui check把每个 JSON 文件的根type都当成组件键判定,于是在任何 Node 工程里都对 package.json 的"type": "module"报未知类型 #5127 / fix(cli):objectui checkjudges only files that are recognisable as ObjectUI schemas, and reports what it skipped #5334 — the marker gate this bucket sits behind@object-ui/typesship a generated JSON Schema? — the contract an AI author can read before writing #5392 — ruled Option B, no shipped schema artifact, which is why the recogniser reads the Zod union directlyGenerated by Claude Code