Skip to content

Commit b998f58

Browse files
committed
test(spec): the ADR-0122 isomorphic-pin count moves 815 -> 816
`ScheduleOrganizationSchema` is a bare `z.string().min(1)` — no coercion, no default, no transform — so input === infer and it takes a pin rather than a permanent `ScheduleOrganizationParsed` synonym. The note records that the module is not new, only its `.zod.ts` name is: this family of gates reads `*.zod.ts` only, so the violation sat green behind an extension. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012zTkyNHJ7TkuN2oXtP5x37
1 parent c1ee928 commit b998f58

1 file changed

Lines changed: 17 additions & 3 deletions

File tree

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

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ import type * as M184 from './shared/value-domain.zod.js';
276276
import type * as M185 from './shared/epoch.zod.js';
277277

278278
// ---------------------------------------------------------------------------
279-
// 815 isomorphic aliases: `z.input` === `z.infer`, so no `XParsed` is declared.
279+
// 816 isomorphic aliases: `z.input` === `z.infer`, so no `XParsed` is declared.
280280
//
281281
// That number is machine-checked, not hand-kept. The runtime companion at the
282282
// bottom of this file recomputes the pin count from the source and asserts that
@@ -1694,7 +1694,7 @@ describe('ADR-0122 type-alias convention', () => {
16941694
// this title and the section header above the pin list — are now asserted
16951695
// against the recomputed count below, so neither can go stale without a red
16961696
// test naming it.
1697-
it('still declares all 815 isomorphic pins', () => {
1697+
it('still declares all 816 isomorphic pins', () => {
16981698
// The truth of each pin is proved by tsc, not here — an `Assert<Eq<...>>`
16991699
// that stops holding is a compile error with the alias named. What tsc
17001700
// cannot notice is a pin that was DELETED: removing the assertion removes
@@ -2180,7 +2180,21 @@ describe('ADR-0122 type-alias convention', () => {
21802180
// `AnalyticsDateRangeSchema` (its union with `z.array(z.string())`) — no
21812181
// default, no transform on either arm, two new pins (`Iso869` / `Iso870`).
21822182
// +2 added.
2183-
expect(pins).toHaveLength(815);
2183+
//
2184+
// 815 -> 816 is #16659's `ScheduleOrganizationSchema`
2185+
// (automation/schedule-organization.zod.ts, new module slot M186): the
2186+
// acting organization a time-triggered flow declares, a bare
2187+
// `z.string().min(1)` — no coercion, no default, no transform, because an
2188+
// organization id is written exactly as it is stored. The (RISE) case, one
2189+
// new pin (`Iso871`). +1 added.
2190+
//
2191+
// ⚠️ Worth one line on how it ARRIVED, because the module is not new — only
2192+
// its NAME is. It shipped in the same card as `schedule-organization.ts`,
2193+
// and every gate in this family reads `*.zod.ts` only, so neither this pin
2194+
// file nor `check:spec-parsed-alias` could see it. Renaming the file to
2195+
// `.zod.ts` is what asked the question, and the answer was a real ADR-0122
2196+
// violation (`z.infer` on the bare alias) sitting green behind an extension.
2197+
expect(pins).toHaveLength(816);
21842198

21852199
// The count is stated in PROSE twice as well — this case's title and the
21862200
// section header above the pin list — and until #6605 nothing read either

0 commit comments

Comments
 (0)