Commit 73580e7
`<ObjectChart aggregate={{…}}>` was judged by a gate that RE-DERIVED its
schema: a local `CHART_FUNCTIONS` copy of the function vocabulary and a
hand-written twin of the count/field refinement. Two implementations of one
contract, free to drift — and since unknown-key handling is a property of a
PARSE rather than of a list of `if`s, a gate with no unknown-key check at all.
`validate-react-page-props` now calls `ChartAggregateSchema.safeParse()` on a
statically resolvable literal, exactly as #5022 did for `ChartDrillDownSchema`
one prop over, and both hand-derived copies are deleted. Newly reported, all
previously silent: a missing `function`, a non-string `field`, a present-but-
wrong `groupBy`, a non-object `aggregate`. Two messages are re-worded because
they now come from the schema (FROM/TO in the changeset).
zod 4 collapses a union's arm failures into one `invalid_union` whose message is
the bare "Invalid input", so the arms are unpacked into the finding — otherwise
`groupBy` rejections would say nothing an author can act on, and the same
collapse will hide #5583's strict `unrecognized_keys`.
An absent `groupBy` reports at `warning`, alone among the graded violations:
the schema and the published react-blocks type declare it required while
objectui's `ObjectChart` honours its absence (`|| schema.xAxisKey`) and
`chartAggregateCategoryKey` documents the ungrouped single-row result. Gating it
would enforce a declaration the platform does not itself keep; #5583 decides
which side moves.
The unknown-key hole is NOT closed by this commit and is pinned open on
purpose: both schemas are still STRIP, so the parse drops `groupby` /
`dateGranularty` instead of reporting them. Wiring the parse is the
precondition, not the closing (#5583). Records updated in the three places the
strictness ledger requires: `chart.zod.ts` header prose (schema body untouched),
`chart.test.ts` pin comments (assertions unchanged — the posture did not move),
and the ledger's two `chart.zod.ts` rows `no gate` → `authorable` with the
counts artifact regenerated (`no gate` 31 → 29, `authorable` 11 → 13).
Claude-Session: https://claude.ai/code/session_01GX3sL71LFq8m2usg6VqTSE
Co-authored-by: Claude <noreply@anthropic.com>
1 parent a287d1c commit 73580e7
7 files changed
Lines changed: 622 additions & 54 deletions
File tree
- .changeset
- docs/audits
- packages
- lint/src
- spec/src/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 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
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 | | |
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
172 | | - | |
| 172 | + | |
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
176 | | - | |
| 176 | + | |
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
| |||
Large diffs are not rendered by default.
0 commit comments