Skip to content

Commit 634fe6b

Browse files
committed
test(spec): pin the duration schema and unit enum as isomorphic (ADR-0122)
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AKPixnkg91qCkQCVFDJuqW
1 parent 78be554 commit 634fe6b

1 file changed

Lines changed: 14 additions & 3 deletions

File tree

‎packages/spec/src/type-alias-convention.pin.test.ts‎

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ import type * as M190 from './kernel/execution-context.zod.js';
279279
import type * as M191 from './automation/api-trigger-secret-ref.zod.js';
280280

281281
// ---------------------------------------------------------------------------
282-
// 790 isomorphic aliases: `z.input` === `z.infer`, so no `XParsed` is declared.
282+
// 792 isomorphic aliases: `z.input` === `z.infer`, so no `XParsed` is declared.
283283
//
284284
// That number is machine-checked, not hand-kept. The runtime companion at the
285285
// bottom of this file recomputes the pin count from the source and asserts that
@@ -1548,6 +1548,10 @@ export type Iso_ui_dashboard__WidgetColorVariantSchema = Assert<Eq< z.input< typ
15481548

15491549
// ui/dataset.zod.ts
15501550
export type Iso_ui_dataset__DatasetDimensionSchema = Assert<Eq< z.input< typeof M160.DatasetDimensionSchema >, z.infer< typeof M160.DatasetDimensionSchema > >>;
1551+
// [#25778] The duration measure's `{ from, to, unit }` and its unit enum: two
1552+
// bare names and an enum, no default, transform, catch or pipe.
1553+
export type Iso_ui_dataset__DatasetDurationUnit = Assert<Eq< z.input< typeof M160.DatasetDurationUnit >, z.infer< typeof M160.DatasetDurationUnit > >>;
1554+
export type Iso_ui_dataset__DatasetMeasureDurationSchema = Assert<Eq< z.input< typeof M160.DatasetMeasureDurationSchema >, z.infer< typeof M160.DatasetMeasureDurationSchema > >>;
15511555
export type Iso_ui_dataset__DatasetMeasureSchema = Assert<Eq< z.input< typeof M160.DatasetMeasureSchema >, z.infer< typeof M160.DatasetMeasureSchema > >>;
15521556
export type Iso_ui_dataset__DatasetSchema = Assert<Eq< z.input< typeof M160.DatasetSchema >, z.infer< typeof M160.DatasetSchema > >>;
15531557
export type Iso_ui_dataset__DerivedMeasureOp = Assert<Eq< z.input< typeof M160.DerivedMeasureOp >, z.infer< typeof M160.DerivedMeasureOp > >>;
@@ -1708,7 +1712,7 @@ describe('ADR-0122 type-alias convention', () => {
17081712
// this title and the section header above the pin list — are now asserted
17091713
// against the recomputed count below, so neither can go stale without a red
17101714
// test naming it.
1711-
it('still declares all 790 isomorphic pins', () => {
1715+
it('still declares all 792 isomorphic pins', () => {
17121716
// The truth of each pin is proved by tsc, not here — an `Assert<Eq<...>>`
17131717
// that stops holding is a compile error with the alias named. What tsc
17141718
// cannot notice is a pin that was DELETED: removing the assertion removes
@@ -2573,7 +2577,14 @@ describe('ADR-0122 type-alias convention', () => {
25732577
// start node gives its hook secret — a plain string, so it is pinned here
25742578
// (Iso_automation_apiTriggerSecretRef__ApiTriggerSecretRefSchema) rather
25752579
// than given a `…Parsed` synonym. +1 added.
2576-
expect(pins).toHaveLength(790);
2580+
//
2581+
// 790 -> 792 is #25778: the dataset duration measure's
2582+
// `DatasetMeasureDurationSchema` (`{ from, to, unit }`, two bare names and
2583+
// an enum) and its `DatasetDurationUnit` enum, pinned here
2584+
// (Iso_ui_dataset__DatasetMeasureDurationSchema,
2585+
// Iso_ui_dataset__DatasetDurationUnit) rather than given `…Parsed`
2586+
// synonyms. +2 added.
2587+
expect(pins).toHaveLength(792);
25772588

25782589
// The count is stated in PROSE twice as well — this case's title and the
25792590
// section header above the pin list — and until commit c6b05c76a nothing read either

0 commit comments

Comments
 (0)