Skip to content

Commit c1ee928

Browse files
committed
fix(spec): ADR-0122 alias state and the llms.txt inventory for the new module
Two gate findings the .zod.ts rename brought into scope, both real: check:spec-parsed-alias only reads *.zod.ts, so `ScheduleOrganization` was declared with z.infer where ADR-0122 reserves the bare name for the author state; and llms.txt counts *.zod.ts modules, so the automation domain and the total were one short. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012zTkyNHJ7TkuN2oXtP5x37
1 parent ad367c1 commit c1ee928

3 files changed

Lines changed: 16 additions & 3 deletions

File tree

packages/spec/llms.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ const query = {
7777

7878
---
7979

80-
## 3. Schema Inventory by Domain (205 schemas)
80+
## 3. Schema Inventory by Domain (206 schemas)
8181

8282
Counted as `*.zod.ts` modules under `packages/spec/src/<domain>/` — the sources
8383
that ship in this tarball (`files` includes `src/**/*.zod.ts`), so every number
@@ -90,7 +90,7 @@ here is verifiable from the installed package.
9090
| data | 30 | Object, Field, Query, Filter, Driver (SQL/NoSQL/Memory/Mongo/Postgres), Cube |
9191
| api | 30 | Endpoint, REST Server, Discovery, OData, Batch, WebSocket, Response Envelope, Package Lifecycle |
9292
| ui | 18 | View, App, Action, Dashboard, Page, Chart, Component, Animation |
93-
| automation | 13 | Flow, Approval, BPMN Interop, Control Flow, State Machine, Webhook |
93+
| automation | 14 | Flow, Approval, BPMN Interop, Control Flow, State Machine, Webhook, Schedule Organization |
9494
| shared | 14 | Enums, HTTP, Identifiers, Mapping, Metadata Types, Connector Auth, Retry Policy, Value Domain, Epoch Instant (EpochMs) |
9595
| ai | 11 | Agent, Conversation, Knowledge Source/Document, Model Registry, MCP, Skill, Tool |
9696
| cloud | 11 | Marketplace, Developer Portal, App Store, Environment, Package, Tenant |

packages/spec/src/automation/schedule-organization.zod.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,13 @@ export const ScheduleOrganizationSchema = z
8484
/**
8585
* The declared value's type — the alias the machine-readable surface needs
8686
* beside the schema, and the name a reference page's import example carries.
87+
*
88+
* `z.input` per ADR-0122: the bare name is reserved for the AUTHOR state. No
89+
* `ScheduleOrganizationParsed` sibling exists because the two states are the
90+
* same type here — the schema neither transforms nor defaults, it only refuses
91+
* what cannot be acted on.
8792
*/
88-
export type ScheduleOrganization = z.infer<typeof ScheduleOrganizationSchema>;
93+
export type ScheduleOrganization = z.input<typeof ScheduleOrganizationSchema>;
8994

9095
/**
9196
* Spellings an author reaches for that are NOT this key, in the order a

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ import type * as M177 from './data/date-macros.zod.js';
205205
import type * as M178 from './data/field-value.zod.js';
206206
import type * as M179 from './data/mapping.zod.js';
207207
import type * as M180 from './security/sharing.zod.js';
208+
import type * as M186 from './automation/schedule-organization.zod.js';
208209
import type * as M114 from './shared/metadata-types.zod.js';
209210
import type * as M115 from './shared/protection.zod.js';
210211
import type * as M116 from './stack.zod.js';
@@ -632,6 +633,13 @@ export type Iso246 = Assert<Eq< z.input< typeof M42.StateMachineSchema >, z.infe
632633
// automation/time-relative-trigger.zod.ts
633634
export type Iso247 = Assert<Eq< z.input< typeof M43.TimeRelativeTriggerSchema >, z.infer< typeof M43.TimeRelativeTriggerSchema > >>;
634635

636+
// automation/schedule-organization.zod.ts
637+
// [#16659] A bare non-empty string: no transform, no default, no coercion — an
638+
// organization id is written exactly as it is stored. So input === infer, and an
639+
// `XParsed` here would be a permanent synonym. The day this schema learns to
640+
// normalize an id, this line goes red and the ADR's remedy applies.
641+
export type Iso871 = Assert<Eq< z.input< typeof M186.ScheduleOrganizationSchema >, z.infer< typeof M186.ScheduleOrganizationSchema > >>;
642+
635643
// automation/webhook.zod.ts
636644
export type Iso248 = Assert<Eq< z.input< typeof M44.WebhookTriggerType >, z.infer< typeof M44.WebhookTriggerType > >>;
637645

0 commit comments

Comments
 (0)