Repository navigation
Commit 775e079
feat(types)!: refuse both content channels on the E3 residual (nine object views, detail-view, email, password) and repair the shorthand Omit erasure (objectui#9256) (#10897)
Part of #9256
Clause-②: yes
**Clause-② `yes`, as the claim declared:** twelve published arms stop
accepting an authored `children`, and two published TypeScript faces
stop erasing the members they inherit. Both narrow an accept set; a
contract review is owed before landing.
The E3 residual that the maintainer's ruling on objectui#8284 (comment
`5861449497`, Q2 A) moved onto this card: keys with a published arm
whose renderer reads **neither** content channel. It also carries the
ruling's execution parameter 3, the `InputShorthandSchema` /
`UiCalendarSchema` TypeScript `Omit` erasure. objectui#9256 stays open
for the rest of family D.
## What changed
- **Narrowed (12 keys):** `object-grid`, `object-form`, `object-kanban`,
`object-map`, `object-tree`, `object-view`, `object-gantt`,
`object-calendar`, `object-chart`, `detail-view`, `email`, `password`.
- TypeScript face: `body?: never` and `children?: never`, each with a
docblock naming what the node renders instead.
- zod mirror: `body` and `children` are two `retirementTombstone`
members fed ONE string from the new `neitherContentChannelGuidance`
builder in `zod/tombstone.zod.ts`. Both stay MEMBERS, so
`zod-mirror-parity`'s key sets stay equal.
- `body` was already refused on these arms (by `BaseSchema`,
objectui#6771), except on the `email` / `password` TypeScript face,
which the `Omit` erased. It is restated because `BaseSchema`'s refusal
names `children` as the remedy, and `children` is dead here too.
- **`Omit` erasure repaired:** `InputShorthandSchema` and
`UiCalendarSchema` now inherit through `OmitDeclared` (`form.ts`, not
exported). It is a key-remapping mapped type: it drops exactly the named
keys and keeps every other named member and the index signature.
- `ui:calendar` gains no refusal of its own. Its face now re-exposes
what `CalendarSchema` declares, so the published TypeScript face refuses
`body`, `children` and a `mode` outside the declared enum, which the
erased face accepted. Its mirror (a `.extend()` of that one) already
refused them.
- I measured the `ui:calendar` renderer anyway
(`renderers/form/calendar.tsx`, typed `CalendarSchema`). It reads
`defaultValue`, `mode` and `value`, and no channel.
- **Held (3 keys): `br`, `hr`, `img`.** See "Held, and the question it
leaves" below.
## Per-key measurement, taken on `origin/main` `0c50f1863` before any
edit
**Instrument.** The TypeScript compiler API, ⛔ not grep. It builds one
program per workspace package from that package's own `tsconfig.json`:
40 programs over 1573 source files, on a BUILT tree (turbo build 42/42
first), with `@object-ui/types` resolving to `packages/types/dist`. It
files every `.body` / `.children` read (property access, string element
access, object destructuring) under the declared type of its receiver.
- 547 channel reads were filed.
- **Lit controls fire:** `ButtonSchema` 1, `DivSchema` 1, `CardSchema`
1, `ContainerSchema` 1 (each `children`).
- **Receiver-reachability control:** the same program sees every
narrowed declaration as a receiver of the keys its renderer reads. The
zeros below are readings, not blindness.
| key | registration(s) claiming it | registration hop → reader, and the
type it reads the node as | `body` / `children` reads under that type |
receiver reads (reachability) | arm, TS face: before → after | arm, zod
face: before → after | disposition |
|---|---|---|---|---|---|---|---|
| `object-grid` | `plugin-grid:object-grid` (+ console `registerLazy` of
the same plugin) | `ObjectGridRenderer` (`any`) → `ObjectGrid` ·
`ObjectGridSchema` | 0 / 0 | 158 reads, 38 keys | body refused
(BaseSchema), children accepted → both refused | same → both refused by
name | narrowed |
| `object-form` | `plugin-form:object-form` | `ObjectFormRenderer`
(`any`) → `ObjectForm` · `ObjectFormSchema` | 0 / 0 | 200 / 44 | same |
same | narrowed |
| `object-kanban` | `plugin-kanban:object-kanban` (+ lazy) |
`ObjectKanbanRenderer` (`any`) → `ObjectKanban` · `ObjectKanbanSchema` |
0 / 0 | 67 / 13 | same | same | narrowed |
| `object-map` | `plugin-map:object-map` (+ lazy) | `ObjectMapRenderer`
(`any`) → `ObjectMap` · `ObjectMapSchema` | 0 / 0 | 30 / 16 | same |
same | narrowed |
| `object-tree` | `plugin-tree:object-tree` (+ lazy) |
`ObjectTreeRenderer` (`any`) → `ObjectTree` · `ObjectTreeSchema` | 0 / 0
| 13 / 8 | same | same | narrowed |
| `object-view` | `plugin-view:object-view` (and the `view` alias) |
`ObjectViewRenderer` (`any`) → `ObjectView` · `ObjectViewSchema` | 0 / 0
| 112 / 19 | same | same | narrowed |
| `object-gantt` | `plugin-gantt:object-gantt` (+ lazy) |
`ObjectGanttRenderer` (`any`) → `ObjectGantt` · `ObjectGanttSchema` | 0
/ 0 | 61 / 48 | same | same | narrowed |
| `object-calendar` | `plugin-calendar:object-calendar` (+ lazy) |
`ObjectCalendarRenderer` (`any`) → `ObjectCalendar` ·
`ObjectCalendarSchema` | 0 / 0 | 40 / 12 | same | same | narrowed |
| `object-chart` | `plugin-charts:object-chart` (+ lazy) |
`ObjectChartBlock` (`any`) → `ObjectChart` · `ObjectChartSchema` | 0 / 0
| 123 / 15 | same | same | narrowed |
| `detail-view` | `plugin-detail:detail-view` | `DetailViewRenderer`
(`any`) → `DetailView` · `DetailViewSchema` | 0 / 0 | 195 / 31 | same |
same | narrowed |
| `email` | `ui:email` (`field:email` stands down) | `any` wrapper
spreads the node into `InputRenderer` · `InputSchema` | 0 / 0 | 23 / 17
| BOTH accepted (erased `Omit`) → both refused | body refused, children
accepted → both refused by name | narrowed |
| `password` | `ui:password` (`field:password` stands down) | same as
`email` | 0 / 0 | 23 / 17 | same as `email` | same as `email` | narrowed
|
| `br` | `ui:br` | html-elements factory (`any`), void tag: passes
`undefined` as the child | reads neither (the one `schema?.children`
read is behind the void-tag guard) | n/a (`any`) | body refused,
children accepted (family arm) → unchanged | same → unchanged | **held**
|
| `hr` | `ui:hr` | same | same | n/a | same | same | **held** |
| `img` | `ui:img` | same | same | n/a | same | same | **held** |
The residual count stays 15: no key reads `children` today. 12 are
narrowed and 3 are held.
**`any`-typed receivers, attributed rather than assumed.**
- Every hop above is `any`-typed. Each hop body was read: none contains
a channel read.
- The any-typed reads in the eleven hosting files and packages were
attributed one by one:
- React `children` destructured off internal components' own props
(`SchemaRenderer` passes no node child as a React child);
- `document.body` and `err.body`;
- `TreeNode.children` on the record hierarchy `ObjectTree` builds;
- `FeedItem.body`;
- `record:alert`'s own `props.body`, which is another registration.
- The html factory's `schema?.children` read sits behind `isVoid ?
undefined : …`.
**Delegation hosts, checked for pass-through.** Every `SchemaRenderer`
call in the ten object/detail packages was traced. The node it renders
is built one of three ways:
- key by key — `ObjectForm` / `ModalForm` / `DrawerForm` / `TabbedForm`
/ `SplitForm` / `WizardForm` all build their `form` node that way, and
the `form` renderer DOES draw `children`, which is why this was checked;
- from a sub-key — `DetailView`'s `header` / `footer` / tab `content`,
`ObjectChart`'s drill-down table;
- or from a generated `object-*` node — `ObjectView` assembles
`object-kanban`, `object-calendar`, `object-gallery`, `object-timeline`,
`object-gantt`, `object-map`, `object-tree` and `object-chart` from
named keys, and every one of those reads neither channel (for gallery
and timeline: `packages/plugin-list` and `packages/plugin-timeline` hold
no node-channel read).
No host spreads its own node into a node that reads `children`.
**Generic traversers** (`validateChildren` in core, `sdui-parser`
`validateTree`, the metadata-admin preview canvases, the vscode
validator) walk children to validate or preview. They render nothing and
are node-agnostic, as for every row family D already holds.
**objectui#9910 cross-check.** None of the 12 narrowed registrations
declares a `children` slot input: a grep over their registration files
finds 0 hits, and the lit control is `html-elements.tsx` / `div.tsx`,
which do.
**Producers.** `pnpm census:body-dialect --keys` over the 15, plus
`ui:calendar` and `input`, with `div` / `card` / `page` / `button` / `p`
/ `h1` as lit controls in the same pass: 8981 files, 2744 candidate
nodes.
- **0** nodes author `children` on any of the 15.
- 1 node authors `body` on `ui:calendar`: it was the family-D TRIPWIRE
test line (test bucket), moved by this change.
- The controls read `div` 170 / `card` 183 / `page` 47 `children`.
- Producers derived: none. Nothing was migrated.
## The `Omit` repair — measured on the BUILT d.ts
A probe program under `packages/components` resolved `@object-ui/types`
to `packages/types/dist/index.d.ts` (`--traceResolution`). It carried 15
`@ts-expect-error` pins (the 10 object/detail `children`, `email`
`children`, `password` `body`, `email` `label: 42`, and the
`ui:calendar` `children` and `mode: 'default'`), a lit control (`const
n: number = 'x'`), and 12 channel-free controls.
- **On this branch:** exit 0 — every directive used, every control
compiles, the lit control fires.
- **On the base dist:** exit 2 with 15 × TS2578, and the lit control is
still used.
- The emitted `dist/form.d.ts` declares `OmitDeclared` locally and both
heritage clauses use it.
## Red on base, then green — one-shot, the restore proven by state
The predictions were written to a file BEFORE the mutation. The mutation
was `git checkout 0c50f18 -- THE-SEVEN-DECLARATION-FILES`, with every
test file at HEAD. It was proven by 7/7 blob hashes equal to BASE plus
anchor counts (`neitherContentChannel` 0, `OmitDeclared` 0). The run sat
under `trap … EXIT INT TERM` with absolute paths.
| reader | mutated (BASE arms) | restored (HEAD `14fd13c51`) |
|---|---|---|
| vitest, the new pin file | **RED** exit 1 — 73 failed / 90 passed;
exactly the predicted 12 × 5 `children` families + 12 `body`-message
rows + 1 nested row | **GREEN** 163 / 163 |
| `tsc -p packages/types/tsconfig.test.json` | **RED** exit 2 — 18 ×
TS2578 and 3 × TS2322 (the `Eq` pins) in the new file, plus 3 in
`zod-mirror-parity` naming the two re-collapsed pairs and the stale
`KnownDrift` row; 0 elsewhere | **GREEN** exit 0 |
| built-d.ts probe (types rebuilt; dist markers 0 → 29 / 6) | **RED**
exit 2, 15 × TS2578 | **GREEN** exit 0 |
The restore was proven by 7/7 blob hashes equal to HEAD, `git diff HEAD`
empty and `git status` clean, both after the restore and at the end.
1 parent 6a7f24e commit 775e079
14 files changed
Lines changed: 1051 additions & 151 deletions
File tree
- .changeset
- packages/types/src
- __tests__
- zod
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
Lines changed: 333 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 7 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
224 | | - | |
| 224 | + | |
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
| |||
565 | 565 | | |
566 | 566 | | |
567 | 567 | | |
568 | | - | |
569 | | - | |
570 | | - | |
571 | | - | |
572 | | - | |
573 | | - | |
574 | | - | |
575 | | - | |
576 | | - | |
577 | | - | |
578 | | - | |
579 | | - | |
580 | | - | |
581 | | - | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
582 | 573 | | |
583 | 574 | | |
584 | 575 | | |
585 | 576 | | |
586 | 577 | | |
587 | 578 | | |
588 | 579 | | |
589 | | - | |
590 | 580 | | |
591 | | - | |
| 581 | + | |
592 | 582 | | |
593 | 583 | | |
594 | 584 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
272 | | - | |
| 272 | + | |
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
| |||
Lines changed: 19 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
332 | 339 | | |
333 | 340 | | |
334 | 341 | | |
| |||
385 | 392 | | |
386 | 393 | | |
387 | 394 | | |
388 | | - | |
389 | | - | |
| 395 | + | |
| 396 | + | |
390 | 397 | | |
391 | | - | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
392 | 402 | | |
393 | 403 | | |
394 | 404 | | |
| |||
423 | 433 | | |
424 | 434 | | |
425 | 435 | | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
426 | 441 | | |
427 | | - | |
| 442 | + | |
428 | 443 | | |
429 | 444 | | |
430 | 445 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | | - | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
158 | 163 | | |
159 | 164 | | |
160 | 165 | | |
| |||
674 | 679 | | |
675 | 680 | | |
676 | 681 | | |
677 | | - | |
| 682 | + | |
678 | 683 | | |
679 | 684 | | |
680 | 685 | | |
| |||
2220 | 2225 | | |
2221 | 2226 | | |
2222 | 2227 | | |
| 2228 | + | |
| 2229 | + | |
| 2230 | + | |
| 2231 | + | |
| 2232 | + | |
| 2233 | + | |
| 2234 | + | |
2223 | 2235 | | |
2224 | 2236 | | |
2225 | 2237 | | |
| |||
3651 | 3663 | | |
3652 | 3664 | | |
3653 | 3665 | | |
3654 | | - | |
| 3666 | + | |
3655 | 3667 | | |
3656 | 3668 | | |
3657 | 3669 | | |
| |||
3669 | 3681 | | |
3670 | 3682 | | |
3671 | 3683 | | |
| 3684 | + | |
| 3685 | + | |
| 3686 | + | |
| 3687 | + | |
| 3688 | + | |
| 3689 | + | |
| 3690 | + | |
| 3691 | + | |
| 3692 | + | |
| 3693 | + | |
3672 | 3694 | | |
3673 | 3695 | | |
3674 | 3696 | | |
| |||
3699 | 3721 | | |
3700 | 3722 | | |
3701 | 3723 | | |
3702 | | - | |
3703 | | - | |
3704 | | - | |
3705 | | - | |
3706 | | - | |
3707 | | - | |
3708 | | - | |
3709 | | - | |
3710 | | - | |
3711 | | - | |
3712 | | - | |
| 3724 | + | |
| 3725 | + | |
| 3726 | + | |
| 3727 | + | |
| 3728 | + | |
| 3729 | + | |
| 3730 | + | |
| 3731 | + | |
| 3732 | + | |
| 3733 | + | |
| 3734 | + | |
3713 | 3735 | | |
3714 | 3736 | | |
3715 | 3737 | | |
| |||
3742 | 3764 | | |
3743 | 3765 | | |
3744 | 3766 | | |
3745 | | - | |
3746 | | - | |
3747 | | - | |
3748 | | - | |
3749 | | - | |
3750 | | - | |
3751 | | - | |
3752 | | - | |
3753 | | - | |
3754 | | - | |
3755 | | - | |
3756 | | - | |
3757 | | - | |
3758 | | - | |
3759 | | - | |
3760 | | - | |
3761 | | - | |
3762 | | - | |
3763 | | - | |
3764 | | - | |
3765 | | - | |
3766 | | - | |
3767 | | - | |
3768 | | - | |
3769 | | - | |
3770 | | - | |
3771 | | - | |
3772 | | - | |
3773 | | - | |
3774 | | - | |
3775 | | - | |
3776 | | - | |
3777 | | - | |
3778 | | - | |
3779 | | - | |
3780 | | - | |
3781 | | - | |
3782 | | - | |
3783 | | - | |
3784 | | - | |
3785 | | - | |
3786 | | - | |
3787 | | - | |
3788 | | - | |
| 3767 | + | |
| 3768 | + | |
| 3769 | + | |
| 3770 | + | |
| 3771 | + | |
| 3772 | + | |
| 3773 | + | |
| 3774 | + | |
3789 | 3775 | | |
3790 | | - | |
3791 | | - | |
3792 | | - | |
3793 | | - | |
3794 | | - | |
3795 | | - | |
3796 | | - | |
3797 | | - | |
3798 | | - | |
3799 | | - | |
3800 | | - | |
3801 | | - | |
3802 | | - | |
3803 | | - | |
3804 | | - | |
3805 | | - | |
3806 | | - | |
3807 | | - | |
3808 | | - | |
3809 | | - | |
3810 | | - | |
3811 | | - | |
3812 | | - | |
3813 | | - | |
3814 | | - | |
3815 | | - | |
3816 | | - | |
3817 | | - | |
3818 | | - | |
3819 | | - | |
3820 | | - | |
3821 | | - | |
3822 | | - | |
3823 | | - | |
3824 | 3776 | | |
3825 | 3777 | | |
3826 | 3778 | | |
| |||
5678 | 5630 | | |
5679 | 5631 | | |
5680 | 5632 | | |
5681 | | - | |
5682 | | - | |
| 5633 | + | |
| 5634 | + | |
| 5635 | + | |
| 5636 | + | |
| 5637 | + | |
| 5638 | + | |
| 5639 | + | |
| 5640 | + | |
| 5641 | + | |
| 5642 | + | |
| 5643 | + | |
5683 | 5644 | | |
5684 | 5645 | | |
5685 | 5646 | | |
| |||
0 commit comments