eutaxy 0.13.0 → 0.14.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/dist/cli.mjs CHANGED
@@ -1 +1 @@
1
- export { t as main } from "./cli-D3SPblWw.mjs";
1
+ export { t as main } from "./cli-BppjMaqL.mjs";
@@ -24,6 +24,24 @@ interface CloudflareRegressionOptions {
24
24
  readonly exports?: boolean;
25
25
  /** @deprecated Use `exports`. */
26
26
  readonly workflows?: boolean;
27
+ /**
28
+ * The Workers behind service bindings the scenario names with `callee`, by
29
+ * binding: each one's name from its wrangler config and the import path of
30
+ * its module.
31
+ */
32
+ readonly callees?: Readonly<Record<string, {
33
+ readonly name: string;
34
+ readonly path: string;
35
+ readonly entrypoint?: string;
36
+ readonly props?: Readonly<Record<string, unknown>>;
37
+ }>>;
38
+ /**
39
+ * The qualified names the callees' bindings had in the check's isolate: the
40
+ * replay needs them in its own, so the test says so at its top.
41
+ */
42
+ readonly calleeBindings?: readonly string[];
43
+ /** Qualified binding names that are aliases of the caller's bindings, passed to the platform. */
44
+ readonly aliases?: Readonly<Record<string, string>>;
27
45
  readonly expect?: "holds" | "violates";
28
46
  readonly engineModule?: string;
29
47
  /** Core modules to observe during the replay (import path, functions), for `refines`. */
@@ -34,10 +52,6 @@ interface CloudflareRegressionOptions {
34
52
  }
35
53
  /** A Vitest regression test for a Cloudflare scenario, to run under the Cloudflare Vitest plugin. */
36
54
  export declare function cloudflareRegressionTest(verdict: Violated, options: CloudflareRegressionOptions): string;
37
- /** Explore a scenario on a platform and return its verdict. */
38
- export declare function check(spec: ScenarioSpec, platform: Platform, options?: ExploreOptions): Promise<ScenarioVerdict>;
39
- /** For use from a test: passes only when the scenario is BOUNDED. */
40
- export declare function expectHolds(spec: ScenarioSpec, platform: Platform, options?: ExploreOptions): Promise<void>;
41
55
  /** Every user table's rows, sorted canonically, read through the real binding (not an effect). */
42
56
  export declare function snapshotD1(real: D1Database): Promise<{
43
57
  readonly [table: string]: readonly JsonValue[];
@@ -330,7 +344,32 @@ export declare function service(binding: string, options?: {
330
344
  };
331
345
  readonly fetch?: readonly ServiceResponse[];
332
346
  }): ServiceSetup;
333
- /** Selects the calls through a service binding that completed, one method's or all. */
347
+ /**
348
+ * The Worker behind a service binding, run for real: its module and wrangler
349
+ * config, relative to the scenario, in place of a script. The `name` in that
350
+ * config qualifies the callee's bindings (`orders/DB`) in effect targets,
351
+ * setup steps, state queries and snapshots. Each call is one effect,
352
+ * `Service:<binding>`, hosting the callee's invocation
353
+ * (`<caller invocation>/<binding>.<method>`), with the faults of a call in
354
+ * the network: `crash_before`, `ambiguous` and `crash_after`; what the
355
+ * callee throws is real.
356
+ */
357
+ interface CalleeSetup extends PlatformData {
358
+ readonly kind: "callee";
359
+ readonly binding: string;
360
+ /** The callee's module, relative to the scenario. */
361
+ readonly entry: string;
362
+ /** Its wrangler config, relative to the scenario; its `name` qualifies the callee's bindings. */
363
+ readonly config: string;
364
+ /** The named export the binding reaches; the default export otherwise. */
365
+ readonly entrypoint?: string;
366
+ }
367
+ export declare function callee(binding: string, worker: {
368
+ readonly entry: string;
369
+ readonly config: string;
370
+ readonly entrypoint?: string;
371
+ }): CalleeSetup;
372
+ /** Selects the calls through a service binding that completed (scripted or a callee's), one method's or all. */
334
373
  export declare function serviceCall(binding: string, method?: string): EffectSelector;
335
374
  /** Selects a Workflow's step attempts, optionally of one step; a failed attempt's result carries its error. */
336
375
  export declare function workflowStep(binding: string, step?: string): EffectSelector;
@@ -355,7 +394,7 @@ interface CloudflareScenarioInput {
355
394
  readonly queue: string;
356
395
  readonly messages: readonly QueueMessage[];
357
396
  };
358
- readonly setup?: readonly (D1Setup | DurableObjectSetup | R2Setup | WorkflowSetup | ServiceSetup)[];
397
+ readonly setup?: readonly (CalleeSetup | D1Setup | DurableObjectSetup | R2Setup | WorkflowSetup | ServiceSetup)[];
359
398
  readonly externals?: readonly ExternalDecl[];
360
399
  readonly invariants: readonly Invariant[];
361
400
  readonly bounds?: Partial<Bounds>;
@@ -441,6 +480,33 @@ export declare function external(name: string, host: string, options?: {
441
480
  export declare function fetchCall(externalName: string, method?: string): EffectSelector;
442
481
  /** Build and validate a scenario spec; throws with every problem listed. */
443
482
  export declare function defineScenario(input: CloudflareScenarioInput): ScenarioSpec;
483
+ /**
484
+ * The callee's module as the test gives it: the Worker's name from its
485
+ * wrangler config, which qualifies its bindings, its exports, and what the
486
+ * caller's service binding carries in its own config: the `entrypoint` the
487
+ * binding reaches (the scenario's `callee()` may name one too, and wins)
488
+ * and the `props` the callee reads from `ctx.props`.
489
+ */
490
+ interface CalleeModule {
491
+ readonly name: string;
492
+ readonly exports: Readonly<Record<string, unknown>>;
493
+ readonly entrypoint?: string;
494
+ readonly props?: Readonly<Record<string, JsonValue>>;
495
+ }
496
+ /**
497
+ * The callee's `env`: the scenario's env seen under the callee's own names,
498
+ * each mapped onto `<name>/<key>`. Over the platform's proxied env the
499
+ * entries are the proxies, so the callee's effects are recorded under their
500
+ * qualified targets, and an alias (`<name>/STOCK` for the caller's `STOCK`)
501
+ * is already resolved; over workerd's raw env (a callee's Durable Object,
502
+ * which the runtime constructs with the main Worker's env) the aliases are
503
+ * given here, so the shared binding is there under the callee's name too.
504
+ */
505
+ export declare function calleeEnv(name: string, env: object, aliases?: Readonly<Record<string, string>>): object;
506
+ /** Explore a scenario on a platform and return its verdict. */
507
+ export declare function check(spec: ScenarioSpec, platform: Platform, options?: ExploreOptions): Promise<ScenarioVerdict>;
508
+ /** For use from a test: passes only when the scenario is BOUNDED. */
509
+ export declare function expectHolds(spec: ScenarioSpec, platform: Platform, options?: ExploreOptions): Promise<void>;
444
510
  /**
445
511
  * The Cloudflare Vitest plugin's test helpers, as exported by
446
512
  * `cloudflare:test` (pass the module namespace). Typed loosely on purpose:
@@ -483,6 +549,20 @@ interface CloudflarePlatformOptions {
483
549
  * where the classes `workflow` setup steps name are found.
484
550
  */
485
551
  readonly exports?: Readonly<Record<string, unknown>>;
552
+ /**
553
+ * The Workers behind service bindings that `callee` setup steps name, by
554
+ * binding: each one's name from its wrangler config, which qualifies its
555
+ * bindings in `env` (`orders/DB`), and its module's exports.
556
+ */
557
+ readonly callees?: Readonly<Record<string, CalleeModule>>;
558
+ /**
559
+ * Bindings that name a resource another binding already names (the same
560
+ * database, the same Durable Object namespace), by their qualified name
561
+ * (`inventory/DB`) to the name the resource is set up and snapshotted
562
+ * under (`DB`): one resource, one snapshot, the alias a second name for it
563
+ * in `env`. A setup step on an alias is refused.
564
+ */
565
+ readonly aliases?: Readonly<Record<string, string>>;
486
566
  }
487
567
  export declare function createCloudflarePlatform(options: CloudflarePlatformOptions): Platform;
488
568
  /** A type, not an interface, so it is JSON data the comparison takes as it is. */
@@ -535,6 +615,14 @@ interface CheckTransport {
535
615
  readonly [key: string]: unknown;
536
616
  };
537
617
  /** The core modules observed (as the scenario's specs name them) and the functions on each. */
618
+ /** The callees the platform ran, by binding: each one's Worker name, and what the binding carried, for the regression test. */
619
+ readonly callees?: Readonly<Record<string, {
620
+ readonly name: string;
621
+ readonly entrypoint?: string;
622
+ readonly props?: Readonly<Record<string, unknown>>;
623
+ }>>;
624
+ /** The aliases the platform ran with, for the regression test. */
625
+ readonly aliases?: Readonly<Record<string, string>>;
538
626
  readonly observed?: readonly {
539
627
  readonly module: string;
540
628
  readonly functions: readonly string[];
@@ -565,6 +653,12 @@ interface WorkerdCheckInput {
565
653
  readonly modules: ModuleGlob;
566
654
  /** The generated `specs.ts` entries, by module key. */
567
655
  readonly specEntries: Readonly<Record<string, SpecEntry>>;
656
+ /** The callees the scenario names, by binding: each one's Worker name and module exports, imported by the generated test. */
657
+ readonly callees?: Readonly<Record<string, CalleeModule>>;
658
+ /** SQL files outside the scenario's directory, by the key `schemasFor` looks up. */
659
+ readonly extraSql?: Readonly<Record<string, string>>;
660
+ /** Qualified binding names that are aliases of the caller's bindings (shared resources). */
661
+ readonly aliases?: Readonly<Record<string, string>>;
568
662
  readonly seed: string;
569
663
  readonly maxRuns?: number;
570
664
  readonly budgetMs?: number;
@@ -572,5 +666,5 @@ interface WorkerdCheckInput {
572
666
  }
573
667
  /** Run the scenario's check, with its specs observed, and return what the CLI reads back. */
574
668
  export declare function checkInWorkerd(input: WorkerdCheckInput): Promise<CheckTransport>;
575
- export { type CheckTransport, type CloudflarePlatformOptions, type CloudflareRegressionOptions, type CloudflareScenarioInput, type CronDrive, type CronOptions, type CronTickSpec, type D1Setup, type DifferentialResult, type DurableObjectSetup, type DurableObjectSqlSeed, type DurableObjectTestHelpers, type HttpCallerOptions, type HttpDrive, type HttpRequestInput, type HttpRequestSpec, type QueueDrive, type QueueMessage, type R2Setup, type RpcCallInput, type RpcCallSpec, type RpcCallerOptions, type RpcDrive, type ScriptedReply, type ServiceResponse, type ServiceSetup, type SpecEntry, type SqlRow, type WebSocketConnectionInput, type WebSocketDrive, type WebSocketMessageInput, type WorkerEntrypointClass, type WorkerHandler, type WorkerdCheckInput, type WorkflowSetup, atLeastOnce, atMostOncePerKey };
669
+ export { type CalleeModule, type CalleeSetup, type CheckTransport, type CloudflarePlatformOptions, type CloudflareRegressionOptions, type CloudflareScenarioInput, type CronDrive, type CronOptions, type CronTickSpec, type D1Setup, type DifferentialResult, type DurableObjectSetup, type DurableObjectSqlSeed, type DurableObjectTestHelpers, type HttpCallerOptions, type HttpDrive, type HttpRequestInput, type HttpRequestSpec, type QueueDrive, type QueueMessage, type R2Setup, type RpcCallInput, type RpcCallSpec, type RpcCallerOptions, type RpcDrive, type ScriptedReply, type ServiceResponse, type ServiceSetup, type SpecEntry, type SqlRow, type WebSocketConnectionInput, type WebSocketDrive, type WebSocketMessageInput, type WorkerEntrypointClass, type WorkerHandler, type WorkerdCheckInput, type WorkflowSetup, atLeastOnce, atMostOncePerKey };
576
670
  //# sourceMappingURL=cloudflare.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cloudflare.d.mts","names":[],"sources":["../../cli/src/regression.ts","../../cloudflare/src/check.ts","../../cloudflare/src/d1.ts","../../cloudflare/src/r2.ts","../../cloudflare/src/scenario.ts","../../cloudflare/src/durable-objects.ts","../../cloudflare/src/platform.ts","../../cloudflare/src/differential.ts","../../cli/src/workerd.ts"],"mappings":";;;UAGiB;;WAEN;;WAEA;;WAEA,aAAa,SAAS;;;;;WAKtB;;WAEA;;WAEA;;;;;WAKA;;WAEA;WACA;WACA;;WAEA;aACE;aACA;;;;wBAKG,yBACd,SAAS,UACT,SAAS;;wBC7BK,MACd,MAAM,cACN,UAAU,UACV,UAAS,iBACR,QAAQ;;wBAKW,YACpB,MAAM,cACN,UAAU,UACV,UAAU,iBACT;;wBCkPmB,WACpB,MAAM,aACL;YAAoB,yBAAyB;;;KCxBpC;WAGG;WACA,iBAAiB,SAAS;WAC1B,eAAe,SAAS;;;UCpNtB;WACN;WACA,MAAM;;;UAIA,mBAAmB;WACzB;WACA;WACA;aAA8B;aAAqB,MAAM;;;;UAInD;WACN;WACA;WACA;WACA;cAAsB;;;WAEtB,OAAO;;;KAIN;WACD;WACA;WACA;WACA;cAAqB;;;WAErB,OAAO;;;;;;;;;;;;UAaD,kBAAkB;WACxB;WACA,mBAAmB;WACnB;WACA;WACA;WACA;;UAGM;WACN;WACA;WACA;WACA;;wBAGK,KACd,mBAAmB,oBACnB,UAAS,oBACR;;KAkBS;WACD;WACA,MAAM;;;KAIL;WACD;WACA;WACA,SAAS,SAAS;WAClB,mBAAmB;;;;;;;;;UAUb,uBAAuB;WAC7B;WACA,sBAAsB;;UAGhB;WACN;WACA,MAAM;;UAGA;;WAEN;WACA;WACA,UAAU,SAAS;;WAEnB,oBAAoB;;wBAGf,UAAU,sBAAsB,6BAA6B;;UAmB5D;WACN;WACA;WACA,gBAAgB;;;KAIf;WACD;WACA;WACA,eAAe;;;;;;;;;;;;UAaT,iBAAiB;WACvB;WACA;WACA,gBAAgB;WAChB;WACA;WACA;;UAGM;WACN;WACA;WACA;WACA;;wBAGK,IAAI,gBAAgB,gBAAgB,UAAS,mBAAwB;;KAqBzE;WAA0B;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mB;WACnB;cACG;gBAA8B,yBAAyB;;;;UAIpD;;WAEN;WACA,QAAQ;WACR,KAAK;WACL;;WAEA;;;wBAwYW,gBACpB,MAAM,cACN,SAAS,4BACR,QAAQ;;UCxbM;WACN;;WAEA,sBAAsB;WACtB;aAAmB;aAAwB;;WAC3C;aAA2B;cAAwB;;;WAEnD;aAAmB;cAAwB;;;WAE3C;aAA+B;aAAyB;;;UAGlD;WACN;WACA;WACA;;;UAIM;WACN,OAAO;WACP,YAAY;;;KAIX,aAAa,SAAS,qBAAqB;UAqFtC;;WAEN,UAAU;;WAEV;;WAEA,gBAAgB;;WAEhB,UAAU,SAAS;;WAEnB,SAAS;;WAET,aAAa,SAAS,eAAe;WACrC;WACA;WACA;WACA;;;wBAIW,eAAe,OAAO,oBAAoB,QAAQ"}
1
+ {"version":3,"file":"cloudflare.d.mts","names":[],"sources":["../../cli/src/regression.ts","../../cloudflare/src/d1.ts","../../cloudflare/src/r2.ts","../../cloudflare/src/scenario.ts","../../cloudflare/src/callees.ts","../../cloudflare/src/check.ts","../../cloudflare/src/durable-objects.ts","../../cloudflare/src/platform.ts","../../cloudflare/src/differential.ts","../../cli/src/workerd.ts"],"mappings":";;;UAGiB;;WAEN;;WAEA;;WAEA,aAAa,SAAS;;;;;WAKtB;;WAEA;;WAEA;;;;;WAKA;;WAEA;;;;;;WAMA,UAAU,SACjB;aAGa;aACA;aACA;aACA,QAAQ,SAAS;;;;;;WAQvB;;WAEA,UAAU,SAAS;WACnB;WACA;;WAEA;aACE;aACA;;;;wBA0BG,yBACd,SAAS,UACT,SAAS;;wBCsLW,WACpB,MAAM,aACL;YAAoB,yBAAyB;;;KCxBpC;WAGG;WACA,iBAAiB,SAAS;WAC1B,eAAe,SAAS;;;UCpNtB;WACN;WACA,MAAM;;;UAIA,mBAAmB;WACzB;WACA;WACA;aAA8B;aAAqB,MAAM;;;;UAInD;WACN;WACA;WACA;WACA;cAAsB;;;WAEtB,OAAO;;;KAIN;WACD;WACA;WACA;W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3C,UAAU,SACjB;aAGa;aACA;aACA,QAAQ,SAAS;;;WAKvB,UAAU,SAAS;WACnB;aAA+B;aAAyB;;;UAGlD;WACN;WACA;WACA;;;UAIM;WACN,OAAO;WACP,YAAY;;;KAIX,aAAa,SAAS,qBAAqB;UAqFtC;;WAEN,UAAU;;WAEV;;WAEA,gBAAgB;;WAEhB,UAAU,SAAS;;WAEnB,SAAS;;WAET,aAAa,SAAS,eAAe;;WAErC,UAAU,SAAS,eAAe;;WAElC,WAAW,SAAS;;WAEpB,UAAU,SAAS;WACnB;WACA;WACA;WACA;;;wBAIW,eAAe,OAAO,oBAAoB,QAAQ"}
@@ -1,3 +1,3 @@
1
- import { r as atMostOncePerKey, t as atLeastOnce } from "./delivery-invariants-Br29H7Rg.mjs";
2
- import { A as rpcResponse, B as check, C as queueAck, D as references, E as r2Rows, F as websocket, H as cloudflareRegressionTest, I as workflow, L as workflowRows, M as serviceCall, N as unique, O as refines, P as webSocketReceived, R as workflowStep, S as queue, T as r2Op, V as expectHolds, _ as external, a as atLeastOncePerMessage, b as httpResponse, c as d1Read, d as d1Write, f as defineScenario, g as everyRow, h as durableObjectTable, i as createCloudflarePlatform, j as service, k as rpc, l as d1Rows, m as durableObjectRows, o as cron, p as durableObject, r as runDifferential, s as d1Param, t as checkInWorkerd, u as d1Schema, v as fetchCall, w as r2Bucket, x as implies, y as http, z as snapshotD1 } from "./workerd-BMJ-GKx8.mjs";
3
- export { atLeastOnce, atLeastOncePerMessage, atMostOncePerKey, check, checkInWorkerd, cloudflareRegressionTest, createCloudflarePlatform, cron, d1Param, d1Read, d1Rows, d1Schema, d1Write, defineScenario, durableObject, durableObjectRows, durableObjectTable, everyRow, expectHolds, external, fetchCall, http, httpResponse, implies, queue, queueAck, r2Bucket, r2Op, r2Rows, references, refines, rpc, rpcResponse, runDifferential, service, serviceCall, snapshotD1, unique, webSocketReceived, websocket, workflow, workflowRows, workflowStep };
1
+ import { r as atMostOncePerKey, t as atLeastOnce } from "./delivery-invariants-_T9ZMwOJ.mjs";
2
+ import { A as r2Bucket, B as webSocketReceived, C as external, D as implies, E as httpResponse, F as rpc, G as cloudflareRegressionTest, H as workflow, I as rpcResponse, L as service, M as r2Rows, N as references, O as queue, P as refines, R as serviceCall, S as everyRow, T as http, U as workflowRows, V as websocket, W as workflowStep, _ as d1Write, a as createCloudflarePlatform, b as durableObjectRows, c as expectHolds, d as callee, f as cron, g as d1Schema, h as d1Rows, i as runDifferential, j as r2Op, k as queueAck, l as calleeEnv, m as d1Read, o as snapshotD1, p as d1Param, s as check, t as checkInWorkerd, u as atLeastOncePerMessage, v as defineScenario, w as fetchCall, x as durableObjectTable, y as durableObject, z as unique } from "./workerd-DVJ8eCLI.mjs";
3
+ export { atLeastOnce, atLeastOncePerMessage, atMostOncePerKey, callee, calleeEnv, check, checkInWorkerd, cloudflareRegressionTest, createCloudflarePlatform, cron, d1Param, d1Read, d1Rows, d1Schema, d1Write, defineScenario, durableObject, durableObjectRows, durableObjectTable, everyRow, expectHolds, external, fetchCall, http, httpResponse, implies, queue, queueAck, r2Bucket, r2Op, r2Rows, references, refines, rpc, rpcResponse, runDifferential, service, serviceCall, snapshotD1, unique, webSocketReceived, websocket, workflow, workflowRows, workflowStep };
@@ -1,4 +1,4 @@
1
- import { F as getPath } from "./src-DGh7w877.mjs";
1
+ import { I as getPath } from "./src-DPCF2XGv.mjs";
2
2
  // packages/core/src/delivery.ts
3
3
  /** The invocation one attempt of an event runs as: `<event>#<attempt>`, so a schedule's faults stay keyed when other events are removed. */
4
4
  function invocationOf(event) {
@@ -59,4 +59,4 @@ function atLeastOncePerMessage(name, events, effect, key, bodyKey) {
59
59
  }
60
60
  export { redelivery as a, invocationOf as i, atLeastOncePerMessage as n, atMostOncePerKey as r, atLeastOnce as t };
61
61
 
62
- //# sourceMappingURL=delivery-invariants-Br29H7Rg.mjs.map
62
+ //# sourceMappingURL=delivery-invariants-_T9ZMwOJ.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"delivery-invariants-Br29H7Rg.mjs","names":[],"sources":["../../core/src/delivery.ts","../../core/src/delivery-invariants.ts"],"sourcesContent":["/**\n * The delivery conventions every platform shares, and the differential\n * runner's raw sides with them: how an attempt names its invocation, and\n * the redelivery rule, which applies the same reading of a platform's limit\n * without any of its proxy code.\n */\n\nimport type { EventRef } from \"./platform.ts\";\nimport type { Bounds } from \"./scenario.ts\";\n\n/** The invocation one attempt of an event runs as: `<event>#<attempt>`, so a schedule's faults stay keyed when other events are removed. */\nexport function invocationOf(event: EventRef): string {\n return `${event.id}#${event.attempt}`;\n}\n\n/**\n * The next attempt of an event that was not handled (a message not\n * acknowledged or deleted, a request its caller resends, an alarm that\n * failed), or null when it is dropped (dead-lettered, given up on). It is\n * delivered again while both the platform's own limit on redeliveries\n * (Queues' `max_retries`, the caller's `retries`, SQS's `maxReceiveCount`\n * less the first delivery, an alarm's six retries) and the scenario's\n * `maxRedeliveries` leave room; the redeliveries so far are `attempt - 1`.\n * Pure.\n */\nexport function redelivery(\n event: EventRef,\n limit: number,\n bounds: Pick<Bounds, \"maxRedeliveries\">,\n): EventRef | null {\n const redeliveries = event.attempt - 1;\n if (redeliveries >= limit || redeliveries >= bounds.maxRedeliveries) return null;\n return { ...event, attempt: event.attempt + 1 };\n}\n","/**\n * Constructors for the delivery invariants every platform's scenarios use:\n * nothing delivered twice, nothing lost. Platforms wrap them to take their\n * own drive shapes.\n */\n\nimport type { JsonValue } from \"./canonical-json.ts\";\nimport type { AtLeastOnce, AtMostOncePerKey } from \"./invariants.ts\";\nimport { type EffectSelector, getPath } from \"./selectors.ts\";\n\nexport function atMostOncePerKey(\n name: string,\n effect: EffectSelector,\n key: string,\n): AtMostOncePerKey {\n return { kind: \"atMostOncePerKey\", name, effect, key };\n}\n\nexport function atLeastOnce(\n name: string,\n effect: EffectSelector,\n key: string,\n expected: readonly JsonValue[],\n): AtLeastOnce {\n return { kind: \"atLeastOnce\", name, effect, key, expected };\n}\n\n/**\n * Every event's `bodyKey` value must appear at least once as `key` in a\n * selected effect. The expected keys are re-derived from the bodies that\n * remain when shrinking removes events.\n */\nexport function atLeastOncePerMessage(\n name: string,\n events: readonly { readonly id: string; readonly body: JsonValue }[],\n effect: EffectSelector,\n key: string,\n bodyKey: string,\n): AtLeastOnce {\n const expected: JsonValue[] = [];\n for (const e of events) {\n const v = getPath(e.body, bodyKey);\n if (v === undefined)\n throw new Error(`event ${e.id} has no ${JSON.stringify(bodyKey)} in its body`);\n expected.push(v);\n }\n return { ...atLeastOnce(name, effect, key, expected), perMessage: { bodyKey } };\n}\n"],"mappings":";;;AAWA,SAAgB,aAAa,OAAyB;CACpD,OAAO,GAAG,MAAM,GAAG,GAAG,MAAM;AAC9B;;;;;;;;;;;AAYA,SAAgB,WACd,OACA,OACA,QACiB;CACjB,MAAM,eAAe,MAAM,UAAU;CACrC,IAAI,gBAAgB,SAAS,gBAAgB,OAAO,iBAAiB,OAAO;CAC5E,OAAO;EAAE,GAAG;EAAO,SAAS,MAAM,UAAU;CAAE;AAChD;;ACvBA,SAAgB,iBACd,MACA,QACA,KACkB;CAClB,OAAO;EAAE,MAAM;EAAoB;EAAM;EAAQ;CAAI;AACvD;AAEA,SAAgB,YACd,MACA,QACA,KACA,UACa;CACb,OAAO;EAAE,MAAM;EAAe;EAAM;EAAQ;EAAK;CAAS;AAC5D;;;;;;AAOA,SAAgB,sBACd,MACA,QACA,QACA,KACA,SACa;CACb,MAAM,WAAwB,CAAC;CAC/B,KAAK,MAAM,KAAK,QAAQ;EACtB,MAAM,IAAI,QAAQ,EAAE,MAAM,OAAO;EACjC,IAAI,MAAM,KAAA,GACR,MAAM,IAAI,MAAM,SAAS,EAAE,GAAG,UAAU,KAAK,UAAU,OAAO,EAAE,aAAa;EAC/E,SAAS,KAAK,CAAC;CACjB;CACA,OAAO;EAAE,GAAG,YAAY,MAAM,QAAQ,KAAK,QAAQ;EAAG,YAAY,EAAE,QAAQ;CAAE;AAChF"}
1
+ {"version":3,"file":"delivery-invariants-_T9ZMwOJ.mjs","names":[],"sources":["../../core/src/delivery.ts","../../core/src/delivery-invariants.ts"],"sourcesContent":["/**\n * The delivery conventions every platform shares, and the differential\n * runner's raw sides with them: how an attempt names its invocation, and\n * the redelivery rule, which applies the same reading of a platform's limit\n * without any of its proxy code.\n */\n\nimport type { EventRef } from \"./platform.ts\";\nimport type { Bounds } from \"./scenario.ts\";\n\n/** The invocation one attempt of an event runs as: `<event>#<attempt>`, so a schedule's faults stay keyed when other events are removed. */\nexport function invocationOf(event: EventRef): string {\n return `${event.id}#${event.attempt}`;\n}\n\n/**\n * The next attempt of an event that was not handled (a message not\n * acknowledged or deleted, a request its caller resends, an alarm that\n * failed), or null when it is dropped (dead-lettered, given up on). It is\n * delivered again while both the platform's own limit on redeliveries\n * (Queues' `max_retries`, the caller's `retries`, SQS's `maxReceiveCount`\n * less the first delivery, an alarm's six retries) and the scenario's\n * `maxRedeliveries` leave room; the redeliveries so far are `attempt - 1`.\n * Pure.\n */\nexport function redelivery(\n event: EventRef,\n limit: number,\n bounds: Pick<Bounds, \"maxRedeliveries\">,\n): EventRef | null {\n const redeliveries = event.attempt - 1;\n if (redeliveries >= limit || redeliveries >= bounds.maxRedeliveries) return null;\n return { ...event, attempt: event.attempt + 1 };\n}\n","/**\n * Constructors for the delivery invariants every platform's scenarios use:\n * nothing delivered twice, nothing lost. Platforms wrap them to take their\n * own drive shapes.\n */\n\nimport type { JsonValue } from \"./canonical-json.ts\";\nimport type { AtLeastOnce, AtMostOncePerKey } from \"./invariants.ts\";\nimport { type EffectSelector, getPath } from \"./selectors.ts\";\n\nexport function atMostOncePerKey(\n name: string,\n effect: EffectSelector,\n key: string,\n): AtMostOncePerKey {\n return { kind: \"atMostOncePerKey\", name, effect, key };\n}\n\nexport function atLeastOnce(\n name: string,\n effect: EffectSelector,\n key: string,\n expected: readonly JsonValue[],\n): AtLeastOnce {\n return { kind: \"atLeastOnce\", name, effect, key, expected };\n}\n\n/**\n * Every event's `bodyKey` value must appear at least once as `key` in a\n * selected effect. The expected keys are re-derived from the bodies that\n * remain when shrinking removes events.\n */\nexport function atLeastOncePerMessage(\n name: string,\n events: readonly { readonly id: string; readonly body: JsonValue }[],\n effect: EffectSelector,\n key: string,\n bodyKey: string,\n): AtLeastOnce {\n const expected: JsonValue[] = [];\n for (const e of events) {\n const v = getPath(e.body, bodyKey);\n if (v === undefined)\n throw new Error(`event ${e.id} has no ${JSON.stringify(bodyKey)} in its body`);\n expected.push(v);\n }\n return { ...atLeastOnce(name, effect, key, expected), perMessage: { bodyKey } };\n}\n"],"mappings":";;;AAWA,SAAgB,aAAa,OAAyB;CACpD,OAAO,GAAG,MAAM,GAAG,GAAG,MAAM;AAC9B;;;;;;;;;;;AAYA,SAAgB,WACd,OACA,OACA,QACiB;CACjB,MAAM,eAAe,MAAM,UAAU;CACrC,IAAI,gBAAgB,SAAS,gBAAgB,OAAO,iBAAiB,OAAO;CAC5E,OAAO;EAAE,GAAG;EAAO,SAAS,MAAM,UAAU;CAAE;AAChD;;ACvBA,SAAgB,iBACd,MACA,QACA,KACkB;CAClB,OAAO;EAAE,MAAM;EAAoB;EAAM;EAAQ;CAAI;AACvD;AAEA,SAAgB,YACd,MACA,QACA,KACA,UACa;CACb,OAAO;EAAE,MAAM;EAAe;EAAM;EAAQ;EAAK;CAAS;AAC5D;;;;;;AAOA,SAAgB,sBACd,MACA,QACA,QACA,KACA,SACa;CACb,MAAM,WAAwB,CAAC;CAC/B,KAAK,MAAM,KAAK,QAAQ;EACtB,MAAM,IAAI,QAAQ,EAAE,MAAM,OAAO;EACjC,IAAI,MAAM,KAAA,GACR,MAAM,IAAI,MAAM,SAAS,EAAE,GAAG,UAAU,KAAK,UAAU,OAAO,EAAE,aAAa;EAC/E,SAAS,KAAK,CAAC;CACjB;CACA,OAAO;EAAE,GAAG,YAAY,MAAM,QAAQ,KAAK,QAAQ;EAAG,YAAY,EAAE,QAAQ;CAAE;AAChF"}
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { D as checkInvariants, E as checkInvariant, T as validateScenario, a as explore, o as replay, s as restrictSpec, t as observeCore } from "./src-DGh7w877.mjs";
2
- import { a as renderText, f as checkedRung, i as renderSpecs, l as specLadder, o as renderTrace, s as emitRegressionTest, t as renderJson, u as testedRung, y as describeVerdict } from "./src-5pKRvj02.mjs";
1
+ import { D as checkInvariant, E as validateScenario, O as checkInvariants, a as explore, o as replay, s as restrictSpec, t as observeCore } from "./src-DPCF2XGv.mjs";
2
+ import { a as renderText, f as checkedRung, i as renderSpecs, l as specLadder, o as renderTrace, s as emitRegressionTest, t as renderJson, u as testedRung, y as describeVerdict } from "./src-ClXnIi6O.mjs";
3
3
  import { t as aggregate } from "./provers-DS44OeEm.mjs";
4
4
  // packages/core/src/spec-verdict.ts
5
5
  /** One line per spec verdict, for error messages; full rendering lives in `report`. */
@@ -1,4 +1,4 @@
1
- import { I as canonicalJson, M as nextInt, N as nextU32, P as seedPrng, j as nextFloat } from "./src-DGh7w877.mjs";
1
+ import { F as seedPrng, L as canonicalJson, M as nextFloat, N as nextInt, P as nextU32 } from "./src-DPCF2XGv.mjs";
2
2
  import { n as isSpec } from "./combinators-CVjxodAJ.mjs";
3
3
  // packages/core/src/verdict.ts
4
4
  /** One line per verdict, for error messages; full rendering lives in `report`. */
@@ -1623,4 +1623,4 @@ function renderText(verdict) {
1623
1623
  }
1624
1624
  export { render as _, renderText as a, checkSpecModule as c, shrinkRefutation as d, checkedRung as f, endpointNumber as g, endpointBigInt as h, renderSpecs as i, specLadder as l, conforms as m, renderSpecReport as n, renderTrace as o, evaluate as p, renderSpecReportJson as r, emitRegressionTest as s, renderJson as t, testedRung as u, describeType as v, describeVerdict as y };
1625
1625
 
1626
- //# sourceMappingURL=src-5pKRvj02.mjs.map
1626
+ //# sourceMappingURL=src-ClXnIi6O.mjs.map