@mmmnt/feat-types 0.1.12 → 0.2.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.
package/LICENSE CHANGED
@@ -1,28 +1,21 @@
1
- BSD 3-Clause License
1
+ MIT License
2
2
 
3
3
  Copyright (c) 2026, Moment
4
4
 
5
- Redistribution and use in source and binary forms, with or without
6
- modification, are permitted provided that the following conditions are met:
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
7
11
 
8
- 1. Redistributions of source code must retain the above copyright notice, this
9
- list of conditions and the following disclaimer.
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
10
14
 
11
- 2. Redistributions in binary form must reproduce the above copyright notice,
12
- this list of conditions and the following disclaimer in the documentation
13
- and/or other materials provided with the distribution.
14
-
15
- 3. Neither the name of the copyright holder nor the names of its
16
- contributors may be used to endorse or promote products derived from
17
- this software without specific prior written permission.
18
-
19
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
22
- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
23
- FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24
- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
25
- SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
26
- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
27
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,17 +1,502 @@
1
1
  # @mmmnt/feat-types
2
2
 
3
- Shared TypeScript contracts for the Feat toolchain: the BuiltSpec intermediate representation,
4
- `FeatConfig`, capture records, and the three adapter interfaces (`FeatResponseAdapter`,
5
- `FeatServiceAdapter`, `FeatSchemaAdapter`).
3
+ **The shared contracts of the Feat toolchain, and the interfaces an adapter
4
+ implements.** If you write an adapter (a module that exports `createAdapter` for
5
+ `response`, a `services.<key>` entry or `schemas` in `feat.config.json`), or a
6
+ tool that reads the BuiltSpec IR, this is the package you import types from.
6
7
 
7
- Types only — zero dependencies, zero runtime code. The language-neutral source of truth is the
8
- JSON Schema set in the repository (`schemas/`); these types mirror it.
8
+ If you only write `.feat` specs, you do not need it. The `feat` CLI pulls it in
9
+ for you.
10
+
11
+ ## Where it sits
12
+
13
+ Every other `@mmmnt` package depends on these types:
14
+
15
+ | Package | Uses this package for |
16
+ | --- | --- |
17
+ | `@mmmnt/feat-core` | the `BuiltSpec` it produces |
18
+ | `@mmmnt/feat-derive`, `@mmmnt/feat-emit-ts` | the IR they turn into a test topology and a test file |
19
+ | `@mmmnt/feat-runtime` | the adapter interfaces it drives, and `FeatConfig` |
20
+ | `@mmmnt/feat-analyze` | the `BuiltSpec` it lints and audits |
21
+ | every adapter | the interface it implements |
22
+
23
+ The language-neutral source of truth is the JSON Schema set in the repository
24
+ ([`schemas/`](https://github.com/mmmnt/feature/tree/main/schemas)). These types
25
+ mirror it by hand. Where the two differ, the
26
+ source in `src/index.ts` is what the toolchain compiles against.
27
+
28
+ ## Install
29
+
30
+ ```sh
31
+ npm install --save-dev @mmmnt/feat-types
32
+ ```
33
+
34
+ Requirements:
35
+
36
+ - Node 20 or later (the repository's `engines` field).
37
+ - A TypeScript project, or JavaScript checked by `tsc`. The package is ESM
38
+ (`"type": "module"`) and ships `dist/index.js` and `dist/index.d.ts`.
39
+ - No dependencies and no peer dependencies.
40
+
41
+ The package is types, plus one runtime constant (the `package.json` description says so): `EXCLUSIVE_FAULTS` (see
42
+ [Faults](#faults)). Import everything else with `import type`.
9
43
 
10
44
  ```ts
11
45
  import type { BuiltSpec, FeatConfig, FeatServiceAdapter } from "@mmmnt/feat-types";
46
+ import { EXCLUSIVE_FAULTS } from "@mmmnt/feat-types";
47
+ ```
48
+
49
+ ## Writing an adapter
50
+
51
+ An adapter is an ES module that exports `createAdapter(config)`. (`createAdapter`
52
+ may also be a property of the default export.) The harness loads it by the
53
+ specifier in `feat.config.json`:
54
+
55
+ - an npm name resolves **from the project root's `package.json`**, never from
56
+ the toolchain's own `node_modules`: the project owns its adapters;
57
+ - a path starting `.` or `/` resolves against the project root (the directory
58
+ holding the config).
59
+
60
+ A module that cannot be resolved, cannot be imported, or has no `createAdapter`
61
+ export is a configuration error before any case runs.
62
+
63
+ `createAdapter` receives the config entry plus fields the harness adds:
64
+
65
+ | Role | Config entry | `createAdapter` argument |
66
+ | --- | --- | --- |
67
+ | response | `response` | `{ ...response, projectRoot, namespace? }`, so `adapter`, `invoke`, `commands`, `actors`. Then `setup(response.invoke ?? {})` is called. |
68
+ | a service | `services.<key>` | `{ key, ...service, projectRoot, namespace? }`, so `adapter`, `consistency`, `convergenceTimeout`, `absenceTimeout`, `options`. Then `setup()` is called with no argument. |
69
+ | schema | `schemas` | `{ ...schemas, projectRoot }`, so `adapter`. Used by `feat generate` and `feat verify`, not by the test run. |
70
+
71
+ `projectRoot` is the directory of the active config. `namespace` is present
72
+ whenever the run knows the spec file (see [Namespace](#namespace)).
73
+
74
+ ### A complete service adapter
75
+
76
+ This adapter keeps events in memory. It declares what it can serve, so each
77
+ optional member is a choice rather than boilerplate.
78
+
79
+ ```ts
80
+ import type {
81
+ CapturedRecord,
82
+ FaultArm,
83
+ FaultCatalog,
84
+ FaultFiring,
85
+ FeatServiceAdapter,
86
+ ObservationSupport,
87
+ ReadQuery,
88
+ SeedRecord,
89
+ } from "@mmmnt/feat-types";
90
+
91
+ export function createAdapter(config: Record<string, unknown>): FeatServiceAdapter {
92
+ const namespace = typeof config.namespace === "string" ? config.namespace : undefined;
93
+ let window: CapturedRecord[] | undefined;
94
+ const stored: CapturedRecord[] = [];
95
+ let armed: FaultArm[] = [];
96
+ const fired = new Map<string, number>();
97
+
98
+ const faults: FaultCatalog = { Append: { REJECTED: ["once", "times"] } };
99
+ const observes: ObservationSupport = { diff: "native", state: true };
100
+
101
+ return {
102
+ faults,
103
+ observes,
104
+ reportedNamespace: () => namespace,
105
+ async setup() {},
106
+ async teardown() {},
107
+ async reset() {
108
+ stored.length = 0;
109
+ window = undefined;
110
+ armed = [];
111
+ fired.clear();
112
+ },
113
+ async seed(records: SeedRecord[]) {
114
+ for (const r of records) stored.push({ type: r.type, payload: r.values, timestamp: Date.now() });
115
+ },
116
+ async startCapture(context?: { specType?: string }) {
117
+ void context?.specType;
118
+ window = [];
119
+ },
120
+ async peekCapture() {
121
+ return [...(window ?? [])];
122
+ },
123
+ async settle() {
124
+ await new Promise((r) => setImmediate(r));
125
+ return true;
126
+ },
127
+ async stopCapture() {
128
+ const out = window ?? [];
129
+ window = undefined;
130
+ return out;
131
+ },
132
+ async read(query: ReadQuery) {
133
+ const types = new Set((query.expect ?? []).map((e) => e.type));
134
+ return stored.filter((r) => types.size === 0 || types.has(r.type));
135
+ },
136
+ async fault(arm: FaultArm) {
137
+ armed.push(arm);
138
+ },
139
+ async firedFaults(): Promise<FaultFiring[]> {
140
+ return [...fired].map(([id, count]) => {
141
+ const [operation, fault] = id.split("/") as [string, string];
142
+ return { operation, fault, count };
143
+ });
144
+ },
145
+ };
146
+ }
147
+ ```
148
+
149
+ `armed` is where a real adapter would make the product's next `Append` fail,
150
+ and where it would count each consumption into `fired`. This sketch arms and
151
+ reports but never fires, so a scenario that used its fault would fail with
152
+ `FAULT_NOT_CONSUMED`. A conformance suite for the capture and invoke contract is
153
+ in [`@mmmnt/feat-adapter-kit`](https://www.npmjs.com/package/@mmmnt/feat-adapter-kit).
154
+
155
+ ## The order the harness calls things
156
+
157
+ For each adapter, once per spec file: `createAdapter`, then `setup()`, then (for
158
+ a service) a namespace check. For each case in that file, in this order:
159
+
160
+ 1. **Preflight, before any effect.** A refused case throws a configuration
161
+ error and nothing has happened: a `clock at` with no `setClock`
162
+ (`CLOCK_UNSUPPORTED`), a `fault` the adapter does not offer
163
+ (`FAULT_UNSUPPORTED`), an exclusive fault outside the serial pass
164
+ (`FAULT_REQUIRES_SERIAL`), a `contains` on a service whose `observes.state`
165
+ is `false` (`MODE_UNSUPPORTED`).
166
+ 2. `reset()` on every service adapter.
167
+ 3. `setClock(clock | null)` on the response adapter if it has one, and on every
168
+ service adapter that has one. Every case gets a call, with `null` when the
169
+ case has no `clock at`.
170
+ 4. `seed(records)` for each `seed` in `given:`, in written order. A service
171
+ adapter with no `seed` is a configuration error: `Configuration error (exit 2):
172
+ [SEED_UNSUPPORTED] … does not support seed()`, and `feat run` exits 2.
173
+ 5. `invoke(...)` on the response adapter for each `execute` in `given:`.
174
+ 6. `fault(arm)` for each `fault` in `given:`, in written order. Faults are armed
175
+ after the seeds and executes, so setup never consumes one.
176
+ 7. `startCapture({ specType })` on every service adapter. This opens the window.
177
+ 8. The trigger: `invoke(command, input, actor?)` for `when:`, or
178
+ `deliver(event, payload)` for each delivery.
179
+ 9. The convergence wait (below).
180
+ 10. `stopCapture()` on every service adapter closes the window and returns the
181
+ records.
182
+ 11. `firedFaults()` for each service that had a fault armed.
183
+ 12. The diff against the prediction. For `contains`, `read(query)` is called
184
+ here.
185
+
186
+ After the last case in the file, `teardown()` runs on every service adapter and
187
+ then on the response adapter.
188
+
189
+ ## `FeatServiceAdapter`
190
+
191
+ | Member | Required | What it does |
192
+ | --- | --- | --- |
193
+ | `setup()` | yes | Connect. Called once per spec file. |
194
+ | `teardown()` | yes | Disconnect. |
195
+ | `reset()` | yes | Return to a clean state before every case. Must disarm every fault. |
196
+ | `startCapture(context?)` | yes | Open the capture window. `context.specType` is the running spec's type (`command`, `query`, ...). An adapter that reports resulting state uses it to withhold that state from a `query`, whose predicted `records: []` would otherwise read a seeded row as a side effect. |
197
+ | `stopCapture()` | yes | Close the window and return every record captured in it. Effects outside the window are not captured. |
198
+ | `read(query)` | yes | Resulting state, for `contains`. Return an array of `CapturedRecord`; anything else is a violation ("adapter read() did not return a record array"). |
199
+ | `seed(records)` | no | Write precondition state directly. A seed is never an effect: it must not appear in the capture. |
200
+ | `deliver(event, payload)` | no | Deliver an event as a stimulus (the trigger of `projection`, `policy` and `saga` specs). Delivered stimuli are excluded from capture. Event-capable adapters only. |
201
+ | `peekCapture()` | no | Report the records captured so far without consuming them. Lets the harness leave the convergence window early. |
202
+ | `settle()` | no | Prove the capture has caught up. See [Convergence](#convergence-peekcapture-and-settle). |
203
+ | `observes` | no | The observation modes served. Default `{ diff: "native", state: true }`. |
204
+ | `faults` | no | The fault catalog. |
205
+ | `acceptsFaultDetail` | no | `false` when the adapter cannot carry a fault's `{ json }` detail to the product. Default `true`. |
206
+ | `fault(arm)` | no | Arm a fault as a precondition. |
207
+ | `firedFaults()` | no | How often each armed fault was consumed. |
208
+ | `setClock(clock)` | no | Receive the scenario clock. |
209
+ | `reportedNamespace()` | no | Report the namespace the adapter is running under. |
210
+
211
+ ### Records
212
+
213
+ ```ts
214
+ interface CapturedRecord {
215
+ type: string; // what a prediction's `INSERT with ...` names
216
+ key?: string;
217
+ payload: Record<string, unknown>; // what the prediction's value block is compared with
218
+ timestamp: number;
219
+ metadata?: Record<string, unknown>;
220
+ }
221
+
222
+ interface SeedRecord {
223
+ type: string;
224
+ schemaName?: string;
225
+ values: Record<string, unknown>;
226
+ }
227
+ ```
228
+
229
+ A prediction's `<service> has [ ... ]` is compared with what `stopCapture()`
230
+ returns. A record that was captured and not predicted fails the case. That is
231
+ the language's central rule, and it is why `reset()` and the window boundaries
232
+ matter.
233
+
234
+ ### Observation modes
235
+
236
+ `has` is the **diff** mode (`stopCapture`). `contains` is the **state** mode
237
+ (`read`). Declare what you serve with `observes`:
238
+
239
+ ```ts
240
+ interface ObservationSupport {
241
+ diff: "native" | "snapshot";
242
+ state: boolean;
243
+ }
244
+ ```
245
+
246
+ - `diff` is never optional: every service needs `has` (INV-6). `"native"` means
247
+ the product reports writes. `"snapshot"` means the adapter compares two reads,
248
+ so it cannot see a write undone inside the window, and it says so.
249
+ - `state: false` makes a `contains` on that service `MODE_UNSUPPORTED`, a
250
+ configuration error before the case runs.
251
+ - An adapter that declares nothing is `{ diff: "native", state: true }`.
252
+
253
+ `read(query)` receives a hint built from the predicted records:
254
+
255
+ ```ts
256
+ interface ReadQuery {
257
+ expect?: { type: string; key?: Record<string, string | number | boolean | null> }[];
258
+ }
259
+ ```
260
+
261
+ `key` holds the literal top-level fields of each predicted record, with `@when`
262
+ values already resolved. It is a **hint**: you may narrow your read with it, you
263
+ may answer more than asked, you may never answer less.
264
+
265
+ ### Convergence, `peekCapture` and `settle`
266
+
267
+ A service declared `eventual` (with a required `convergenceTimeout`) is read
268
+ after a wait. The timeout is a **ceiling**. The harness ends the wait as early
269
+ as it can prove safe, in this order:
270
+
271
+ 1. **fence.** Every eventual service in the prediction implements `settle()` and
272
+ every one resolves `true` before the ceiling. The window ends on proof, and an
273
+ absence prediction (`has []`) becomes a fact rather than a timeout.
274
+ 2. **peek.** Every eventual service in the prediction predicts at least one
275
+ record, none uses `contains`, and each implements `peekCapture()`. The
276
+ harness polls every 150 ms and leaves once each target count has arrived and
277
+ the capture was quiet for one more poll.
278
+ 3. **ceiling.** Anything else waits the full `convergenceTimeout`: absence with
279
+ no fence, a `settle()` that returned `false` or never answered, `contains`,
280
+ or no `peekCapture`. The ceiling is the largest `convergenceTimeout` among
281
+ the eventual services in the prediction.
282
+ 4. **none.** No eventual service in the prediction, so capture is immediate.
283
+
284
+ Rules for the two optional methods:
285
+
286
+ - `peekCapture()` must be callable repeatedly between `startCapture` and
287
+ `stopCapture`, and must not consume what `stopCapture` will return.
288
+ - `settle()` resolves `true` only when everything the system under test has
289
+ **already written** is visible to `stopCapture`. Resolve `false` when you
290
+ cannot vouch, and the harness keeps the ceiling. Writes the system starts
291
+ after its handler returned are outside any fence, so an in-process adapter
292
+ should yield the event loop before vouching. A rejected `settle()` counts as
293
+ `false`, and one that does not answer by the ceiling falls through to the peek
294
+ rule with the time that is left.
295
+ - Do not implement `settle()` unless it is truthful. The memory adapter can
296
+ vouch. The filesystem and Stripe adapters cannot, and their specs say why.
297
+
298
+ Set `FEAT_FENCE_AUDIT=1` to audit a fence: the harness waits out the ceiling
299
+ anyway and fails the case if the capture grew after `settle()` vouched.
300
+
301
+ ### Faults
302
+
303
+ A fault is a **precondition**, never an assertion. The scenario arms it in
304
+ `given:` with
305
+
306
+ ```
307
+ fault <service> <Operation> <Fault> [{ json }] [once | times <n> | until reset]
308
+ ```
309
+
310
+ and predicts the system's reaction with the usual forms.
311
+
312
+ ```ts
313
+ type FaultCount = "once" | "times" | "reset";
314
+ type FaultCatalog = Record<string, readonly string[] | Record<string, readonly FaultCount[]>>;
315
+
316
+ interface FaultArm {
317
+ operation: string;
318
+ fault: string;
319
+ detail?: Record<string, unknown>;
320
+ times: number | "reset"; // 1 for once; n for `times n`; "reset" for `until reset`
321
+ }
322
+
323
+ interface FaultFiring {
324
+ operation: string;
325
+ fault: string;
326
+ count: number;
327
+ }
328
+ ```
329
+
330
+ - `faults` is a catalog of `Operation -> Fault names`. The array form
331
+ (`{ Put: ["TIMEOUT"] }`) declares all three counts. The object form names the
332
+ counts per fault (`{ Put: { TIMEOUT: ["once", "times"] } }`).
333
+ - The harness turns `times` into a count word: `"reset"` is `reset`; `1` is
334
+ `once` if you declare it, else `times`; anything else is `times`. A count you
335
+ did not declare is `FAULT_UNSUPPORTED`.
336
+ - Transport faults live under the pseudo-operation `Connection`. The product
337
+ adapters offer them `until reset` only.
338
+ - `reset()` **must** disarm every fault. Your own capture, `read()` and `seed()`
339
+ are never faulted.
340
+ - If you set `acceptsFaultDetail` to `false`, an arm with a `{ json }` detail is
341
+ refused (`FAULT_UNSUPPORTED`).
342
+ - If you implement `firedFaults()`, an armed fault that the system never
343
+ consumed fails the case with `FAULT_NOT_CONSUMED`. The harness sums, per
344
+ `Operation/Fault`, the counts armed (`reset` counts as 1) and compares them
345
+ with the counts you report. Without `firedFaults()` consumption is not
346
+ checked.
347
+ - **Exclusive faults.** `EXCLUSIVE_FAULTS` is `["BrokerLoss"]`. These are faults
348
+ that cannot share a product with any other spec file, because they pause
349
+ something every namespace shares. A file that arms one runs alone, in a serial
350
+ pass after the parallel one, and the harness refuses to arm one anywhere else
351
+ (`FAULT_REQUIRES_SERIAL`). Entries are the part of `Operation.Fault` after the
352
+ dot.
353
+
354
+ ### Clock
355
+
356
+ ```ts
357
+ setClock?(clock: string | null): Promise<void>;
358
+ ```
359
+
360
+ `clock` is an ISO-8601 instant with a zone designator, or `null` for "no frozen
361
+ clock". A case with `clock at` is `CLOCK_UNSUPPORTED` unless the right adapter
362
+ has `setClock`. When a `response` is configured, only the response adapter is
363
+ consulted. With no `response`, any service adapter with `setClock` satisfies it.
364
+ Do not patch the global `Date` to honour the clock. The handler adapter passes
365
+ it to the handler instead.
366
+
367
+ ### Namespace
368
+
369
+ ```ts
370
+ interface ReportsNamespace {
371
+ reportedNamespace?(): string | undefined | Promise<string | undefined>;
372
+ }
12
373
  ```
13
374
 
14
- Part of [Feature](https://github.com/mmmnt/feature) — the `.feat` execution specification
15
- language. Docs: https://github.com/mmmnt/feature/wiki
375
+ The runner gives every spec file one namespace, derived from the file's path
376
+ alone: `s` plus the first 12 hex characters of the SHA-256 of the path relative
377
+ to the config directory, so it matches `^s[0-9a-f]{12}$`. It arrives as
378
+ `config.namespace` in `createAdapter`, and as the `FEAT_NAMESPACE` environment
379
+ variable while the file's adapters are alive. Isolate your data under it: two
380
+ spec files running in parallel against one product must never see each other's
381
+ records. Namespaces isolate data, not availability.
382
+
383
+ If you implement `reportedNamespace()`, the harness calls it and compares. For a
384
+ service adapter that happens right after `setup()`. For the response adapter it
385
+ happens after the first `invoke()` and before any prediction is compared. A
386
+ different answer, or none, is `NAMESPACE_NOT_HONOURED`.
387
+
388
+ A `namespace` key written in `feat.config.json` (in `response`,
389
+ `response.invoke` or a service's `options`) is refused as `NAMESPACE_CONFIGURED`,
390
+ because a configured value would be shared by every file.
391
+
392
+ ## `FeatResponseAdapter`
393
+
394
+ ```ts
395
+ interface FeatResponseAdapter extends ReportsNamespace {
396
+ setClock?(clock: string | null): Promise<void>;
397
+ setup(config: Record<string, unknown>): Promise<void>;
398
+ teardown(): Promise<void>;
399
+ invoke(command: string, input: Record<string, unknown>, actor?: string): Promise<CapturedResponse>;
400
+ }
401
+
402
+ interface CapturedResponse {
403
+ status: number | string; // 201, 409, "OK", "ERR"
404
+ body: Record<string, unknown> | null;
405
+ headers?: Record<string, string>;
406
+ metadata?: Record<string, unknown>;
407
+ }
408
+ ```
409
+
410
+ `invoke` is how `when:` and `execute` reach the system. `command` is a key of
411
+ `response.commands` (a closed space, validated at parse time), `actor` is a key
412
+ of `response.actors`, and `setup` receives `response.invoke` (or `{}`). When
413
+ `response.invoke.timeout` is a number, it is the per-invoke allowance in
414
+ milliseconds that `feat run` uses to size the test timeout (default 30 000).
415
+
416
+ ## `FeatSchemaAdapter`
417
+
418
+ ```ts
419
+ interface FeatSchemaAdapter {
420
+ resolve(ref: string, fromPath: string): Promise<ResolvedSchema>;
421
+ resolveInline?(schema: Record<string, unknown>, fromPath: string): Promise<ResolvedSchema>;
422
+ validate(data: unknown, schema: ResolvedSchema): { valid: boolean; errors?: string[] };
423
+ }
424
+
425
+ interface ResolvedSchema {
426
+ id: string;
427
+ format: string;
428
+ raw: unknown;
429
+ normalized: Record<string, unknown>; // self-contained: it is inlined into the generated test
430
+ }
431
+ ```
432
+
433
+ `feat generate` calls `resolve` for a contract entry that is only a `$ref`, and
434
+ `resolveInline` (when you provide it) for an inline schema whose nested
435
+ properties point at another file or at a sibling entry. `normalized` is what
436
+ gets inlined, so it must already be self-contained: the generated test lands in
437
+ a different directory and nothing resolves at run time. Without `resolveInline`
438
+ the pipeline falls back to `resolve("#/schemas/<name>")`, which cannot keep the
439
+ schema's own local pointers. `validate` also checks seed values at generate time
440
+ (the `SEED_*` codes in `@mmmnt/feature`). The default adapter is
441
+ `@mmmnt/feat-schema-json`.
442
+
443
+ ## The IR and the config
444
+
445
+ `BuiltSpec` is the parsed spec, without source locations. The exported types:
446
+
447
+ | Type | What it is |
448
+ | --- | --- |
449
+ | `BuiltSpec` | `{ featVersion, identity, construct, enforce, contract, variables?, scenarios }` |
450
+ | `SpecIdentity`, `SpecType`, `SpecStatus` | The header. Types: `command`, `query`, `policy`, `projection`, `saga`, `infrastructure`, `integration`, `scaffold`. Statuses: `draft`, `agreed`, `built`, `verified`. |
451
+ | `ConstructInstruction` | `handler`, `import`, `register`, `emitsTo`, `touches`, `needs`, `custom` |
452
+ | `EnforceStep` | `validate`, `load`, `apply`, `onSuccess`, `onRejection`, `constraint`, `rejects` (with `rejectionId`) |
453
+ | `ContractReference` | `input`, `response`, `event`, `record`, `error` with `schemaName`, or `stream` with `pattern` |
454
+ | `Scenario` | `{ name, given?, when?, delivers?, prediction, examples?, loc? }` |
455
+ | `Given` | `{ clock?, context?, executes?, seeds?, faults? }` |
456
+ | `Seed`, `SeedRecord`, `Fault`, `Invocation`, `Delivery` | The preconditions and triggers. A `Seed` is either `{ service, records }` or `{ service, fixture }`. |
457
+ | `Prediction` | `success`, `rejection` (with `rejectionId`) or `error` (with `errorCode`), plus `response` and per-service `services` |
458
+ | `ServicePrediction`, `PredictedRecord`, `ResponsePrediction` | `records` (from `has`), `contains`, `ordering` |
459
+ | `Matcher`, `ValueBlock` | `literal`, `whenRef`, `deliverRef`, `captureRef`, `any`, `regex`, `absent`, `placeholder`, `goldenFixture`, `nested` |
460
+ | `SpecVariable`, `VariableDefinition`, `VariableType` | The `variables:` block; a source call is `now`, `iso` or `unique`, and `now` and `iso` take an optional `offsetMs` |
461
+
462
+ `FeatConfig` mirrors `feat.config.json`: `featVersion`, `extends`,
463
+ `environment`, `schemas`, `response` (`ResponseConfig`), `services`
464
+ (`ServiceConfig`, with `Consistency` of `acid`, `strong` or `eventual`), `specs`
465
+ and `report`. The field-by-field reference is in
466
+ [`@mmmnt/feature`](https://www.npmjs.com/package/@mmmnt/feature). To validate a
467
+ file, use
468
+ [`schemas/feat.config.schema.json`](https://github.com/mmmnt/feature/blob/main/schemas/feat.config.schema.json).
469
+
470
+ ## What changed in 0.2.0
471
+
472
+ Every addition is an optional member, so an adapter written against 0.1.x still
473
+ compiles and still runs.
474
+
475
+ - **Observation modes** (ADR-0023, SPEC-RT-002): `ObservationSupport`,
476
+ `ReadQuery`, and `FeatServiceAdapter.observes`. `read` now receives the hint.
477
+ - **The scenario clock** (SPEC-RT-002): `setClock` on both adapter kinds.
478
+ - **Faults** (ADR-0023, SPEC-RT-003, SPEC-RT-005): `Fault`, `Given.faults`,
479
+ `FaultCatalog`, `FaultCount`, `FaultArm`, `FaultFiring`,
480
+ `FeatServiceAdapter.faults`, `acceptsFaultDetail`, `fault`, `firedFaults`, and
481
+ `EXCLUSIVE_FAULTS`.
482
+ - **Namespace** (SPEC-RT-006): `ReportsNamespace` and `reportedNamespace`.
483
+ - **Tier overlays** (ADR-0024): `FeatConfig.extends` and `specs.exclude`.
484
+
485
+ ## Specs and decisions
486
+
487
+ - [ADR-0023: adapter interface v2](https://github.com/mmmnt/feature/blob/main/docs/adr/ADR-0023-adapter-interface-v2.md)
488
+ (observation modes, the scenario clock, fault injection)
489
+ - [ADR-0024: tier bindings](https://github.com/mmmnt/feature/blob/main/docs/adr/ADR-0024-tier-bindings.md)
490
+ - [SPEC-RT-002](https://github.com/mmmnt/feature/blob/main/packages/feat-runtime/harness-observation.feat):
491
+ clock delivery and observation-mode check
492
+ - [SPEC-RT-003](https://github.com/mmmnt/feature/blob/main/packages/feat-runtime/harness-faults.feat):
493
+ fault arming, consumption and refusal
494
+ - [SPEC-RT-005](https://github.com/mmmnt/feature/blob/main/packages/feat-runner/serial-faults.feat):
495
+ exclusive faults run in a serial pass
496
+ - [SPEC-RT-006](https://github.com/mmmnt/feature/blob/main/packages/feat-runtime/harness-namespace.feat):
497
+ one namespace per spec file
498
+
499
+ Part of [Feature](https://github.com/mmmnt/feature), the `.feat` execution
500
+ specification language. Docs: https://github.com/mmmnt/feature/wiki
16
501
 
17
502
  MIT
package/dist/index.d.ts CHANGED
@@ -72,11 +72,21 @@ export type Seed = {
72
72
  service: string;
73
73
  fixture: string;
74
74
  };
75
+ /** ADR-0023: a logical fault the named service's adapter arms as a precondition. */
76
+ export interface Fault {
77
+ service: string;
78
+ operation: string;
79
+ fault: string;
80
+ detail?: Record<string, unknown>;
81
+ /** Consumption: n calls (1 = once), or "reset" for every call until the case ends. */
82
+ times: number | "reset";
83
+ }
75
84
  export interface Given {
76
85
  clock?: string;
77
86
  context?: string[];
78
87
  executes?: Invocation[];
79
88
  seeds?: Seed[];
89
+ faults?: Fault[];
80
90
  }
81
91
  export type Matcher = {
82
92
  matcher: "literal";
@@ -152,7 +162,8 @@ export interface Scenario {
152
162
  export type VariableType = "string" | "number";
153
163
  export type VariableDefinition = {
154
164
  kind: "call";
155
- fn: "now" | "unique";
165
+ fn: "now" | "iso" | "unique";
166
+ offsetMs?: number;
156
167
  } | {
157
168
  kind: "number";
158
169
  value: number;
@@ -200,6 +211,8 @@ export interface FeatConfig {
200
211
  * suites are environment-agnostic).
201
212
  */
202
213
  environment?: string;
214
+ /** Tier overlay (ADR-0024): the base this config overrides (kept in the merged result). */
215
+ extends?: string;
203
216
  schemas: {
204
217
  adapter: string;
205
218
  };
@@ -210,6 +223,7 @@ export interface FeatConfig {
210
223
  pattern: string;
211
224
  contractPattern: string;
212
225
  outputPattern: string;
226
+ exclude?: string[];
213
227
  };
214
228
  report?: {
215
229
  format: ("console" | "junit")[];
@@ -229,12 +243,63 @@ export interface CapturedRecord {
229
243
  timestamp: number;
230
244
  metadata?: Record<string, unknown>;
231
245
  }
232
- export interface FeatResponseAdapter {
246
+ /** The namespace an adapter (or a spec host) is running under, if it can say (SPEC-RT-006). */
247
+ export interface ReportsNamespace {
248
+ reportedNamespace?(): string | undefined | Promise<string | undefined>;
249
+ }
250
+ export interface FeatResponseAdapter extends ReportsNamespace {
251
+ /**
252
+ * Optional (ADR-0023): receive the scenario clock — an ISO-8601 instant with a zone designator, or
253
+ * null for "no frozen clock". The harness delivers it on every case, after the resets. A response
254
+ * adapter without it cannot run a spec that uses `clock at` (CLOCK_UNSUPPORTED).
255
+ */
256
+ setClock?(clock: string | null): Promise<void>;
233
257
  setup(config: Record<string, unknown>): Promise<void>;
234
258
  teardown(): Promise<void>;
235
259
  invoke(command: string, input: Record<string, unknown>, actor?: string): Promise<CapturedResponse>;
236
260
  }
237
- export interface FeatServiceAdapter {
261
+ /** The query hint `contains` hands to read() (ADR-0023): one entry per predicted record. */
262
+ export interface ReadQuery {
263
+ expect?: {
264
+ type: string;
265
+ key?: Record<string, string | number | boolean | null>;
266
+ }[];
267
+ }
268
+ /** Which observation modes an adapter serves (ADR-0023). Diff is never optional (INV-6). */
269
+ export interface ObservationSupport {
270
+ /** "native": the product reports writes. "snapshot": two reads compared (cannot see a write undone in the window). */
271
+ diff: "native" | "snapshot";
272
+ /** read() answers the stored records, so `contains` can be asserted. */
273
+ state: boolean;
274
+ }
275
+ /** How many times a fault may be armed for (ADR-0023): `times` covers every n. */
276
+ export type FaultCount = "once" | "times" | "reset";
277
+ /** Operation -> fault -> the counts it declares; the array form (fault names) declares all three. */
278
+ export type FaultCatalog = Record<string, readonly string[] | Record<string, readonly FaultCount[]>>;
279
+ export interface FaultArm {
280
+ operation: string;
281
+ fault: string;
282
+ detail?: Record<string, unknown>;
283
+ times: number | "reset";
284
+ }
285
+ export interface FaultFiring {
286
+ operation: string;
287
+ fault: string;
288
+ count: number;
289
+ }
290
+ export interface FeatServiceAdapter extends ReportsNamespace {
291
+ /** What this binding can inject (ADR-0023); a fault outside it, or with an undeclared count, is FAULT_UNSUPPORTED. */
292
+ readonly faults?: FaultCatalog;
293
+ /** False when the adapter cannot carry a fault's detail to the product; the harness then refuses an arm that has one. Default true. */
294
+ readonly acceptsFaultDetail?: boolean;
295
+ /** Arm a fault as a precondition; reset() MUST disarm everything. The adapter's own capture, read and seed are never faulted. */
296
+ fault?(arm: FaultArm): Promise<void>;
297
+ /** Optional: how often each armed fault was consumed. Absent = consumption is not observed (not checked). */
298
+ firedFaults?(): Promise<FaultFiring[]>;
299
+ /** Declares the observation modes served; an adapter that declares nothing is { diff: "native", state: true }. */
300
+ readonly observes?: ObservationSupport;
301
+ /** Optional (ADR-0023): receive the scenario clock, or null; see FeatResponseAdapter.setClock. */
302
+ setClock?(clock: string | null): Promise<void>;
238
303
  setup(): Promise<void>;
239
304
  teardown(): Promise<void>;
240
305
  reset(): Promise<void>;
@@ -249,7 +314,11 @@ export interface FeatServiceAdapter {
249
314
  specType?: string;
250
315
  }): Promise<void>;
251
316
  stopCapture(): Promise<CapturedRecord[]>;
252
- read(query: Record<string, unknown>): Promise<unknown | null>;
317
+ /**
318
+ * Resulting state. `query.expect` is a HINT built from a `contains` assertion: an adapter may use it to
319
+ * narrow its read, may answer more than asked, never less.
320
+ */
321
+ read(query: ReadQuery): Promise<unknown | null>;
253
322
  seed?(records: SeedRecord[]): Promise<void>;
254
323
  /**
255
324
  * Deliver an event as a scenario stimulus (projection/policy/saga triggers,
@@ -266,9 +335,25 @@ export interface FeatServiceAdapter {
266
335
  * and stopCapture, and must not consume what stopCapture will return.
267
336
  */
268
337
  peekCapture?(): Promise<CapturedRecord[]>;
338
+ /**
339
+ * Prove the capture has caught up with every effect written so far (ADR-0021: the fence).
340
+ * Resolve `true` only when everything the system under test has already written is now
341
+ * visible to stopCapture — the harness then ends the convergence window without waiting out
342
+ * the ceiling, which is what makes an absence proof (`records []`) a fact instead of a
343
+ * timeout. Resolve `false` when that cannot be vouched for (the harness keeps the ceiling).
344
+ * Writes the system starts AFTER its handler returned are outside any fence; an adapter for an
345
+ * in-process instrument should yield the event loop before vouching.
346
+ */
347
+ settle?(): Promise<boolean>;
269
348
  }
270
349
  export interface FeatSchemaAdapter {
271
350
  resolve(ref: string, fromPath: string): Promise<ResolvedSchema>;
351
+ /**
352
+ * Optional: resolve a schema authored INLINE in the contract at `fromPath`, following the
353
+ * relative file references nested in its properties. Without it the pipeline falls back to
354
+ * resolve("#/schemas/<name>"), which cannot keep the schema's own local pointers.
355
+ */
356
+ resolveInline?(schema: Record<string, unknown>, fromPath: string): Promise<ResolvedSchema>;
272
357
  validate(data: unknown, schema: ResolvedSchema): {
273
358
  valid: boolean;
274
359
  errors?: string[];
@@ -280,4 +365,10 @@ export interface ResolvedSchema {
280
365
  raw: unknown;
281
366
  normalized: Record<string, unknown>;
282
367
  }
368
+ /**
369
+ * Faults that cannot share a product with any other spec file (SPEC-RT-005): BrokerLoss pauses a
370
+ * container every namespace shares, so a file arming one runs alone, in the serial pass. Names are
371
+ * the part of `Operation.Fault` after the dot.
372
+ */
373
+ export declare const EXCLUSIVE_FAULTS: readonly string[];
283
374
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"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AAM,CAAC;IACf,GAAG,EAAE,OAAO,CAAC;IACb,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACrC;AAED;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,EAAE,SAAS,MAAM,EAAmB,CAAC"}
package/dist/index.js CHANGED
@@ -2,5 +2,10 @@
2
2
  // Source of truth: schemas/builtspec.schema.json, schemas/feat.config.schema.json (F13 hedge:
3
3
  // the JSON Schemas are the language-neutral contracts; these TS types mirror them).
4
4
  // TODO(M3): replace hand-authoring with json-schema-to-typescript codegen in the build.
5
- export {};
5
+ /**
6
+ * Faults that cannot share a product with any other spec file (SPEC-RT-005): BrokerLoss pauses a
7
+ * container every namespace shares, so a file arming one runs alone, in the serial pass. Names are
8
+ * the part of `Operation.Fault` after the dot.
9
+ */
10
+ export const EXCLUSIVE_FAULTS = ["BrokerLoss"];
6
11
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,8FAA8F;AAC9F,oFAAoF;AACpF,wFAAwF"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,8FAA8F;AAC9F,oFAAoF;AACpF,wFAAwF;AAmVxF;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAsB,CAAC,YAAY,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mmmnt/feat-types",
3
- "version": "0.1.12",
4
- "description": "Feat contracts: TypeScript types derived from the JSON Schema IR/config/report definitions. Zero dependencies, zero runtime code (DP-8).",
3
+ "version": "0.2.0",
4
+ "description": "Feat contracts: TypeScript types derived from the JSON Schema IR/config/report definitions. Zero dependencies; types plus one runtime constant, EXCLUSIVE_FAULTS (DP-8).",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "main": "./dist/index.js",
@@ -31,6 +31,6 @@
31
31
  "scripts": {
32
32
  "build": "tsc -p tsconfig.json",
33
33
  "typecheck": "tsc -p tsconfig.json --noEmit",
34
- "test": "vitest run --passWithNoTests"
34
+ "test": "tsc -p tsconfig.test.json"
35
35
  }
36
36
  }