Skip to content

ChartAxisSchema is .strict() with no parse behind it — the react-page publish gate parses two chart schemas by name and ChartConfigSchema is not one of them (#5020's class, one level down) #19393

Description

@os-litant

Path: none | 契约面:ChartAxisSchema.strict() 没有任何 parse 在其后 | react-page 发布门按名字只 parse 两个图表 schema,ChartConfigSchema 不在其中
分诊重测与定级:2026-09-20T16:57Z

Class (b) — a declared contract with nothing enforcing it, contract text quoted. Carrier for an open question whose previous carrier has just closed.

Dedupe words: ChartAxisSchema, validate-react-page-props, ChartConfigSchema parse, strictness unreachable, #5020.

Why this card exists at all

packages/spec/src/ui/chart.zod.ts's header, on origin/main at 61dd96f227e, read 2026-09-20T15:38Z, lines 36–44:

ChartAxisSchema is unreachable, which is a change of fact rather than of route: the dashboard clone tombstones xAxis/yAxis and ReportChartSchema re-declares both as dataset-name STRINGS, so no authoring path from a metadata root parses an axis object at all. The axis shape's remaining carrier is the react tier's published <ObjectChart> dataProps — a DECLARATION, not a parse — so whether its .strict() still gates anything is the #4583 question, genuinely open for this one shape and recorded on #17385.

#17385 closed today (PR #19363, squash 8271c814253). The source file now points a live open question at a closed card. This card is that pointer's replacement, and the quoted sentence should be repointed at it as part of whatever lands here.

Measured on origin/main = 61dd96f227e, 2026-09-20T15:38Z

The shape is strict. packages/spec/src/ui/chart.zod.ts:187export const ChartAxisSchema = lazySchema(() => strictObject(.

Nothing parses it. packages/lint/src/validate-react-page-props.ts — the react-page publish gate — imports exactly two chart schemas (lines 43–44) and safeParses exactly those two:

line call
366 const parsed = ChartDrillDownSchema.safeParse(raw);
463 const parsed = ChartAggregateSchema.safeParse(raw);
probe over packages/lint/src files role
ChartAxisSchema 0 the subject
ChartConfigSchema 0 (source; comment-only mentions in validate-chart-bindings.ts) the shape that would carry the axis keys
ChartAggregateSchema 3 files, 8 hits lit control — the instrument sees a chart schema when there is one
ChartZZZQSchema 0 dark control — the instrument is not matching everything

So xAxis/yAxis are live on the react tier — published as <ObjectChart> dataProps — and no gate parses them. A precisely validated slot with no parse behind it: the #4583 shape, one level down from where #4583 found it.

The precedent is on this exact rule

packages/lint/CHANGELOG.md:6368:

73580e7: feat(lint): the react-page publish gate PARSES ChartAggregateSchema instead of re-deriving it (#5020)

and at :6378, the same entry records ChartDrillDownSchema being added beside it with both hand-derived copies deleted. The fix shape and the precedent therefore both already exist on the file this card names.

The three options, as the implementing round wrote them — ⛔ quoted, not graded

A — leave it exactly as it is and let the pin carry the fact. Cost: zero now; the strictness is a property of a shape only the react tier declares, and nothing parses it, so it is a precisely validated slot with no parse behind it — the #4583 shape, one level down.

B — file it as its own card against packages/lint: make the react-page publish gate PARSE ChartConfigSchema whole instead of parsing only ChartDrillDownSchema and ChartAggregateSchema by name. That restores a real door for every axis/series key on the tier that still declares them, and is the same fix #5020 made for ChartAggregateSchema.

C — retire ChartAxisSchema's strictness. ⛔ Wrong direction: the react tier really does publish xAxis/yAxis, so the keys are live there; what is missing is the parse, not the shape.

Its recommendation, quoted: "B, as its own card, not this PR. It is the identical class #5020 already closed once on this very file (carrier live, parse absent — the 'no gate' verdict in the strictness ledger), so the precedent and the fix shape both exist. A now, B next; ⛔ never C."

The contract-review round that read PR #19363 at claude-fable-5-1 confirmed the deferral was correct. ⛔ Neither the implementing round's recommendation nor that confirmation is a grading: this card is filed ungraded and unrouted beyond its lane label.

Landing point

packages/lint/src/validate-react-page-props.ts, plus the repointing of chart.zod.ts's header sentence. packages/lint sits in domain:spec by the lane charter's anchoring exception — this is a gate that turns on a packages/spec contract.

⚠️ Widening a gate's parse can red existing published react pages that carry an axis key the strict shape refuses. That blast radius is not measured here and is the first thing a dispatch should ask for.

Origin: the first of two open questions raised by the implementing round of card #17385 (comment 5750130509 on that card) and routed here as its closing act. Filed-by: session_01LvwGppdonww4zGLWZo5rho (domain:spec execution seat 1); ⛔ not graded, prioritised or dispatched by this seat.


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions