eutaxy 0.16.1 → 0.17.1

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.
Files changed (32) hide show
  1. package/README.md +6 -6
  2. package/dist/aws.d.mts +2 -2
  3. package/dist/aws.mjs +2 -2
  4. package/dist/bin.mjs +1 -1
  5. package/dist/{cli-KACykdzJ.mjs → cli-CxbXc1j2.mjs} +22 -10
  6. package/dist/{cli-KACykdzJ.mjs.map → cli-CxbXc1j2.mjs.map} +1 -1
  7. package/dist/cli.mjs +1 -1
  8. package/dist/cloudflare.d.mts +48 -5
  9. package/dist/cloudflare.d.mts.map +1 -1
  10. package/dist/cloudflare.mjs +3 -3
  11. package/dist/{delivery-invariants-B8ZZnCZg.d.mts → delivery-invariants-D7DI7i8x.d.mts} +2 -2
  12. package/dist/{delivery-invariants-B8ZZnCZg.d.mts.map → delivery-invariants-D7DI7i8x.d.mts.map} +1 -1
  13. package/dist/{delivery-invariants-BfRnb9yR.mjs → delivery-invariants-DO3j1mmD.mjs} +2 -2
  14. package/dist/{delivery-invariants-BfRnb9yR.mjs.map → delivery-invariants-DO3j1mmD.mjs.map} +1 -1
  15. package/dist/{explore-DlwIUowm.d.mts → explore-CkKiOuz6.d.mts} +10 -2
  16. package/dist/explore-CkKiOuz6.d.mts.map +1 -0
  17. package/dist/index.d.mts +6 -3
  18. package/dist/index.d.mts.map +1 -1
  19. package/dist/index.mjs +2 -2
  20. package/dist/{platform-DPJTjpSr.d.mts → platform-D4hlJjm3.d.mts} +26 -1
  21. package/dist/{platform-DPJTjpSr.d.mts.map → platform-D4hlJjm3.d.mts.map} +1 -1
  22. package/dist/{src-dkn6Illb.mjs → src-D_hHC_-3.mjs} +416 -98
  23. package/dist/src-D_hHC_-3.mjs.map +1 -0
  24. package/dist/{src-DWRaG5aV.mjs → src-fxWc6oGc.mjs} +18 -5
  25. package/dist/src-fxWc6oGc.mjs.map +1 -0
  26. package/dist/{workerd-9Tt0BV-3.mjs → workerd-DhrzU6AZ.mjs} +4064 -3267
  27. package/dist/workerd-DhrzU6AZ.mjs.map +1 -0
  28. package/package.json +1 -1
  29. package/dist/explore-DlwIUowm.d.mts.map +0 -1
  30. package/dist/src-DWRaG5aV.mjs.map +0 -1
  31. package/dist/src-dkn6Illb.mjs.map +0 -1
  32. package/dist/workerd-9Tt0BV-3.mjs.map +0 -1
package/README.md CHANGED
@@ -21,8 +21,8 @@ on state that was still current.
21
21
 
22
22
  **Status: early.** The documentation is at
23
23
  [eutaxy.dev](https://eutaxy.dev). The design is in
24
- [docs/design.md](https://github.com/Kaisenwerk/eutaxy/blob/v0.16.1/docs/design.md); the phases and their gates are in
25
- [docs/roadmap.md](https://github.com/Kaisenwerk/eutaxy/blob/v0.16.1/docs/roadmap.md).
24
+ [docs/design.md](https://github.com/Kaisenwerk/eutaxy/blob/v0.17.1/docs/design.md); the phases and their gates are in
25
+ [docs/roadmap.md](https://github.com/Kaisenwerk/eutaxy/blob/v0.17.1/docs/roadmap.md).
26
26
 
27
27
  ## Verdicts
28
28
 
@@ -76,9 +76,9 @@ Write a scenario beside your Worker and run the check:
76
76
  eutaxy check ./payments.sim.ts
77
77
  ```
78
78
 
79
- [examples/payments-queue](https://github.com/Kaisenwerk/eutaxy/blob/v0.16.1/examples/payments-queue) is a complete, runnable
79
+ [examples/payments-queue](https://github.com/Kaisenwerk/eutaxy/blob/v0.17.1/examples/payments-queue) is a complete, runnable
80
80
  version of this: a queue consumer with a bug the check finds, and the fixed
81
- Worker it reports `BOUNDED` for. [examples/](https://github.com/Kaisenwerk/eutaxy/blob/v0.16.1/examples) holds the others,
81
+ Worker it reports `BOUNDED` for. [examples/](https://github.com/Kaisenwerk/eutaxy/blob/v0.17.1/examples) holds the others,
82
82
  each a Worker, its scenario, the bug and the fix: a webhook with an
83
83
  idempotency key, a lease pool object with an alarm, an Agent with a
84
84
  schedule and WebSocket connections, two Workers over a service binding,
@@ -153,8 +153,8 @@ pnpm install
153
153
  pnpm check # lint, typecheck, test
154
154
  ```
155
155
 
156
- See [CONTRIBUTING.md](https://github.com/Kaisenwerk/eutaxy/blob/v0.16.1/CONTRIBUTING.md).
156
+ See [CONTRIBUTING.md](https://github.com/Kaisenwerk/eutaxy/blob/v0.17.1/CONTRIBUTING.md).
157
157
 
158
158
  ## License
159
159
 
160
- [Apache-2.0](https://github.com/Kaisenwerk/eutaxy/blob/v0.16.1/LICENSE).
160
+ [Apache-2.0](https://github.com/Kaisenwerk/eutaxy/blob/v0.17.1/LICENSE).
package/dist/aws.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { C as EffectSelector, a as PlatformData, b as StateQuery, c as WorkerRef, f as Invariant, i as ExternalDecl, k as JsonValue, n as Platform, o as ScenarioSpec, r as Bounds, u as AtLeastOnce, y as RowCondition } from "./platform-DPJTjpSr.mjs";
2
- import { n as atMostOncePerKey } from "./delivery-invariants-B8ZZnCZg.mjs";
1
+ import { C as EffectSelector, a as PlatformData, b as StateQuery, c as WorkerRef, f as Invariant, i as ExternalDecl, k as JsonValue, n as Platform, o as ScenarioSpec, r as Bounds, u as AtLeastOnce, y as RowCondition } from "./platform-D4hlJjm3.mjs";
2
+ import { n as atMostOncePerKey } from "./delivery-invariants-D7DI7i8x.mjs";
3
3
  import { Readable } from "node:stream";
4
4
  import { Agent, AgentOptions } from "node:http";
5
5
  import { Agent as Agent$1, AgentOptions as AgentOptions$1 } from "node:https";
package/dist/aws.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { a as __toCommonJS, i as __require, n as __esmMin, o as __toESM, r as __exportAll, t as __commonJSMin } from "./rolldown-runtime-C1I3wEg2.mjs";
2
- import { A as writeFaults, C as toJson$1, I as invocationOf, L as redelivery, O as decisionFaults, R as canonicalJson, S as patchProperty, T as validateScenario, b as realTick, c as decide, d as runInvocation, i as rawRun, k as readFaults, n as compareSides, r as proxiedSide, u as note, w as defaultBounds } from "./src-dkn6Illb.mjs";
3
- import { n as atLeastOncePerMessage$1, r as atMostOncePerKey } from "./delivery-invariants-BfRnb9yR.mjs";
2
+ import { A as writeFaults, C as toJson$1, I as invocationOf, L as redelivery, O as decisionFaults, R as canonicalJson, S as patchProperty, T as validateScenario, b as realTick, c as decide, d as runInvocation, i as rawRun, k as readFaults, n as compareSides, r as proxiedSide, u as note, w as defaultBounds } from "./src-D_hHC_-3.mjs";
3
+ import { n as atLeastOncePerMessage$1, r as atMostOncePerKey } from "./delivery-invariants-DO3j1mmD.mjs";
4
4
  import { $ as booleanSelector, $t as ServiceException, A as BinaryDecisionDiagram, An as isValidHostLabel, B as NODE_REGION_CONFIG_FILE_OPTIONS, C as isIpAddress, Ct as dateToUtcString, Dt as parseRfc7231DateTime, E as EndpointError, En as normalizeProvider$1, Et as parseRfc3339DateTimeWithOffset, F as init_config$1, Fn as hasOwn, G as NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, H as REGION_ENV_NAME, Ht as NoOpLogger, It as fromBase64, Jt as resolveDefaultRuntimeConfig, Kt as getDefaultExtensionConfiguration, L as resolveDefaultsModeConfig, Ln as getSmithyContext, N as resolveParams, Nn as HttpRequest, Nt as toBase64, O as EndpointCache, On as isValidHostname, Ot as expectUnion, P as config_exports, Pt as fromUtf8, Qt as loadConfigsForDefaultMode, Rt as client_exports$1, Sn as parseUrl, Tt as parseEpochTimestamp, U as REGION_INI_NAME, V as NODE_REGION_CONFIG_OPTIONS, Vt as makeBuilder, Wt as getValueFromTextNode, X as loadConfig, Yt as emitWarningIfUnsupportedVersion$1, Z as SelectorType, _ as resolveEndpointConfig, _t as _parseRfc7231DateTime, b as decideEndpoint, bn as init_transport, bt as quoteHeader, c as generateIdempotencyToken, cn as TypeRegistry, ct as NumericValue, d as v4, en as decorateServiceException, ft as splitHeader, g as init_endpoints, gn as deref, gt as _parseRfc3339DateTimeWithOffset, h as getEndpointPlugin, ht as _parseEpochTimestamp, in as Command, jn as HttpResponse, jt as toUtf8, l as init_serde, m as endpoints_exports, mn as getSchemaSerdePlugin, mt as splitEvery, n as init_checksum, nn as createAggregatedClient, on as init_schema, p as sdkStreamMixin, pn as translateTraits, q as NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, r as Sha256Node, rt as calculateBodyLength, s as Uint8ArrayBlobAdapter, sn as schema_exports, t as checksum_exports, tt as ProviderError, u as serde_exports, un as NormalizedSchema, ut as nv, vn as Client$1, w as customEndpointFunctions, wn as parseQueryString, xt as LazyJsonString, y as resolveEndpoint, z as resolveRegionConfig, zn as require_dist_cjs$20, zt as init_client$1 } from "./checksum-75EliDEr.mjs";
5
5
  import { Readable } from "node:stream";
6
6
  import { platform, release } from "node:os";
package/dist/bin.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { t as main } from "./cli-KACykdzJ.mjs";
2
+ import { t as main } from "./cli-CxbXc1j2.mjs";
3
3
  // packages/eutaxy/src/bin.ts
4
4
  process.stdout.on("error", (err) => {
5
5
  if (err.code === "EPIPE") process.exit(process.exitCode ?? 0);
@@ -1,8 +1,8 @@
1
- import { R as canonicalJson } from "./src-dkn6Illb.mjs";
2
- import { _ as render, a as renderText, c as checkSpecModule, d as shrinkRefutation, g as endpointNumber, h as endpointBigInt, i as renderSpecs, m as conforms, n as renderSpecReport, p as evaluate, r as renderSpecReportJson, v as describeType } from "./src-DWRaG5aV.mjs";
1
+ import { R as canonicalJson } from "./src-D_hHC_-3.mjs";
2
+ import { _ as render, a as renderText, c as checkSpecModule, d as shrinkRefutation, g as endpointNumber, h as endpointBigInt, i as renderSpecs, m as conforms, n as renderSpecReport, p as evaluate, r as renderSpecReportJson, v as describeType } from "./src-fxWc6oGc.mjs";
3
3
  import { n as isSpec } from "./combinators-CLfsPfhT.mjs";
4
4
  import { t as aggregate } from "./provers-DS44OeEm.mjs";
5
- import { G as cloudflareRegressionTest, n as globKey, r as specKey } from "./workerd-9Tt0BV-3.mjs";
5
+ import { n as globKey, q as cloudflareRegressionTest, r as specKey } from "./workerd-DhrzU6AZ.mjs";
6
6
  import { createRequire, registerHooks } from "node:module";
7
7
  import { Readable } from "node:stream";
8
8
  import { createHash, randomBytes } from "node:crypto";
@@ -6640,7 +6640,7 @@ function checkTestSource(g) {
6640
6640
  const sqlImportLines = sqlImports.map((f, i) => `import sql_${i} from ${JSON.stringify(`${f.importPath}?raw`)};\n`);
6641
6641
  const workerImportLine = g.workerImport === void 0 ? "" : `import * as workerModule from ${JSON.stringify(g.workerImport)};\n`;
6642
6642
  const workerOption = g.workerImport === void 0 ? "" : ", worker: workerModule";
6643
- const calleesOption = callees.length === 0 ? "" : `, callees: { ${callees.map((c, i) => `${JSON.stringify(c.binding)}: { name: ${JSON.stringify(c.name)}, exports: callee_${i}${c.entrypoint === void 0 ? "" : `, entrypoint: ${JSON.stringify(c.entrypoint)}`}${c.props === void 0 ? "" : `, props: ${JSON.stringify(c.props)}`} }`).join(", ")} }`;
6643
+ const calleesOption = callees.length === 0 ? "" : `, callees: { ${callees.map((c, i) => `${JSON.stringify(c.binding)}: { name: ${JSON.stringify(c.name)}, exports: callee_${i}${c.entrypoint === void 0 ? "" : `, entrypoint: ${JSON.stringify(c.entrypoint)}`}${c.props === void 0 ? "" : `, props: ${JSON.stringify(c.props)}`}${c.self ? ", self: true" : ""} }`).join(", ")} }`;
6644
6644
  const extraSql = sqlImports.length === 0 ? "" : `, extraSql: { ${sqlImports.map((f, i) => `${JSON.stringify(f.key)}: sql_${i}`).join(", ")} }`;
6645
6645
  const aliases = g.aliases === void 0 || Object.keys(g.aliases).length === 0 ? "" : `, aliases: ${JSON.stringify(g.aliases)}`;
6646
6646
  return `// Generated by eutaxy check; deleted after the run.
@@ -6874,6 +6874,14 @@ function readTransport(reportPath) {
6874
6874
  }
6875
6875
  return null;
6876
6876
  }
6877
+ /**
6878
+ * Whether a regression test for a scenario with these setup steps is given the Cloudflare test
6879
+ * helpers: real objects are reset and snapshotted through them, and a scripted namespace is watched
6880
+ * through them for an object that ran after all.
6881
+ */
6882
+ function needsObjectHelpers(setup) {
6883
+ return setup.some((s) => s.kind === "durable_object" || s.kind === "scripted_object");
6884
+ }
6877
6885
  function toPosix(p) {
6878
6886
  const s = p.split("\\").join("/");
6879
6887
  return s.startsWith(".") ? s : `./${s}`;
@@ -6914,8 +6922,11 @@ async function runCheck(o) {
6914
6922
  o.stderr(`could not read the scenario's callees: ${String(err)}\n`);
6915
6923
  return exitCodes.error;
6916
6924
  }
6917
- for (const c of callees) if (c.notAdded.length > 0) o.stderr(`callee ${describeCallee(c, dir)}: not added to the test's isolate: ${c.notAdded.join(", ")}\n`);
6918
6925
  const callerResources = readCallerResources(wrangler);
6926
+ const isSelf = (c) => callerResources?.name !== void 0 && c.name === callerResources.name;
6927
+ const allCallees = callees;
6928
+ callees = allCallees.filter((c) => !isSelf(c));
6929
+ for (const c of callees) if (c.notAdded.length > 0) o.stderr(`callee ${describeCallee(c, dir)}: not added to the test's isolate: ${c.notAdded.join(", ")}\n`);
6919
6930
  const isolate = isolateOf(callees, callees.length > 0 ? callerResources : void 0);
6920
6931
  const callerServices = (callerResources?.services ?? []).map((s) => s.binding).filter((b) => b);
6921
6932
  for (const reason of isolate.notAdded) o.stderr(`not added to the test's isolate: ${reason}\n`);
@@ -6940,11 +6951,12 @@ async function runCheck(o) {
6940
6951
  ...o.exhaustive ? { exhaustive: true } : {},
6941
6952
  scenarioImport: `../${basename(scenarioPath)}`,
6942
6953
  ...loaded && outside(loaded.worker.entry) ? { workerImport: toPosix(relative(workDir, resolve(dir, loaded.worker.entry))) } : {},
6943
- ...callees.length === 0 ? {} : { callees: callees.map((c) => ({
6954
+ ...allCallees.length === 0 ? {} : { callees: allCallees.map((c) => ({
6944
6955
  binding: c.binding,
6945
6956
  name: c.name,
6946
6957
  importPath: toPosix(relative(workDir, c.entry)),
6947
- ...bindingCarries(callerResources, c.binding, callees)
6958
+ ...bindingCarries(callerResources, c.binding, callees),
6959
+ ...isSelf(c) ? { self: true } : {}
6948
6960
  })) },
6949
6961
  ...sqlImports.length === 0 ? {} : { sqlImports },
6950
6962
  ...Object.keys(isolate.aliases).length === 0 ? {} : { aliases: isolate.aliases }
@@ -7026,7 +7038,7 @@ async function runCheck(o) {
7026
7038
  ...transport.aliases === void 0 ? {} : { aliases: transport.aliases }
7027
7039
  },
7028
7040
  ...o.budgetMs === void 0 ? {} : { budgetMs: o.budgetMs },
7029
- ...transport.setup.some((s) => s.kind === "durable_object") ? { durableObjects: true } : {},
7041
+ ...needsObjectHelpers(transport.setup) ? { durableObjects: true } : {},
7030
7042
  ...transport.setup.some((s) => s.kind === "workflow") || transport.drive?.kind === "rpc" && transport.drive["entrypoint"] !== void 0 ? { exports: true } : {},
7031
7043
  ...o.expectViolation ? { expect: "violates" } : {},
7032
7044
  ...(transport.observed ?? []).length > 0 ? { specModules: (transport.observed ?? []).map((m) => ({
@@ -8322,7 +8334,7 @@ async function runReport(o) {
8322
8334
  }
8323
8335
  // packages/cli/src/version.ts
8324
8336
  /** The published package's version, as the MCP server reports it; the release tooling keeps it in step. */
8325
- const eutaxyVersion = "0.16.1";
8337
+ const eutaxyVersion = "0.17.1";
8326
8338
  // packages/cli/src/mcp.ts
8327
8339
  /**
8328
8340
  * `eutaxy mcp`: a Model Context Protocol server over stdio, so a coding
@@ -9080,4 +9092,4 @@ async function main(argv, io) {
9080
9092
  }
9081
9093
  export { main as t };
9082
9094
 
9083
- //# sourceMappingURL=cli-KACykdzJ.mjs.map
9095
+ //# sourceMappingURL=cli-CxbXc1j2.mjs.map