Commit a85a124
committed
feat(lint,spec): dispatch ComponentPropsMap by
`PageComponent.properties` is `z.record(z.string(), z.unknown())`, and
ADR-0089 D3a strictness does not recurse into it, so the 31 typed prop
schemas in `ComponentPropsMap` were parsed by nothing (#4001 batch 17's
`no gate` verdict). objectui's SchemaRenderer hoists the bag and spreads
every key it carries, so a misspelled prop is neither rejected nor
dropped — it reaches the renderer and is ignored there.
New advisory rule `validate-component-props` (packages/lint), wired into
the shared authoring registry so `os validate` / `os build` / `os lint`
all run it. It dispatches on the component's `type` and emits two ids:
`component-props-unknown-key` (via the spec's own authoring-key walker,
newly exported as `lintUnknownKeysAgainstSchema` so the posture rules are
not re-derived) and `component-props-invalid` (via `safeParse`). A strict
props schema routes its `unrecognized_keys` to the first id, so a future
`strictObject` batch moves coverage between the halves without moving it
out of the author's view.
Unregistered `type`s are skipped: `type` is an open union and the example
corpus alone authors 87 nodes of ten types this map does not carry.
Warning-level only, deliberately. The live corpus violates the
declarations in 52 places, 42 of which are open contract questions
(#5728's inline i18n label maps, #5775's declared-but-unread record-picker
props), so gating today would fail the platform's own pages. The
inventory is the acceptance baseline for the error upgrade.
`component.zod.ts` moves `no gate` -> `authorable` in the strictness
ledger. The carrier itself is unchanged (direction B declined), so
`component.test.ts`'s three standing assertions stay green — measured,
and their prose updated to say which dispatch landed.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018fxLGQdatPbBUvCgiVxg6Dtype — the SDUI props bag gets its parse (#5068)1 parent 889ae47 commit a85a124
14 files changed
Lines changed: 906 additions & 133 deletions
File tree
- .changeset
- docs/audits
- packages
- lint/src
- spec
- src
- kernel
- ui
| 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 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
| 174 | + | |
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | | - | |
| 178 | + | |
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
| |||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| 108 | + | |
108 | 109 | | |
109 | 110 | | |
110 | 111 | | |
| |||
454 | 455 | | |
455 | 456 | | |
456 | 457 | | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
457 | 494 | | |
458 | 495 | | |
459 | 496 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
283 | 290 | | |
284 | 291 | | |
285 | 292 | | |
| |||
0 commit comments