Skip to content

Commit ff7c8cd

Browse files
committed
test(metadata-protocol): migrate the dashboard fixtures and pin the four new unauthorable columns
The publish-gate and runtime-gate boards authored `chartConfig.type` / `.xAxis` / `.yAxis` / `.series`, which the parse door now refuses. They keep an APPEARANCE `chartConfig` rather than dropping the key, so the fixtures still exercise it. The #17502 unauthorable-columns pin gains the four tombstoned columns at the same depth as `chartConfig.aria`. Claude-Session: https://claude.ai/code/session_01LvwGppdonww4zGLWZo5rho Co-authored-by: Claude <noreply@anthropic.com>
1 parent 33fc0ca commit ff7c8cd

3 files changed

Lines changed: 37 additions & 10 deletions

File tree

‎packages/metadata-protocol/src/protocol.dashboard-dataset-publish-gate.test.ts‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,15 @@ const legitBoard = () => ({
8383
dataset: 'orders_ds',
8484
dimensions: ['status'],
8585
values: ['order_count'],
86-
chartConfig: { type: 'bar', xAxis: { field: 'status' }, yAxis: [{ field: 'order_count' }] },
86+
// ⚠️ The `chartConfig` on these two widgets carried `type` / `xAxis` /
87+
// `yAxis` / `series`, which are refused on a dataset-bound widget since the
88+
// chart-structure ownership ruling (ADR-0021; 2026-09-12): the dataset
89+
// decides which series exist and which column each one reads. The board is
90+
// still a legitimate three-widget board — the bindings it used to restate
91+
// are the `dimensions` / `values` on the very same widgets — so the fixture
92+
// keeps an APPEARANCE `chartConfig` rather than dropping the key, which is
93+
// what keeps this fixture exercising the key at all.
94+
chartConfig: { title: 'By Status', showLegend: false },
8795
},
8896
{
8997
id: 'by_region',
@@ -92,7 +100,7 @@ const legitBoard = () => ({
92100
dataset: 'orders_ds',
93101
dimensions: ['region'],
94102
values: ['order_count'],
95-
chartConfig: { type: 'donut', series: [{ name: 'order_count' }] },
103+
chartConfig: { title: 'By Region' },
96104
},
97105
],
98106
});

‎packages/metadata-protocol/src/protocol.meta-types-unauthorable-columns.test.ts‎

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -280,18 +280,29 @@ describe('#17502 — the served repeater row offers no column the parse door ref
280280
expect(overDropped).toEqual([]);
281281

282282
// Non-vacuity: without this the two assertions above pass over a ledger
283-
// that read nothing at all. `dashboard` is the type that exercises both
284-
// depths — the five repeater-row columns pinned above, and three
285-
// top-level tombstones — so the ledger is proven to reach a row shape
286-
// and not only the surface. Sorted, so key ORDER is not what is pinned.
283+
// that read nothing at all. `dashboard` is the type that exercises every
284+
// depth — the five repeater-row columns pinned above, three top-level
285+
// tombstones, and FIVE inside the widget's own `chartConfig` — so the
286+
// ledger is proven to reach a row shape and not only the surface.
287+
// Sorted, so key ORDER is not what is pinned.
287288
expect([...(removedByType.get('dashboard') ?? [])].sort()).toEqual([
288289
...RETIRED_WIDGET_COLUMNS.map((k) => `dashboard.properties.widgets.items.properties.${k}`),
289290
'dashboard.properties.refreshInterval',
290291
'dashboard.properties.aria',
291292
'dashboard.properties.performance',
292-
// [#17751, arrived with main] `ChartConfigSchema.aria` retired one
293-
// level deeper than the widget row, inside `chartConfig`.
293+
// [#17751] `ChartConfigSchema.aria` retired one level deeper than the
294+
// widget row, inside `chartConfig`.
294295
'dashboard.properties.widgets.items.properties.chartConfig.properties.aria',
296+
// [#17385] The four STRUCTURE keys, tombstoned on the widget's own
297+
// `chartConfig` carrier (`DashboardWidgetChartConfigSchema`) when the
298+
// ownership ruling landed: on a dataset-bound widget the dataset
299+
// decides which series exist and which column each one reads
300+
// (ADR-0021; 2026-09-12). Same depth as `aria` above, and the same
301+
// reason for being here — a `retiredKey()` keeps the key in the
302+
// walked shape, so the served payload must drop the column.
303+
...['type', 'xAxis', 'yAxis', 'series'].map(
304+
(k) => `dashboard.properties.widgets.items.properties.chartConfig.properties.${k}`,
305+
),
295306
].sort());
296307
});
297308

‎packages/metadata-protocol/src/protocol.runtime-gate-stored-universe.test.ts‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,20 @@ const threeWidgetBoard = (dataset: string) => ({
121121
{
122122
id: 'by_status', type: 'bar', title: 'By status', dataset,
123123
dimensions: ['status'], values: ['order_count'],
124-
chartConfig: { type: 'bar', xAxis: { field: 'status' }, yAxis: [{ field: 'order_count' }] },
124+
// ⚠️ The `chartConfig` on these two widgets carried `type` / `xAxis` /
125+
// `yAxis` / `series`, which are refused on a dataset-bound widget since the
126+
// chart-structure ownership ruling (ADR-0021; 2026-09-12): the dataset
127+
// decides which series exist and which column each one reads. The board is
128+
// still a legitimate three-widget board — the bindings it used to restate
129+
// are the `dimensions` / `values` on the very same widgets — so the fixture
130+
// keeps an APPEARANCE `chartConfig` rather than dropping the key, which is
131+
// what keeps this fixture exercising the key at all.
132+
chartConfig: { title: 'By status', showLegend: false },
125133
},
126134
{
127135
id: 'by_region', type: 'donut', title: 'By region', dataset,
128136
dimensions: ['region'], values: ['order_count'],
129-
chartConfig: { type: 'donut', series: [{ name: 'order_count' }] },
137+
chartConfig: { title: 'By region' },
130138
},
131139
],
132140
});

0 commit comments

Comments
 (0)