Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

feat(core): curate box in PUBLIC_BLOCKS Tier B, pinned by a derived roster census - #8635

Merged
os-justin merged 3 commits into
mainfrom
claude/issue-6879-public-blocks-box
Sep 8, 2026
Merged

os-justin merged 3 commits into
mainfrom
claude/issue-6879-public-blocks-box

Conversation

@os-justin

Copy link
Copy Markdown
Collaborator

Fixes #6879

STEP 1 FIRST — the measurement, and it is the third answer

Triage forbade touching PUBLIC_BLOCKS before measuring what registry-inputs-spec-parity does with a public block that has no spec entry. It was measured before the roster was touched, and the answer is neither "it demands a spec entry" nor "it tolerates the absence":

The gate cannot see the block at all — its population is SPEC-shaped.

covered = Object.keys(ComponentPropsMap)
            .filter(type => (declaredInputs(type) ?? []).length > 0)

Measured over that expression on origin/main@86ef0c764:

set size
ComponentRegistry.getKnownTypes() 501
PUBLIC_BLOCKS 58
ComponentPropsMap (the spec) 45
the gate's covered 29

PUBLIC_BLOCKS appears in that file exactly twice, both times in docblock prose. It is never imported.

Mutation E1 — 'box' added to Tier B, parity gate run:

Test Files  1 passed (1)
      Tests  198 passed (198)      command-exit=0

Byte-identical to the pre-mutation baseline. Restore verified by blob hash (92197f3ce) and an empty git diff HEAD.

Why silent, stated as a property rather than as luck. Roster membership is neither necessary nor sufficient for being judged, and both halves have live specimens:

  • not necessary — element:record_picker, element:text_input and record:chatter are all outside PUBLIC_BLOCKS and all judged, because the spec describes them;
  • not sufficient — flex / grid / stack / card / container are all curated and all unjudged, because @objectstack/spec@17 carries no entry for any Tier B layout primitive.

So box did not arrive as a new spec-less population that a gate would discover at merge time. It joined one five types deep that the gate has never judged. ⇒ No spec entry is owed, and nothing needed loosening. The Tier B addition stands alone.

LIT CONTROL — the gate is not unconditionally green. page:card's spec-declared bordered input was deleted and the same gate re-run:

FAIL  registry-inputs-spec-parity > page:card publishes every top-level key its spec props schema declares
AssertionError: expected [ 'bordered' ] to deeply equal []
      Tests  1 failed | 197 passed (198)      command-exit=1

This PR's diff touches that file by zero lines; its own covered === EXPECTED_COVERED and stale-exemption pins remain the standing guard.

⚠️ One thing this gap was NOT

Verified after a reading from the objectui#6955 seat, and it sharpens the card: "absent from PUBLIC_BLOCKS" never meant "not on an authoring surface." box's inputs have been live all along through the other consumer of the same metadata — packages/components/src/renderers/layout/page.tsx:462 builds the JSX-page compiler's manifest from getKnownTypes(), registry-wide, with no roster in the path.

What this roster gates is getPublicConfigs(): the curated AI-authoring vocabulary, and through packages/sdui-parser/scripts/gen-manifest.ts:20 the published sdui.manifest.json and sdui-intrinsics.d.ts. That is the surface box was missing from — narrower than "the contract does not know it", and true. Both facts are now pinned rather than left in prose.

The pin DERIVES, it does not list

An exact list goes red when a curated type disappears. Nothing went red when a newly minted type never arrived — EXPECTED_COVERED agreed with the roster about omitting box because both are hand-carried, and two hand-carried lists that agree prove only that the same hand wrote both.

A pin asserting "PUBLIC_BLOCKS contains box" passes on a roster that carries box and has already missed the type minted after it. So the population is derived:

LayoutSchema.options                       (the runtime-enumerable zod authoring
  ∩ ComponentMeta.isContainer === true      union ∩ declared containment)

= 7 members, and after this PR exactly one is uncurated:

member curated
card container flex grid stack yes — the objectui#6764 control set, asserted not assumed
box yes, as of this PR
aspect-ratio no — ledgered, tracked by #8628

A newly minted layout container is in neither the roster nor the ledger, so it fails by absence. That is the property box needed and did not have.

Which set the pin derives from, said out loud (the false-green hazard when two sets exist): the population comes from the declaration faces — the zod union plus registry containment. PUBLIC_BLOCKS is only the question asked of each member. The pin never derives from the same set it interrogates.

Scope, stated plainly. This covers the container half of the layout vocabulary. The non-container arms (span, separator, scroll-area, resizable, page, deprecated div) are outside it because curating any of them is an unruled question of its own, and a ledger is a forcing function, not a place to park four at once.

Every pin was observed to fail — seven red legs

Each mutation was proved on disk (marker counts + blob hash) before the run, and restored with git checkout HEAD -- path verified by an empty git diff HEAD.

leg mutation assertion that fired
R1 — the defect 'box' removed from the roster curates every declared layout container → expected [ 'aspect-ratio', 'box' ] to deeply equal [ 'aspect-ratio' ]
R2 — caricature roster curates everything (aspect-ratio added) same pin → expected [] to deeply equal [ 'aspect-ratio' ], plus the stale-ledger pin
R3 — caricature derivation answers the same for every input (isContainer → false) vacuity guard → expected 0 to be greater than 0
R4 union read stops resolving literals expected [] to have a length of 17
R5 spec lookup always answers no lit control → expected 0 to be greater than 0
R6a spec lookup always answers yes expected [ 'card', 'container', 'flex', …(2) ] to deeply equal []
R7 — ablation box registers with no declared inputs expected [] to include 'className'

R3 is the one worth reading twice: a roster/census pin that iterates an empty set passes, so the vacuity guard is what makes the rest mean anything.

Non-regression axis

  • Every type already in Tier B is still there — EXPECTED_COVERED is exact (57 → 58), and R1/R2 show it fails in both directions.
  • The gate still reds on a genuinely missing spec entry — the page:card / bordered lit control above, with zero lines of this PR's diff touching that file.
  • The gate was not loosened. No exemption added, no ledger widened, no coverage set changed.

Verification

Local, all on the final commit 7bb3addc4:

run result
public-contract + registry-inputs-spec-parity Tests 217 passed (217) — parity still 198/198, census 11 → 19
apps/console/ + packages/core/src/registry/ 98 files / 1199 tests passed
packages/components/ census + ratchet + body-dialect-census 145 files / 1400 tests passed
app-shell metadata-admin, plugin-dashboard, plugin-tree, sdui-parser 367 files / 3654 passed, 1 skipped
examples/schema-catalog/, packages/types/, packages/core/, packages/layout/ 331 files / 7993 tests passed
pnpm lint (full repo, not narrowed) 47 successful, 47 total — 0 errors
@object-ui/core + @object-ui/console type-check both exit 0, on a built closure
check-control-bytes, check-phantom-dependencies, check-unused-dependencies all green

LEG D — classified per test from vitest's JSON reporter, not the text reporter: numTotalTests 19, passed 19, failed 0, pending 0, failedSuites 0. All eight new pins individually passed; no Failed Suites, no no tests.

Typecheck coverage is measured, not assumed: tsc -p apps/console/tsconfig.json --noEmit --listFiles lists public-contract.test.ts among its 3551 files, so the type-check really does cover the new pins.

Changeset

node scripts/check-changeset-presence.mjs, verbatim:

✅ 2 source file(s) of 2 released package(s) changed, and this change declares 1 changeset(s): .changeset/6879-public-blocks-box.md.

@object-ui/core: minor — a real bump, not an empty declaration: getPublicConfigs() now offers a block it did not, and that is what gen-manifest.ts publishes. scripts/check-changeset-no-major.mjs: ✅ No changeset declares a major bump.

Re-derived figures (⛔ none quoted from the card)

  • Exemplars: 27, not "27 but stale". Measured as files under examples/schema-catalog/src/schemas containing a "type": "box" node (84 nodes across them), on both my base 86ef0c764 and the newest origin/main 841dd2b7e. The dispatch expected 28 because PR fix(components): name box in the div deprecation guidance, on all four surfaces #8622 adds components-basic-div/use-box-instead.json — that file is absent from origin/main at both revisions, so fix(components): name box in the div deprecation guidance, on all four surfaces #8622 has not landed and 27 is current. It becomes 28 when it does. Homonym hazard avoided: the sweep counts "type": "box" JSON nodes only, never the bare word; lit control on the same command shape, "type": "flex" → 70 files.
  • Roster re-derived from the tree, not from the card's EXPECTED_COVERED: the census assertion's own received list was read back from a failing run rather than hand-edited.

Not in this PR

⛔ Nothing from PR #8622 (objectui#6877). div.tsx, div.mdx and the components-basic-div fixtures are untouched — the diff is 2 files plus a changeset. #6877 is not addressed here.


维护者速读(草稿)

改了什么 — box 进 PUBLIC_BLOCKS Tier B(packages/core),apps/console 的名单普查测试同步更新,并新增一组推导式的门禁:待判人口从 zod LayoutSchema 的分支 ∩ 注册表 isContainer 推出,而不是手抄一份清单。

为什么改 — box 由 2026-08-29 裁决铸造为 div 的中性替代,落在了所有声明面上(接口、zod 镜像、SchemaRegistry、注册、文档页、27 个目录范例),唯独漏了策展契约。于是 getPublicConfigs() 生成的 sdui.manifest.json 与 sdui-intrinsics.d.ts 少了一个目录正在教的类型 —— AI 作者读得到范例,读不到词汇表。

风险与代价(含回滚) — 风险低:契约面只增不减,现有 Tier B 一个不动。registry-inputs-spec-parity 实测纹丝不动(198/198),因为它的人口是 spec 形状,而 spec 从不描述任何 Tier B 布局原语。⚠️ 唯一的新增维护负担是那条一格账本:aspect-ratio 从未被裁决过,已另开 #8628 逼出决定;它若被长期搁置,账本就会退化成许可证。回滚 = revert 本 PR 三个 commit,无迁移、无数据、无生成物。

席位意见 — (待定稿)

你要做的 — ① 确认 box 确实该进策展词汇表(裁决说它是「新增公开类型」,本 PR 按此执行);② 认领或分诊 #8628,决定 aspect-ratio 是策展还是按理由拒绝;③ 确认推导式门禁的范围划法可接受:只管布局词汇表的容器那一半,非容器分支(span / separator / scroll-area / resizable / page / 已弃用的 div)留给原来的精确清单,因为逐个策展是四个各自独立的未裁决问题。

🤖 Generated with Claude Code

https://claude.ai/code/session_01YBWFb5YgMU5dw8p2VKj16S


Generated by Claude Code

os-justin and others added 3 commits September 8, 2026 18:01
… roster census

`box` was minted as the JSON surface's neutral block container and landed on
every declaration face — interface, zod mirror, `SchemaRegistry`, registration,
docs page and 27 catalog fixtures — except the curated contract. The catalog
taught a type `getPublicConfigs()` did not offer.

Measured first, as triage required: `registry-inputs-spec-parity` cannot see a
public block with no spec entry. Its coverage set is derived from
`Object.keys(ComponentPropsMap)`, it never reads `PUBLIC_BLOCKS`, and the spec
carries no entry for ANY Tier B layout primitive — `flex`/`grid`/`stack`/`card`/
`container` are all equally absent. So `box` joined a spec-less population five
types deep rather than opening a new one: no spec entry owed, no gate loosened.

The pin DERIVES its population (the zod `LayoutSchema` arms ∩ registry
`isContainer`) instead of listing it, so the next minted layout container reds
by absence rather than repeating this defect one iteration later. Its one
ledger entry, `aspect-ratio`, is tracked by objectui#8628.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YBWFb5YgMU5dw8p2VKj16S
…e is SPEC-shaped

Verified against a reading from the objectui#6955 seat: "absent from
PUBLIC_BLOCKS" does not mean "unjudged", and it does not mean "not on an
authoring surface" either.

Measured over the gate's own population expression: `covered` holds 29 blocks
drawn from ComponentPropsMap's 45 keys, out of 501 registry keys and 58 roster
entries. Roster membership is neither necessary (`element:record_picker` is
judged while uncurated) nor sufficient (`flex`/`grid`/`stack`/`card`/`container`
are curated and unjudged). `box` stays outside that gate either way — confirmed
by mutation: the parity file reports 198/198 identically with and without `box`
in Tier B.

And `box`'s inputs were already live on the JSX-page compiler's manifest, which
`page.tsx` builds from `getKnownTypes()`. What this card moved is
`getPublicConfigs()` — the curated vocabulary that `gen-manifest.ts` serialises
into `sdui.manifest.json` and `sdui-intrinsics.d.ts`. Both facts are now pinned
rather than asserted in prose.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YBWFb5YgMU5dw8p2VKj16S
`node scripts/check-changeset-presence.mjs` scores `packages/core/src/registry/
public-blocks.ts` as published source of a released package, so a real bump is
owed rather than an empty-frontmatter declaration: `getPublicConfigs()` now
offers a block it did not, and `gen-manifest.ts` serialises that into the
published `sdui.manifest.json` and `sdui-intrinsics.d.ts`.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YBWFb5YgMU5dw8p2VKj16S
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 50 chunks) 3477.2 KB 3512.7 KB
Main entry chunk (gzip) 143.9 KB 350 KB
Entry file index-BgJiAbs4.js —
Status PASS —

The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it.


📦 Bundle Size Report

Package Size Gzipped
app-shell (consoleActionDispatch.js) 0.20KB 0.19KB
app-shell (index.js) 15.67KB 5.75KB
app-shell (runtime-config.js) 20.68KB 7.36KB
app-shell (types.js) 0.01KB 0.04KB
app-shell (urlParams.js) 10.06KB 3.86KB
auth (ActiveOrganizationStorage.js) 25.05KB 9.16KB
auth (AuthContext.js) 0.31KB 0.24KB
auth (AuthGuard.js) 2.07KB 1.00KB
auth (AuthProvider.js) 40.18KB 10.59KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 12.21KB 3.45KB
auth (LoginForm.js) 18.15KB 5.39KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.65KB 2.22KB
auth (SocialSignInButtons.js) 9.61KB 3.89KB
auth (UserMenu.js) 3.41KB 1.23KB
auth (auth-gate-events.js) 1.29KB 0.66KB
auth (authStyles.js) 5.04KB 1.72KB
auth (createAuthClient.js) 40.21KB 10.80KB
auth (createAuthenticatedFetch.js) 8.46KB 3.43KB
auth (index.js) 3.19KB 1.44KB
auth (invitation-status.js) 1.22KB 0.70KB
auth (org-roles.js) 6.66KB 2.78KB
auth (phone-identifier.js) 1.11KB 0.66KB
auth (types.js) 0.59KB 0.35KB
auth (useAuth.js) 5.30KB 1.02KB
auth (useWorkspaceAdminStatus.js) 11.08KB 4.58KB
collaboration (CommentThread.js) 26.08KB 7.56KB
collaboration (LiveCursors.js) 3.17KB 1.27KB
collaboration (PresenceAvatars.js) 6.49KB 2.64KB
collaboration (PresenceProvider.js) 2.79KB 1.13KB
collaboration (index.js) 1.68KB 0.73KB
collaboration (useCollaborationTranslation.js) 6.05KB 2.52KB
collaboration (useCommentSearch.js) 1.98KB 0.88KB
collaboration (useConflictResolution.js) 7.75KB 1.86KB
collaboration (useMentionNotifications.js) 1.81KB 0.68KB
collaboration (usePresence.js) 6.33KB 1.84KB
collaboration (useRealtimeSubscription.js) 7.91KB 2.01KB
components (index.js) 498.93KB 114.12KB
core (index.js) 7.48KB 2.96KB
create-plugin (index.js) 10.12KB 3.28KB
data-objectstack (index.js) 198.39KB 55.29KB
fields (index.js) 243.73KB 61.53KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (builtinAggregateLabels.js) 0.86KB 0.49KB
i18n (currency.js) 1.22KB 0.64KB
i18n (fallbackInterpolation.js) 6.25KB 2.77KB
i18n (i18n.js) 6.57KB 2.76KB
i18n (index.js) 3.65KB 1.47KB
i18n (pickLocalized.js) 7.62KB 3.26KB
i18n (provider.js) 26.89KB 9.04KB
i18n (useDisplayLocale.js) 2.85KB 1.45KB
i18n (useObjectLabel.js) 34.34KB 9.17KB
i18n (useSafeTranslation.js) 5.60KB 2.33KB
layout (index.js) 38.84KB 10.94KB
mobile (MobileProvider.js) 0.92KB 0.49KB
mobile (ResponsiveContainer.js) 0.94KB 0.38KB
mobile (breakpoints.js) 1.51KB 0.70KB
mobile (createOfflineDataSource.js) 5.61KB 1.75KB
mobile (index.js) 1.99KB 0.87KB
mobile (offlineQueue.js) 3.91KB 1.35KB
mobile (pwa.js) 0.97KB 0.49KB
mobile (serviceWorker.js) 1.48KB 0.62KB
mobile (serviceWorkerSource.js) 3.41KB 1.48KB
mobile (useBreakpoint.js) 1.54KB 0.65KB
mobile (useGesture.js) 6.96KB 1.98KB
mobile (useOfflineSync.js) 1.99KB 0.72KB
mobile (usePullToRefresh.js) 2.53KB 0.85KB
mobile (useResponsive.js) 0.72KB 0.42KB
mobile (useSpecGesture.js) 4.39KB 1.66KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 11.71KB 4.29KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 6.24KB 2.16KB
permissions (discardProofCache.js) 1.04KB 0.55KB
permissions (evaluator.js) 5.12KB 1.74KB
permissions (index.js) 0.93KB 0.41KB
permissions (store.js) 0.91KB 0.42KB
permissions (useFieldPermissions.js) 1.28KB 0.53KB
permissions (usePermissions.js) 4.83KB 2.27KB
plugin-ai (index.js) 15.16KB 3.68KB
plugin-calendar (index.js) 49.00KB 13.91KB
plugin-charts (index.js) 71.39KB 19.92KB
plugin-chatbot (index.js) 194.53KB 46.34KB
plugin-dashboard (index.js) 131.43KB 34.44KB
plugin-designer (index.js) 213.21KB 43.63KB
plugin-detail (index.js) 251.10KB 64.96KB
plugin-editor (index.js) 2.23KB 1.05KB
plugin-form (index.js) 131.01KB 32.32KB
plugin-gantt (index.js) 167.16KB 40.99KB
plugin-grid (index.js) 208.30KB 56.63KB
plugin-kanban (index.js) 55.44KB 15.73KB
plugin-list (index.js) 112.73KB 27.69KB
plugin-map (index.js) 20.49KB 6.83KB
plugin-markdown (index.js) 13.88KB 4.80KB
plugin-report (index.js) 43.42KB 11.92KB
plugin-timeline (index.js) 30.10KB 8.74KB
plugin-tree (index.js) 9.33KB 3.25KB
plugin-view (index.js) 84.54KB 20.84KB
providers (DataSourceProvider.js) 0.75KB 0.39KB
providers (MetadataProvider.js) 1.37KB 0.59KB
providers (ThemeProvider.js) 1.90KB 0.85KB
providers (UploadProvider.js) 11.66KB 3.50KB
providers (index.js) 0.45KB 0.23KB
providers (types.js) 0.01KB 0.04KB
react-runtime (index.js) 5.62KB 2.34KB
react (LazyPluginLoader.js) 4.47KB 1.63KB
react (SchemaRenderer.js) 81.07KB 26.86KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 4.63KB 2.18KB
react (schema-input.js) 2.32KB 1.24KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (codegen.js) 6.58KB 2.74KB
sdui-parser (dashboard-widget-options.js) 3.08KB 1.30KB
sdui-parser (index.js) 5.55KB 2.45KB
sdui-parser (input-type.js) 2.84KB 1.40KB
sdui-parser (parse.js) 20.57KB 5.88KB
sdui-parser (provenance.js) 3.66KB 1.82KB
sdui-parser (types.js) 0.28KB 0.23KB
sdui-parser (validate.js) 13.64KB 4.59KB
types (ai.js) 0.20KB 0.17KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 2.87KB 1.00KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 2.93KB 1.49KB
types (crud.js) 0.20KB 0.18KB
types (dashboard-filter-alias.js) 6.23KB 2.74KB
types (data-display.js) 3.75KB 1.85KB
types (data-protocol.js) 0.20KB 0.19KB
types (data.js) 0.20KB 0.18KB
types (designer.js) 1.85KB 0.85KB
types (disclosure.js) 0.20KB 0.18KB
types (error-code.js) 1.54KB 0.88KB
types (expression.js) 0.20KB 0.18KB
types (feedback.js) 0.20KB 0.18KB
types (field-types.js) 0.20KB 0.18KB
types (form.js) 0.20KB 0.18KB
types (http-inflight.js) 8.87KB 3.73KB
types (http-retry.js) 4.32KB 2.02KB
types (icon-key-migration.js) 4.26KB 1.63KB
types (index.js) 4.74KB 2.25KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 4.73KB 2.28KB
types (navigation.js) 0.20KB 0.18KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (permissions.js) 0.20KB 0.18KB
types (plugin-scope.js) 0.20KB 0.18KB
types (record-components.js) 0.20KB 0.19KB
types (record-semantics.js) 1.28KB 0.67KB
types (registry.js) 0.20KB 0.18KB
types (reports.js) 0.20KB 0.18KB
types (select-option.js) 0.20KB 0.19KB
types (spec-report.js) 5.05KB 1.93KB
types (spec-ui-namespace.js) 0.20KB 0.19KB
types (system-fields.js) 3.33KB 1.54KB
types (theme.js) 6.28KB 2.87KB
types (ui-action.js) 8.11KB 3.32KB
types (views.js) 0.20KB 0.18KB
types (widget.js) 0.20KB 0.18KB

Size Limits

  • ✅ Core packages should be < 50KB gzipped
  • ✅ Component packages should be < 100KB gzipped
  • ⚠️ Plugin packages should be < 150KB gzipped

@os-justin
os-justin marked this pull request as ready for review September 8, 2026 18:43
@os-justin
os-justin enabled auto-merge September 8, 2026 18:44
@os-justin
os-justin added this pull request to the merge queue Sep 8, 2026
Merged via the queue into main with commit 3619792 Sep 8, 2026
35 checks passed
@os-justin
os-justin deleted the claude/issue-6879-public-blocks-box branch September 8, 2026 19:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant