@substrat-run/contracts 0.87.0 → 0.88.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,30 @@
1
+ /**
2
+ * The operation surface of the model (#707).
3
+ *
4
+ * #697 declared the entities. This declares what can be *done* to them, and
5
+ * checks the joins that today are unchecked strings: which permission an
6
+ * operation requires, which output field an event takes its subject from,
7
+ * whether a payload carries something an erasure must be able to reach.
8
+ *
9
+ * ## A composer, not a second `defineModel`
10
+ *
11
+ * `defineOperations` sits beside `defineEntities` rather than swallowing it.
12
+ * Each half stays independently adoptable — which is what let the entity half
13
+ * ship and be taken up by two verticals before this existed. A vertical adopts
14
+ * operations when it is ready, not as the price of adopting entities.
15
+ *
16
+ * ## `input`, and the transcription that is not here
17
+ *
18
+ * `input` is a real Zod object, not a description of one. That is the whole
19
+ * reason the model is TypeScript (#680): a schema language would need the shape
20
+ * written twice, and transcription is what produced 40 wrong argument names in
21
+ * the one app where this was measured.
22
+ *
23
+ * Being real is also what lets the HOST parse with it (#893) — the declaration
24
+ * is the thing that refuses a malformed call, rather than a description of a
25
+ * refusal each handler was trusted to implement.
26
+ */
27
+ import { LIST_PAGE_MAX } from './pagination.js';
1
28
  import { z } from 'zod';
2
29
  import { primaryKeyOf } from './model.js';
3
30
  // ---------------------------------------------------------------------------
@@ -27,9 +54,11 @@ import { primaryKeyOf } from './model.js';
27
54
  * });
28
55
  * ```
29
56
  */
30
- export function defineOperations(_entities, _permissions, _engines) {
57
+ export function defineOperations(entities, _permissions, engines) {
31
58
  return (operations) => {
32
59
  assertListsArePaged(operations);
60
+ assertConcurrencyMovesVersion(operations);
61
+ assertFieldBagsDeclareConcurrency(operations, entities, engines ?? []);
33
62
  return operations;
34
63
  };
35
64
  }
@@ -77,6 +106,188 @@ function assertListsArePaged(operations) {
77
106
  " paged: { sortKey: 'article' }");
78
107
  }
79
108
  }
109
+ /**
110
+ * A guarded operation must ANNOUNCE the change it guards (#129).
111
+ *
112
+ * An entity's version is the ULID of the last event about it, so a `concurrency`
113
+ * declaration over an entity the operation does not emit about is not a weaker
114
+ * protection — it is an inverted one:
115
+ *
116
+ * 1. A and B both read the customer at version V and both send `If-Match: V`.
117
+ * 2. A's write commits. It emits nothing about `customer`, so the version is still V.
118
+ * 3. B's precondition compares V against V, passes, and overwrites A.
119
+ * 4. Both callers received 200 and an `ETag`, which is the wire's way of saying
120
+ * the write was serialised against a known version.
121
+ *
122
+ * That is the original lost update, now with a mechanism asserting it did not
123
+ * happen — strictly worse than no precondition, because it is believed. So the
124
+ * join is checked rather than trusted, which is what `entity-version.ts` asks for
125
+ * where it names the one hole in deriving a version from the spine:
126
+ *
127
+ * > a mutation that emits no event does not move the version … the answer is
128
+ * > that a declared `concurrency` must be compile-checked against the operation's
129
+ * > declared `emits` (#129), which is strictly more than a trigger would have
130
+ * > given: a trigger guarantees the column moved, never that the operation
131
+ * > announced what it did.
132
+ *
133
+ * ## Why a read is exempt
134
+ *
135
+ * An operation with no `emits` at all is a READ, and on a read this declaration
136
+ * means "answer with an `ETag`" — there is nothing to serialise and nothing to
137
+ * refuse. The rule therefore bites only where the operation emits and names a
138
+ * DIFFERENT entity, plus the one case that cannot be read as a read: an unsafe
139
+ * HTTP method with no event, which is a mutation that does not announce itself
140
+ * and is already a rule violation without this.
141
+ */
142
+ function assertConcurrencyMovesVersion(operations) {
143
+ for (const [name, op] of Object.entries(operations)) {
144
+ const decl = op;
145
+ const over = decl.concurrency?.over;
146
+ if (typeof over !== 'string')
147
+ continue;
148
+ const emitted = decl.emits?.entity;
149
+ if (emitted === over)
150
+ continue;
151
+ const method = decl.http?.method;
152
+ const unsafe = method === 'POST' || method === 'PUT' || method === 'PATCH' || method === 'DELETE';
153
+ if (emitted === undefined && !unsafe)
154
+ continue; // a read: the ETag half only
155
+ throw new Error(`model: '${name}' declares \`concurrency.over: '${over}'\` but ` +
156
+ (emitted === undefined
157
+ ? `emits no event, and it is served as ${String(method)} — a mutation that ` +
158
+ 'announces nothing does not move a version'
159
+ : `emits about '${String(emitted)}'`) +
160
+ '.\n' +
161
+ ` An entity's version IS the last event about it, so nothing this operation ` +
162
+ `does moves '${over}'. Two callers holding the same tag would both pass the ` +
163
+ 'precondition and both commit — the lost update this declaration exists to ' +
164
+ 'refuse, with a 200 and an `ETag` asserting it did not happen.\n' +
165
+ ` Remedy: emit about '${over}' (\`emits: { entity: '${over}', … }\`), or guard ` +
166
+ 'the entity this operation actually announces.');
167
+ }
168
+ }
169
+ /**
170
+ * A read-modify-write shape must say how it serialises (#129).
171
+ *
172
+ * `concurrency` is opt-in because most declared operations are command-shaped and
173
+ * genuinely do not need it (see `ConcurrencyShape`). But "remember to opt in on
174
+ * the dangerous ones" is not a guarantee, and the dangerous ones have a shape the
175
+ * model can already see: a single required field naming the row, and every other
176
+ * field OPTIONAL over that entity's own columns. That is read-modify-write by
177
+ * construction — the caller GET the entity, changed a field, and sent the bag
178
+ * back — and it is the one shape where a concurrent writer's change is silently
179
+ * destroyed rather than merely re-ordered.
180
+ *
181
+ * This is the `paged`-vs-bare-array refusal applied to a second defect class, and
182
+ * it is deliberately being added while it matches NOTHING in the fleet: zero
183
+ * operations means zero migration, which makes now the cheapest moment it will
184
+ * ever be. Waiting until the shape appears means waiting until it appears
185
+ * unguarded.
186
+ *
187
+ * ## Why the test is this narrow
188
+ *
189
+ * A rule that refuses correct code trains people to route around it, so every
190
+ * clause here exists to exclude something legitimate:
191
+ *
192
+ * - **Two or more optional fields.** One optional field is a nullable
193
+ * command (`{ orderId, note? }`), not a bag.
194
+ * - **Exactly one required field.** `shop/set-stock` takes `{ productId,
195
+ * quantity }` — two required fields, a command that states its whole intent.
196
+ * - **Every optional field is a column of that entity.** A filter, a flag, or a
197
+ * reason code alongside the update is not the entity being echoed back.
198
+ *
199
+ * Column names are snake_case and input fields are camelCase, so the comparison
200
+ * crosses that seam explicitly rather than accidentally matching nothing.
201
+ */
202
+ function assertFieldBagsDeclareConcurrency(operations, entities, engines) {
203
+ for (const [name, op] of Object.entries(operations)) {
204
+ const decl = op;
205
+ if (decl.concurrency !== undefined)
206
+ continue;
207
+ // The entity the operation is ABOUT. `emits` is the reliable statement; a
208
+ // narrowed permission is the fallback, and it is what catches the write that
209
+ // does not emit — which would otherwise escape by breaking a second rule.
210
+ const about = decl.emits?.entity ?? decl.permission?.entity;
211
+ if (typeof about !== 'string')
212
+ continue;
213
+ const entity = entities[about] ?? engines.map((r) => r[about]).find(Boolean);
214
+ if (!entity)
215
+ continue;
216
+ const shape = decl.input?.shape;
217
+ if (!shape)
218
+ continue;
219
+ const required = [];
220
+ const optional = [];
221
+ for (const [field, schema] of Object.entries(shape)) {
222
+ (isOptionalSchema(schema) ? optional : required).push(field);
223
+ }
224
+ if (required.length !== 1 || optional.length < 2)
225
+ continue;
226
+ const columns = new Set(Object.keys(entity.fields.shape));
227
+ if (!optional.every((field) => columns.has(snakeCaseField(field))))
228
+ continue;
229
+ const emits = typeof decl.emits?.entity === 'string';
230
+ throw new Error(`model: '${name}' takes a partial field-bag over '${about}' — ` +
231
+ `\`${required[0]}\` names the row and ${optional.map((f) => `\`${f}\``).join(', ')} ` +
232
+ 'are its own columns, every one optional — and declares no `concurrency`.\n' +
233
+ ' That is read-modify-write: two callers who both read the row, each change ' +
234
+ 'one field and each save, do not conflict. The second write silently destroys ' +
235
+ 'the first, and nothing surfaces it.\n' +
236
+ ` Remedy: \`concurrency: { over: '${about}', idFrom: '${required[0]}' }\`` +
237
+ (emits
238
+ ? '.'
239
+ : `, and emit about '${about}' — a version is the last event about an entity, ` +
240
+ 'so a write that announces nothing cannot be guarded.'));
241
+ }
242
+ }
243
+ /** `customerId` → `customer_id`: input fields and columns sit either side of this seam. */
244
+ function snakeCaseField(value) {
245
+ return value.replace(/([a-z0-9])([A-Z])/g, '$1_$2').toLowerCase();
246
+ }
247
+ /**
248
+ * Is this declared field one the caller may omit?
249
+ *
250
+ * Read structurally, for the reason every other Zod read in the repo is: two
251
+ * copies of the library in one build make `instanceof` a coin toss. Looks through
252
+ * the wrappers that do not change optionality's answer, and treats a `default` as
253
+ * optional — a field the caller can leave out is a field the caller can leave out,
254
+ * however the gap is filled.
255
+ */
256
+ function isOptionalSchema(schema, depth = 0) {
257
+ if (depth > 8)
258
+ return false;
259
+ const def = schema?._zod?.def;
260
+ switch (def?.type) {
261
+ case 'optional':
262
+ case 'nullish':
263
+ case 'default':
264
+ case 'prefault':
265
+ return true;
266
+ case 'readonly':
267
+ case 'nullable':
268
+ return isOptionalSchema(def.innerType, depth + 1);
269
+ default:
270
+ return false;
271
+ }
272
+ }
273
+ /**
274
+ * The concurrency each operation declares, for the host (#129).
275
+ *
276
+ * Handed over beside `operationInputs` and read the same way — the adapter
277
+ * compares versions from this map rather than each handler being trusted to. Same
278
+ * argument as the parse: one place that cannot be forgotten beats a rule every
279
+ * new operation has to remember.
280
+ */
281
+ export function operationConcurrencyOf(operations) {
282
+ const out = {};
283
+ for (const [name, op] of Object.entries(operations)) {
284
+ const decl = op.concurrency;
285
+ if (typeof decl?.over !== 'string' || typeof decl.idFrom !== 'string')
286
+ continue;
287
+ out[name] = { entity: decl.over, idFrom: decl.idFrom };
288
+ }
289
+ return out;
290
+ }
80
291
  /**
81
292
  * The permission keys an operation set actually requires, for the manifest.
82
293
  *
@@ -239,6 +450,97 @@ export function manifestOperations(operations, spec) {
239
450
  },
240
451
  };
241
452
  }
453
+ // ---------------------------------------------------------------------------
454
+ // The schemas the HOST parses an invocation against.
455
+ // ---------------------------------------------------------------------------
456
+ /**
457
+ * What the PLATFORM merges into a paged read's input, as a schema (#811/#893).
458
+ *
459
+ * The mirror of `PagedInput` on the value side. `mountOperations` merges the
460
+ * page trio into the payload AFTER the declaration has had its say, so a strict
461
+ * parse against `input` alone would strip `limit`/`cursor`/`order`/`sort` back
462
+ * out and hand every paged handler an unpaged request. Declared here once so
463
+ * the two descriptions of the same four fields cannot drift.
464
+ *
465
+ * Every field is optional and none is defaulted: `listPageQuery` already
466
+ * resolved the default and the ceiling at the wire, and an in-process caller
467
+ * legitimately passes no page at all (`listLimitOf` is what answers then).
468
+ * Re-defaulting here would make `limit` present for a caller who never sent it —
469
+ * the exact lie `PagedInput` was corrected to stop telling.
470
+ */
471
+ const pagedInputFields = {
472
+ limit: z.number().int().positive().max(LIST_PAGE_MAX).optional(),
473
+ cursor: z.string().min(1).optional(),
474
+ order: z.enum(['asc', 'desc']).optional(),
475
+ sort: z.string().min(1).optional(),
476
+ };
477
+ /**
478
+ * name → the schema the host parses an invocation's input against (#893).
479
+ *
480
+ * ## Why this is derived rather than parsed in the handler
481
+ *
482
+ * `input` documents itself as *"the SAME Zod object the handler parses"*, and
483
+ * across the fleet it mostly was not: of ~85 declared inputs, 40 were parsed.
484
+ * Rally declared 32 and parsed 2. The declaration was true about the shape —
485
+ * `idFrom` and `entityIdFrom` are held to it by the compiler — and false about
486
+ * the parsing, which is the half that actually refuses a malformed call.
487
+ *
488
+ * A lint rule was the other candidate and is strictly weaker. It can only ask
489
+ * whether *some* `.parse` appears in a handler body, not whether it is the
490
+ * declared schema, at the boundary, before the first read of a field. And it is
491
+ * unfulfillable where the schema is declared inline (`input: z.object({…})`) —
492
+ * callout, handlebar and todo declare 25 inputs with no identifier a handler
493
+ * could name, and the reference implementation is one of them.
494
+ *
495
+ * So the host parses instead, from the same declaration that already produces
496
+ * the manifest, the routes and the OpenAPI document. `mountOperations` already
497
+ * does exactly this for the page trio, and for the same stated reason: it is
498
+ * what makes the ceiling *"true of every paged endpoint rather than of the ones
499
+ * whose author remembered"*.
500
+ *
501
+ * ## What it means for a handler
502
+ *
503
+ * The input a handler receives is parsed, so unknown keys are gone and every
504
+ * declared field has its declared type. A handler that parsed for itself may
505
+ * keep doing so — the second parse is a no-op on an already-parsed value — but
506
+ * it no longer has to, and a new operation cannot forget.
507
+ *
508
+ * An operation with no declared `input` is absent from the map: it takes
509
+ * `undefined`, and `z.object({})` cannot say that (see `input` above). A paged
510
+ * operation is always present even with no `input`, because the platform hands
511
+ * it a page whether it declared one or not.
512
+ */
513
+ export function operationInputsOf(operations) {
514
+ const inputs = {};
515
+ for (const [name, op] of Object.entries(operations)) {
516
+ const decl = op;
517
+ if (decl.paged) {
518
+ // `inputOptional` on a paged read means the FILTERS are optional, not the
519
+ // body — the platform always supplies a page. `.partial()` is what
520
+ // `ImplInput` says (`Partial<z.infer<I>> & PagedInput`), and saying it
521
+ // twice is how the two would come to disagree.
522
+ const filters = decl.input ?? z.object({});
523
+ const shape = (decl.inputOptional ? filters.partial() : filters).extend(pagedInputFields);
524
+ // A paged handler is never handed `undefined` — `ImplInput` types its
525
+ // input as `… & PagedInput` with no undefined arm, because the PLATFORM
526
+ // supplies the page "whether it declared one or not". Over HTTP that is
527
+ // already true: `mountOperations` merges the trio into a payload that
528
+ // therefore exists. In process it was not — `invoke('booking/list')` with
529
+ // no argument is the ordinary way a test, a seed or another operation
530
+ // reads a list, and the declaration promises that answers the same way.
531
+ //
532
+ // So the empty page is materialised here rather than each paged handler
533
+ // learning to survive `undefined`. A required FILTER still fails, just
534
+ // against `{}` and with a message naming the field.
535
+ inputs[name] = z.preprocess((value) => value ?? {}, shape);
536
+ continue;
537
+ }
538
+ if (!decl.input)
539
+ continue;
540
+ inputs[name] = decl.inputOptional ? decl.input.optional() : decl.input;
541
+ }
542
+ return inputs;
543
+ }
242
544
  /**
243
545
  * Declare where a composed engine's operations live in this vertical's API.
244
546
  *
@@ -1 +1 @@
1
- {"version":3,"file":"operations.js","sourceRoot":"","sources":["../src/operations.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAqC,MAAM,YAAY,CAAC;AA8a7E,8EAA8E;AAC9E,gBAAgB;AAChB,8EAA8E;AAE9E;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,UAAU,gBAAgB,CAI9B,SAAmB,EAAE,YAAmB,EAAE,QAAkB;IAC5D,OAAO,CAKL,UAAe,EACV,EAA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zC,2EAA2E;YAC3E,wEAAwE;YACxE,2EAA2E;YAC3E,yEAAyE;YACzE,sEAAsE;YACtE,wDAAwD;YACxD,IAAI,CAAC,EAAE,EAAE,CAAC;gBACR,MAAM,IAAI,KAAK,CACb,wBAAwB,IAAI,qDAAqD;oBAC/E,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CACjD,CAAC;YACJ,CAAC;YACD,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,GAAI,EAAa,EAAE,IAAI,EAAE,CAAC;QAC1C,CAAC;QACD,OAAO,GAAkF,CAAC;IAC5F,CAAC,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@substrat-run/contracts",
3
- "version": "0.87.0",
3
+ "version": "0.88.0",
4
4
  "description": "Substrat kernel contract schemas — Zod is the source of truth (master plan D-22); OAS/JSON Schema are emitted artifacts",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {