docs(types): SchemaRegistry's docblock owns its key set, not its values - #9677
Merged
Merged
Conversation
The interface documented itself as "the Single Source of Truth for component type lookups" without qualification. The key-set half of that is true and load-bearing — `keyof SchemaRegistry` IS the published `ComponentType` union. The value half is structurally unachievable for a component whose renderer lives in a plugin package: `check:phantom-deps` judges `import type` exactly as it judges a value import and refuses the undeclared specifier, and declaring the dependency closes a cycle through the plugin, which already depends on this package. The claim is split rather than weakened: the key set keeps the wording, a value is documented as the strongest type this layer can reach for that key, and objectui#7645 is named as the worked example in the citation style this file already uses. Prose inside one comment. No member of `SchemaRegistry` is added, removed, renamed or retyped, so `ComponentType` is byte-identical. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012EpHzwH4wTy5sd7ibkD2yq
Contributor
✅ Console Performance Budget
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
Size Limits
|
This was referenced Sep 17, 2026
os-justin
marked this pull request as ready for review
September 17, 2026 11:24
os-justin
deleted the
claude/issue-7665-schema-registry-docblock-scope
branch
September 17, 2026 11:44
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.
Part of #7665
The split, not a weakening
SchemaRegistrydocumented itself as the Single Source of Truth for component typelookups, unqualified. The key-set half of that is true and load-bearing; the value half
is structurally unachievable for any component whose renderer lives in a plugin package.
This branch changes one docblock — the comment immediately above
export interface SchemaRegistry— so the sentence claims only the half it can keep.The key set KEEPS the Single-Source-of-Truth wording; only the value side is qualified.
line 105 on
15b33aeb4; this branch is cut from72f55c9ec, where the same sentence isone line further down — the rule demonstrating itself inside its own card.
Before
After
The premise, measured on this branch rather than taken on trust
The card rests on one structural claim:
@object-ui/typescannot name a type that livesin a plugin package. Both legs were measured here with a temporary mutation that was then
restored (each probe carried a
traprestore and finished withgit diff HEADempty forthe mutated path — checked, not assumed):
import type { KanbanColumnConfig } from '@object-ui/plugin-kanban';injected intoregistry.ts(injection confirmed on disk by a marker grep, count 0 to 1),node scripts/check-phantom-dependencies.mjsexited 1 and printed, with theaddress trimmed because it described the mutated tree and not this one:
[undeclared-runtime] @object-ui/types imports '@object-ui/plugin-kanban' (type-only).The gate's own header states the grading it applies: "Type-only imports are STRICT.
import type… is judged exactly like a value import."@object-ui/plugin-kanbanadded topackages/types/package.jsondependenciesasworkspace:*,turbo run build --dry --filter=@object-ui/typesexited 1 withx Cyclic dependency detected:over a task list containing both@object-ui/types#buildand@object-ui/plugin-kanban#build. Restored.dependencies, not zero dependencies — this package does declare external runtime
dependencies, and its only
workspace:entry is a devDependency. So the docblock rests onthe two instruments above, which re-derive the consequence on every run, rather than on a
dependency count that would rot (AGENTS.md #9).
Clause-② stays
no— no member movedMeasured, not asserted: the
SchemaRegistrymembers were read off the TypeScript AST atthe branch point and at HEAD (key + value type text + optionality, in source order). Both
readings give 70 members and the lists are identical, so
keyof SchemaRegistry— andtherefore the published
ComponentTypeunion — is unchanged. Two non-vacuity controls ranwith it: the reader detects a dropped member, and it really read this map (a live key is
present in the HEAD reading). The diff is prose inside one comment plus a changeset.
Verification
node scripts/check-changeset-presence.mjsnode scripts/check-phantom-dependencies.mjs(unmutated)node scripts/check-new-cross-file-line-citations.mjsnode scripts/check-control-bytes.mjspnpm --filter @object-ui/types testpnpm --filter @object-ui/types type-checkpnpm --filter @object-ui/types linteslint --no-inline-config --format jsonon it reports 0 errors, 0 warnings)Both heavy runs went through the shared verify lock. The repo-wide farm is CI's; nothing
here was narrowed silently.
Why a changeset at all, and why an empty one
The gate decides, not taste:
packages/types/src/is published source of a releasedpackage, so a declaration is owed even for a comment; and nothing user-visible ships, so
the empty frontmatter is the honest form. The same shape has precedent in this tree —
see the comment-only changeset for the retired
element:filterheader note. Doc commentsDO reach the published
.d.ts, which is why this is declared rather than skipped.Acceptance notes — found, deliberately not fixed here
the map's missing kanban-family coverage is "the objectui#7665 sweep's territory" and
that objectui#7665 "holds" the map's other entries. This card is option C and its
triage forbids the sweep; option A has no card yet. Once this lands, those two
comments point a reader at a closed card for work it explicitly excluded. Reported for
the PM to route, ⛔ not re-pointed here: the successor card does not exist to cite.
divergence. The bare
kanbankey was retired (objectui#8802) and this map has nevercarried an
object-kanbanentry, so the family has no entry at all. That is a key-setquestion, and adding one would widen
ComponentType— a ruling, not an implementationchoice. Named here, not touched.
comment carries several. AGENTS.md [WIP] Update documentation for project #11 invites opportunistic repair when you are in a
file anyway, while this card's constraint is one docblock and prose only. The conflict
is surfaced rather than resolved silently; the line-citation gate is differential and
this branch adds none, so it reads 0.
second diverging key is claimed — finding one would require exactly the sweep this card
excludes.
publish quoted the new docblock two lines short, so the quotation ended mid-sentence —
precisely the defect class this card is about. Editing a PR body downgrades or duplicates
the attribution footer (AGENTS.md, the body-bytes section), so the session reference is
stated here in prose as well:
session_012EpHzwH4wTy5sd7ibkD2yq.Generated by Claude Code
Generated by Claude Code