Skip to content

Commit a23b07c

Browse files
committed
test(spec): pin DatasetTermCandidate as an isomorphic alias (ADR-0122)
`check:spec-parsed-alias` refuses a bare `z.input` alias that is neither pinned nor paired with an `XParsed`. The candidate entry is a plain object of strings with no default and no transform, so it takes a pin: 857 -> 858. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzfR33NbV51QQU6R6bm
1 parent dd3e1c1 commit a23b07c

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

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

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ import type * as M204 from './ai/dataset-tools.zod.js';
304304
import type * as M205 from './ai/object-query-source.zod.js';
305305

306306
// ---------------------------------------------------------------------------
307-
// 857 isomorphic aliases: `z.input` === `z.infer`, so no `XParsed` is declared.
307+
// 858 isomorphic aliases: `z.input` === `z.infer`, so no `XParsed` is declared.
308308
//
309309
// That number is machine-checked, not hand-kept. The runtime companion at the
310310
// bottom of this file recomputes the pin count from the source and asserts that
@@ -383,6 +383,7 @@ export type Iso_ai_conversation__TokenBudgetStrategySchema = Assert<Eq< z.input<
383383

384384
// ai/dataset-tools.zod.ts -- [ADR-0149 D2] plain objects, enums and literals, no default and no transform
385385
export type Iso_ai_datasetTools__DatasetProvenanceSchema = Assert<Eq< z.input< typeof M204.DatasetProvenanceSchema >, z.infer< typeof M204.DatasetProvenanceSchema > >>;
386+
export type Iso_ai_datasetTools__DatasetTermCandidateSchema = Assert<Eq< z.input< typeof M204.DatasetTermCandidateSchema >, z.infer< typeof M204.DatasetTermCandidateSchema > >>;
386387
export type Iso_ai_datasetTools__DatasetTermMatchSchema = Assert<Eq< z.input< typeof M204.DatasetTermMatchSchema >, z.infer< typeof M204.DatasetTermMatchSchema > >>;
387388
export type Iso_ai_datasetTools__DatasetTermMatchedOn = Assert<Eq< z.input< typeof M204.DatasetTermMatchedOn >, z.infer< typeof M204.DatasetTermMatchedOn > >>;
388389
export type Iso_ai_datasetTools__DatasetToolCatalogDimensionSchema = Assert<Eq< z.input< typeof M204.DatasetToolCatalogDimensionSchema >, z.infer< typeof M204.DatasetToolCatalogDimensionSchema > >>;
@@ -1832,7 +1833,7 @@ describe('ADR-0122 type-alias convention', () => {
18321833
// this title and the section header above the pin list — are now asserted
18331834
// against the recomputed count below, so neither can go stale without a red
18341835
// test naming it.
1835-
it('still declares all 857 isomorphic pins', () => {
1836+
it('still declares all 858 isomorphic pins', () => {
18361837
// The truth of each pin is proved by tsc, not here — an `Assert<Eq<...>>`
18371838
// that stops holding is a compile error with the alias named. What tsc
18381839
// cannot notice is a pin that was DELETED: removing the assertion removes
@@ -2909,7 +2910,13 @@ describe('ADR-0122 type-alias convention', () => {
29092910
// (`data/hook.zod.ts`), closed at `message` / `params` with no default or
29102911
// transform, pinned here (Iso_data_hook__HookTextSchema) beside its
29112912
// refusal sibling rather than given a `…Parsed` synonym. +1 added.
2912-
expect(pins).toHaveLength(857);
2913+
// 857 -> 858 is the ADR-0149 D3 amendment note's candidate entry
2914+
// (`ai/dataset-tools.zod.ts` `DatasetTermCandidateSchema`): a plain object
2915+
// of two strings and one regex string, no default and no transform
2916+
// (Iso_ai_datasetTools__DatasetTermCandidateSchema). +1 added. The
2917+
// `candidates` list it fills on `ListDatasetsOutputSchema` is an optional
2918+
// array of that object, so that schema's own pin still holds.
2919+
expect(pins).toHaveLength(858);
29132920

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

0 commit comments

Comments
 (0)