Skip to content

Commit faf8acb

Browse files
committed
test(spec): pin the three new isomorphic hand-off aliases
Claude-Session: https://claude.ai/code/session_01JQwxbXghRkYmSR5dVh8PFG Co-authored-by: Claude <noreply@anthropic.com>
1 parent 4b54dad commit faf8acb

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

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

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ import type * as M197 from './api/push-delivery.zod.js';
289289
import type * as M198 from './system/push-device.zod.js';
290290

291291
// ---------------------------------------------------------------------------
292-
// 819 isomorphic aliases: `z.input` === `z.infer`, so no `XParsed` is declared.
292+
// 822 isomorphic aliases: `z.input` === `z.infer`, so no `XParsed` is declared.
293293
//
294294
// That number is machine-checked, not hand-kept. The runtime companion at the
295295
// bottom of this file recomputes the pin count from the source and asserts that
@@ -429,6 +429,8 @@ export type Iso_api_analytics__GetAnalyticsMetaRequestSchema = Assert<Eq< z.inpu
429429
export type Iso_api_authEndpoints__AuthEndpointSchema = Assert<Eq< z.input< typeof M12.AuthEndpointSchema >, z.infer< typeof M12.AuthEndpointSchema > >>;
430430
export type Iso_api_authEndpoints__DeviceTokenResponseSchema = Assert<Eq< z.input< typeof M12.DeviceTokenResponseSchema >, z.infer< typeof M12.DeviceTokenResponseSchema > >>;
431431
export type Iso_api_authEndpoints__EmailPasswordConfigPublicSchema = Assert<Eq< z.input< typeof M12.EmailPasswordConfigPublicSchema >, z.infer< typeof M12.EmailPasswordConfigPublicSchema > >>;
432+
export type Iso_api_authEndpoints__OneTimeTokenHandoffQuerySchema = Assert<Eq< z.input< typeof M12.OneTimeTokenHandoffQuerySchema >, z.infer< typeof M12.OneTimeTokenHandoffQuerySchema > >>;
433+
export type Iso_api_authEndpoints__OneTimeTokenVerifyRequestSchema = Assert<Eq< z.input< typeof M12.OneTimeTokenVerifyRequestSchema >, z.infer< typeof M12.OneTimeTokenVerifyRequestSchema > >>;
432434

433435
// api/auth.zod.ts
434436
export type Iso_api_auth__AuthProvider = Assert<Eq< z.input< typeof M13.AuthProvider >, z.infer< typeof M13.AuthProvider > >>;
@@ -1275,6 +1277,7 @@ export type Iso_system_authConfig__AuthProviderConfigSchema = Assert<Eq< z.input
12751277
export type Iso_system_authConfig__EmailVerificationConfigSchema = Assert<Eq< z.input< typeof M120.EmailVerificationConfigSchema >, z.infer< typeof M120.EmailVerificationConfigSchema > >>;
12761278
export type Iso_system_authConfig__OidcProviderConfigSchema = Assert<Eq< z.input< typeof M120.OidcProviderConfigSchema >, z.infer< typeof M120.OidcProviderConfigSchema > >>;
12771279
export type Iso_system_authConfig__OidcProvidersConfigSchema = Assert<Eq< z.input< typeof M120.OidcProvidersConfigSchema >, z.infer< typeof M120.OidcProvidersConfigSchema > >>;
1280+
export type Iso_system_authConfig__TrustedAppSchemeSchema = Assert<Eq< z.input< typeof M120.TrustedAppSchemeSchema >, z.infer< typeof M120.TrustedAppSchemeSchema > >>;
12781281

12791282
// system/cache.zod.ts
12801283
export type Iso_system_cache__CacheConsistencySchema = Assert<Eq< z.input< typeof M121.CacheConsistencySchema >, z.infer< typeof M121.CacheConsistencySchema > >>;
@@ -1763,7 +1766,7 @@ describe('ADR-0122 type-alias convention', () => {
17631766
// this title and the section header above the pin list — are now asserted
17641767
// against the recomputed count below, so neither can go stale without a red
17651768
// test naming it.
1766-
it('still declares all 819 isomorphic pins', () => {
1769+
it('still declares all 822 isomorphic pins', () => {
17671770
// The truth of each pin is proved by tsc, not here — an `Assert<Eq<...>>`
17681771
// that stops holding is a compile error with the alias named. What tsc
17691772
// cannot notice is a pin that was DELETED: removing the assertion removes
@@ -2760,7 +2763,14 @@ describe('ADR-0122 type-alias convention', () => {
27602763
// its tree, so it is pinned here
27612764
// (Iso_data_fieldValue__ReferenceNameOnlyValueSchema) rather than given a
27622765
// `ReferenceNameOnlyValueParsed` synonym. +1 added.
2763-
expect(pins).toHaveLength(819);
2766+
// 819 -> 822 is the mobile sign-in hand-off: the hand-off query
2767+
// (`api/auth-endpoints.zod.ts`, a strict object of strings, a regex and
2768+
// an optional literal), the verify body (one regex string) and one
2769+
// registered app scheme (`system/auth-config.zod.ts`, a regex string),
2770+
// no default and no transform in any of them
2771+
// (Iso_api_authEndpoints__OneTimeToken*, Iso_system_authConfig__TrustedAppSchemeSchema).
2772+
// +3 added.
2773+
expect(pins).toHaveLength(822);
27642774

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

0 commit comments

Comments
 (0)