automategraph 1.5.1 → 1.5.3
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/CHANGELOG.md +18 -5
- package/UPGRADE-PROPOSAL.md +141 -0
- package/docs/diagrams/c19-resilience-scenario.md +61 -0
- package/docs/diagrams/c19-resilience-scenario.mmd +28 -0
- package/docs/diagrams/c19-resilience-scenario.svg +181 -0
- package/examples/README.md +206 -0
- package/examples/branching-edges.ts +192 -0
- package/examples/branching-graph.ts +333 -0
- package/examples/branching-router.ts +475 -0
- package/examples/json-graph.ts +231 -0
- package/examples/json-scripts.ts +152 -0
- package/examples/order-flow.functions.cjs +32 -0
- package/examples/order-flow.graph.json +27 -0
- package/examples/order-flow.scripted.graph.json +68 -0
- package/js/examples/branching-edges.js +133 -0
- package/js/examples/branching-edges.js.map +1 -0
- package/js/examples/branching-graph.js +232 -0
- package/js/examples/branching-graph.js.map +1 -0
- package/js/examples/branching-router.js +305 -0
- package/js/examples/branching-router.js.map +1 -0
- package/js/examples/json-graph.js +197 -0
- package/js/examples/json-graph.js.map +1 -0
- package/js/examples/json-scripts.js +131 -0
- package/js/examples/json-scripts.js.map +1 -0
- package/js/tests/async.test.js +592 -0
- package/js/tests/async.test.js.map +1 -0
- package/js/tests/complex.test.js +972 -0
- package/js/tests/complex.test.js.map +1 -0
- package/js/tests/conformance.test.js +365 -0
- package/js/tests/conformance.test.js.map +1 -0
- package/js/tests/edges.test.js +702 -0
- package/js/tests/edges.test.js.map +1 -0
- package/js/tests/graphjson.test.js +504 -0
- package/js/tests/graphjson.test.js.map +1 -0
- package/js/tests/harness.js +192 -0
- package/js/tests/harness.js.map +1 -0
- package/js/tests/helpers.js +136 -0
- package/js/tests/helpers.js.map +1 -0
- package/js/tests/lint.test.js +317 -0
- package/js/tests/lint.test.js.map +1 -0
- package/js/tests/registry.test.js +705 -0
- package/js/tests/registry.test.js.map +1 -0
- package/js/tests/report.js +422 -0
- package/js/tests/report.js.map +1 -0
- package/js/tests/runner.js +67 -0
- package/js/tests/runner.js.map +1 -0
- package/js/tests/scripts.test.js +552 -0
- package/js/tests/scripts.test.js.map +1 -0
- package/js/tests/unit.test.js +1239 -0
- package/js/tests/unit.test.js.map +1 -0
- package/js/tests/upgrade.test.js +618 -0
- package/js/tests/upgrade.test.js.map +1 -0
- package/package.json +2 -9
- package/report/index.html +3727 -0
- package/report/report.json +3053 -0
- package/tests/async.test.ts +668 -0
- package/tests/complex.test.ts +1123 -0
- package/tests/conformance.test.ts +442 -0
- package/tests/edges.test.ts +848 -0
- package/tests/fixtures/scripts/bad-registration.cjs +4 -0
- package/tests/fixtures/scripts/broken.cjs +2 -0
- package/tests/fixtures/scripts/cjs-default.js +4 -0
- package/tests/fixtures/scripts/collide-a.cjs +4 -0
- package/tests/fixtures/scripts/collide-b.cjs +4 -0
- package/tests/fixtures/scripts/empty.cjs +2 -0
- package/tests/fixtures/scripts/esm-functions.mjs +10 -0
- package/tests/fixtures/scripts/esm-syntax.js +3 -0
- package/tests/fixtures/scripts/global-channel.cjs +6 -0
- package/tests/fixtures/scripts/global-channel.mjs +7 -0
- package/tests/fixtures/scripts/mismatch.cjs +4 -0
- package/tests/fixtures/scripts/needs-sibling.cjs +7 -0
- package/tests/fixtures/scripts/order.cjs +14 -0
- package/tests/fixtures/scripts/sibling-helper.cjs +3 -0
- package/tests/fixtures/scripts/throwing-global.mjs +6 -0
- package/tests/graphjson.test.ts +737 -0
- package/tests/harness.ts +291 -0
- package/tests/helpers.ts +216 -0
- package/tests/lint.test.ts +381 -0
- package/tests/registry.test.ts +1134 -0
- package/tests/report.ts +452 -0
- package/tests/runner.ts +58 -0
- package/tests/scripts.test.ts +970 -0
- package/tests/unit.test.ts +1192 -0
- package/tests/upgrade.test.ts +725 -0
- package/tools/server.mjs +152 -0
- package/tsconfig.browser.json +19 -0
- package/tsconfig.json +18 -0
- package/tsconfig.publish.json +13 -0
|
@@ -0,0 +1,592 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* ============================================================
|
|
3
|
+
* ASYNC NODE-CALLBACK PACK
|
|
4
|
+
* ------------------------------------------------------------
|
|
5
|
+
* The engine's contract is:
|
|
6
|
+
*
|
|
7
|
+
* readonly run: (context: NodeContext) => unknown | Promise<unknown>
|
|
8
|
+
*
|
|
9
|
+
* so `async` node callbacks (and any thenable-returning callback)
|
|
10
|
+
* are first-class. This pack proves the async contract holds on
|
|
11
|
+
* every code path: success, retry, ONTHROW, timeout, failure,
|
|
12
|
+
* cancellation, fan-out, checkpoints, events and error capture.
|
|
13
|
+
*
|
|
14
|
+
* These 20 cases are counted separately from the canonical
|
|
15
|
+
* 100 unit + 20 complex suites.
|
|
16
|
+
* ============================================================ */
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
const automategraph_1 = require("../src/automategraph");
|
|
19
|
+
const helpers_1 = require("./helpers");
|
|
20
|
+
const harness_1 = require("./harness");
|
|
21
|
+
const asy = (0, harness_1.suite)("async", "Node callbacks (async)");
|
|
22
|
+
const BIG = { timeoutMs: 20_000 };
|
|
23
|
+
/* A-01 — the baseline async contract */
|
|
24
|
+
asy.t("an async node callback is awaited and its resolved value becomes the output", async (t) => {
|
|
25
|
+
const definition = (0, helpers_1.g)({
|
|
26
|
+
nodes: [(0, helpers_1.node)("async-node", async () => { await (0, helpers_1.sleep)(10); return "async-result"; })],
|
|
27
|
+
entryNodes: ["async-node"],
|
|
28
|
+
terminalNodes: ["async-node"]
|
|
29
|
+
});
|
|
30
|
+
const report = await new automategraph_1.GraphExecutionEngine(definition).run();
|
|
31
|
+
if (report.status !== "COMPLETED")
|
|
32
|
+
throw new Error(report.status);
|
|
33
|
+
if (report.outputs["async-node"] !== "async-result")
|
|
34
|
+
throw new Error(String(report.outputs["async-node"]));
|
|
35
|
+
if (report.results[0].status !== "SUCCEEDED")
|
|
36
|
+
throw new Error(report.results[0].status);
|
|
37
|
+
t.log("finding: NodeContext signals are typed as AbortSignal even in older @types/node DOM-less libs, " +
|
|
38
|
+
"so async callbacks can consume context.signal without casting");
|
|
39
|
+
}, BIG);
|
|
40
|
+
/* A-02 — sync callback returning a thenable */
|
|
41
|
+
asy.t("a non-async callback that returns a thenable is also awaited", async (t) => {
|
|
42
|
+
const definition = (0, helpers_1.g)({
|
|
43
|
+
nodes: [
|
|
44
|
+
(0, helpers_1.node)("thenable", () => {
|
|
45
|
+
// deliberately NOT an async function
|
|
46
|
+
return { then: (resolve) => setTimeout(() => resolve("thenable-done"), 5) };
|
|
47
|
+
})
|
|
48
|
+
],
|
|
49
|
+
entryNodes: ["thenable"],
|
|
50
|
+
terminalNodes: ["thenable"]
|
|
51
|
+
});
|
|
52
|
+
const report = await new automategraph_1.GraphExecutionEngine(definition).run();
|
|
53
|
+
if (report.status !== "COMPLETED")
|
|
54
|
+
throw new Error(report.status);
|
|
55
|
+
if (report.outputs.thenable !== "thenable-done")
|
|
56
|
+
throw new Error(String(report.outputs.thenable));
|
|
57
|
+
}, BIG);
|
|
58
|
+
/* A-03 — async without an explicit return yields undefined, not an error */
|
|
59
|
+
asy.t("async callback with no return value produces an undefined output", async (t) => {
|
|
60
|
+
const definition = (0, helpers_1.g)({
|
|
61
|
+
nodes: [(0, helpers_1.node)("void-async", async () => { await (0, helpers_1.sleep)(5); /* no return */ })],
|
|
62
|
+
entryNodes: ["void-async"],
|
|
63
|
+
terminalNodes: ["void-async"]
|
|
64
|
+
});
|
|
65
|
+
const report = await new automategraph_1.GraphExecutionEngine(definition).run();
|
|
66
|
+
if (report.status !== "COMPLETED")
|
|
67
|
+
throw new Error(report.status);
|
|
68
|
+
if (!("void-async" in report.outputs))
|
|
69
|
+
throw new Error("output key missing");
|
|
70
|
+
if (report.outputs["void-async"] !== undefined)
|
|
71
|
+
throw new Error("expected undefined");
|
|
72
|
+
}, BIG);
|
|
73
|
+
/* A-04 — rejection of async callbacks is captured as a GraphError */
|
|
74
|
+
asy.t("a rejected async callback is captured with code, stack and path", async (t) => {
|
|
75
|
+
const definition = (0, helpers_1.g)({
|
|
76
|
+
nodes: [
|
|
77
|
+
(0, helpers_1.constNode)("a", "A", { next: ["boom"] }),
|
|
78
|
+
(0, helpers_1.node)("boom", async () => {
|
|
79
|
+
await (0, helpers_1.sleep)(5);
|
|
80
|
+
throw new Error("async-rejection");
|
|
81
|
+
})
|
|
82
|
+
],
|
|
83
|
+
entryNodes: ["a"],
|
|
84
|
+
terminalNodes: ["boom"]
|
|
85
|
+
});
|
|
86
|
+
const report = await new automategraph_1.GraphExecutionEngine(definition).run();
|
|
87
|
+
if (report.status !== "FAILED")
|
|
88
|
+
throw new Error(report.status);
|
|
89
|
+
if (report.results.find(result => result.nodeId === "boom").status !== "FAILED")
|
|
90
|
+
throw new Error("status");
|
|
91
|
+
if (report.errors.length !== 1)
|
|
92
|
+
throw new Error(`errors=${report.errors.length}`);
|
|
93
|
+
const error = report.errors[0];
|
|
94
|
+
if (error.message !== "async-rejection")
|
|
95
|
+
throw new Error(error.message);
|
|
96
|
+
if (error.code !== "NODE_EXECUTION_ERROR")
|
|
97
|
+
throw new Error(error.code);
|
|
98
|
+
if (!error.stack || !error.stack.includes("async-rejection"))
|
|
99
|
+
throw new Error("stack missing");
|
|
100
|
+
if (error.path.join("/") !== "a/boom")
|
|
101
|
+
throw new Error(error.path.join("/"));
|
|
102
|
+
if (error.handled)
|
|
103
|
+
throw new Error("should be unhandled");
|
|
104
|
+
t.log("captured stack head", error.stack.split("\n")[0]);
|
|
105
|
+
}, BIG);
|
|
106
|
+
/* A-05 — AutomateGraphError shaped rejections keep their code and details */
|
|
107
|
+
asy.t("async rejections with AutomateGraphError preserve code and details", async (t) => {
|
|
108
|
+
const definition = (0, helpers_1.g)({
|
|
109
|
+
nodes: [
|
|
110
|
+
(0, helpers_1.node)("app-async", async () => {
|
|
111
|
+
await (0, helpers_1.sleep)(5);
|
|
112
|
+
throw new automategraph_1.AutomateGraphError("upstream unavailable", "UPSTREAM_DOWN", { service: "billing" });
|
|
113
|
+
})
|
|
114
|
+
],
|
|
115
|
+
entryNodes: ["app-async"],
|
|
116
|
+
terminalNodes: ["app-async"]
|
|
117
|
+
});
|
|
118
|
+
const report = await new automategraph_1.GraphExecutionEngine(definition).run();
|
|
119
|
+
const error = report.errors[0];
|
|
120
|
+
if (error.code !== "UPSTREAM_DOWN")
|
|
121
|
+
throw new Error(error.code);
|
|
122
|
+
if (error.details.service !== "billing")
|
|
123
|
+
throw new Error("details lost");
|
|
124
|
+
t.log("finding: TimeoutError is identified by class OR by a NODE_TIMEOUT-family code, so async " +
|
|
125
|
+
"rejections carrying that code are classified as TIMED_OUT");
|
|
126
|
+
}, BIG);
|
|
127
|
+
/* A-06 — async retry: succeed on the final attempt */
|
|
128
|
+
asy.t("async retry callback recovers on a later attempt inside one activation", async (t) => {
|
|
129
|
+
let attempts = 0;
|
|
130
|
+
const definition = (0, helpers_1.g)({
|
|
131
|
+
nodes: [
|
|
132
|
+
(0, helpers_1.node)("async-flaky", async () => {
|
|
133
|
+
attempts += 1;
|
|
134
|
+
await (0, helpers_1.sleep)(5);
|
|
135
|
+
if (attempts < 3)
|
|
136
|
+
throw new Error(`async-fail-${attempts}`);
|
|
137
|
+
return "async-recovered";
|
|
138
|
+
}, { retry: { maxAttempts: 3, delayMs: 5 }, errorPolicy: "RETRY" })
|
|
139
|
+
],
|
|
140
|
+
entryNodes: ["async-flaky"],
|
|
141
|
+
terminalNodes: ["async-flaky"]
|
|
142
|
+
});
|
|
143
|
+
const report = await new automategraph_1.GraphExecutionEngine(definition).run();
|
|
144
|
+
if (attempts !== 3)
|
|
145
|
+
throw new Error(`attempts=${attempts}`);
|
|
146
|
+
if (report.results[0].attempt !== 3)
|
|
147
|
+
throw new Error(`attempt=${report.results[0].attempt}`);
|
|
148
|
+
if (report.results[0].status !== "SUCCEEDED")
|
|
149
|
+
throw new Error(report.results[0].status);
|
|
150
|
+
if (report.errors.length !== 0)
|
|
151
|
+
throw new Error("recovered attempts must not record errors");
|
|
152
|
+
if (report.outputs["async-flaky"] !== "async-recovered")
|
|
153
|
+
throw new Error("output missing");
|
|
154
|
+
}, BIG);
|
|
155
|
+
/* A-07 — async retry with a custom errorPolicy fixture */
|
|
156
|
+
asy.t("async callback can be retried by a custom node errorPolicy (RETRY)", async (t) => {
|
|
157
|
+
let attempts = 0;
|
|
158
|
+
const definition = (0, helpers_1.g)({
|
|
159
|
+
nodes: [
|
|
160
|
+
(0, helpers_1.node)("policy-retry", async () => {
|
|
161
|
+
attempts += 1;
|
|
162
|
+
await (0, helpers_1.sleep)(3);
|
|
163
|
+
if (attempts === 1)
|
|
164
|
+
throw new Error("first-async-fail");
|
|
165
|
+
return "second-async-ok";
|
|
166
|
+
}, { retry: { maxAttempts: 2 }, errorPolicy: "RETRY", next: ["tail"] }),
|
|
167
|
+
(0, helpers_1.constNode)("tail", "TAIL")
|
|
168
|
+
],
|
|
169
|
+
entryNodes: ["policy-retry"],
|
|
170
|
+
terminalNodes: ["tail"]
|
|
171
|
+
});
|
|
172
|
+
const report = await new automategraph_1.GraphExecutionEngine(definition).run();
|
|
173
|
+
if (attempts !== 2)
|
|
174
|
+
throw new Error(`attempts=${attempts}`);
|
|
175
|
+
if (report.status !== "COMPLETED")
|
|
176
|
+
throw new Error(report.status);
|
|
177
|
+
if (report.results[0].attempt !== 2)
|
|
178
|
+
throw new Error("final attempt not recorded");
|
|
179
|
+
if (!report.results.some(result => result.nodeId === "tail"))
|
|
180
|
+
throw new Error("successor skipped");
|
|
181
|
+
}, BIG);
|
|
182
|
+
/* A-08 — async ONTHROW repair */
|
|
183
|
+
asy.t("async rejection routes through ONTHROW into an async repair callback", async (t) => {
|
|
184
|
+
let failures = 0;
|
|
185
|
+
const definition = (0, helpers_1.g)({
|
|
186
|
+
nodes: [
|
|
187
|
+
(0, helpers_1.node)("async-broken", async () => { failures += 1; await (0, helpers_1.sleep)(5); throw new Error("async-explode"); }, {
|
|
188
|
+
onThrow: "async-repair"
|
|
189
|
+
}),
|
|
190
|
+
(0, helpers_1.node)("async-repair", async () => { await (0, helpers_1.sleep)(5); return "ASYNC-REPAIRED"; }, { next: ["finish"] }),
|
|
191
|
+
(0, helpers_1.constNode)("finish", "END")
|
|
192
|
+
],
|
|
193
|
+
entryNodes: ["async-broken"],
|
|
194
|
+
terminalNodes: ["finish"]
|
|
195
|
+
});
|
|
196
|
+
const report = await new automategraph_1.GraphExecutionEngine(definition).run();
|
|
197
|
+
if (failures !== 1)
|
|
198
|
+
throw new Error(`async-broken ran ${failures} times`);
|
|
199
|
+
if (report.status !== "COMPLETED")
|
|
200
|
+
throw new Error(report.status);
|
|
201
|
+
if (report.outputs["async-repair"] !== "ASYNC-REPAIRED")
|
|
202
|
+
throw new Error("repair output missing");
|
|
203
|
+
if (!report.errors[0].handled)
|
|
204
|
+
throw new Error("repair error must be handled");
|
|
205
|
+
if (report.results.find(result => result.nodeId === "async-broken").status !== "FAILED")
|
|
206
|
+
throw new Error("status");
|
|
207
|
+
}, BIG);
|
|
208
|
+
/* A-09 — async timeout */
|
|
209
|
+
asy.t("a slow async callback is preempted by timeoutMs and reported TIMED_OUT", async (t) => {
|
|
210
|
+
let settledLate = false;
|
|
211
|
+
const definition = (0, helpers_1.g)({
|
|
212
|
+
nodes: [
|
|
213
|
+
(0, helpers_1.node)("async-slow", async () => {
|
|
214
|
+
await (0, helpers_1.sleep)(120);
|
|
215
|
+
settledLate = true;
|
|
216
|
+
return "too-late";
|
|
217
|
+
}, { timeoutMs: 25 })
|
|
218
|
+
],
|
|
219
|
+
entryNodes: ["async-slow"],
|
|
220
|
+
terminalNodes: ["async-slow"]
|
|
221
|
+
});
|
|
222
|
+
const startedAt = Date.now();
|
|
223
|
+
const report = await new automategraph_1.GraphExecutionEngine(definition).run();
|
|
224
|
+
const durationMs = Date.now() - startedAt;
|
|
225
|
+
if (report.status !== "FAILED")
|
|
226
|
+
throw new Error(report.status);
|
|
227
|
+
if (report.results[0].status !== "TIMED_OUT")
|
|
228
|
+
throw new Error(report.results[0].status);
|
|
229
|
+
if (report.results[0].output !== undefined)
|
|
230
|
+
throw new Error("timed-out async output must be discarded");
|
|
231
|
+
if (durationMs >= 110)
|
|
232
|
+
throw new Error(`timeout not enforced (${durationMs}ms)`);
|
|
233
|
+
if (report.errors[0].code !== "NODE_TIMEOUT")
|
|
234
|
+
throw new Error(report.errors[0].code);
|
|
235
|
+
await (0, helpers_1.sleep)(140);
|
|
236
|
+
if (!settledLate)
|
|
237
|
+
throw new Error("abandoned async callback never settled");
|
|
238
|
+
t.log("run duration", `${durationMs}ms (callback keeps running for 120ms)`);
|
|
239
|
+
t.log("finding: on timeout the async callback's later resolution is discarded — no output is recorded");
|
|
240
|
+
}, BIG);
|
|
241
|
+
/* A-10 — async cancellation is cooperative via context.signal */
|
|
242
|
+
asy.t("a cooperative async callback observes the abort and rejects; the run settles CANCELLED", async (t) => {
|
|
243
|
+
let sawAbort;
|
|
244
|
+
let aborted = false;
|
|
245
|
+
const definition = (0, helpers_1.g)({
|
|
246
|
+
nodes: [
|
|
247
|
+
(0, helpers_1.node)("async-cooperative", async (context) => {
|
|
248
|
+
const guard = new Promise((_, reject) => {
|
|
249
|
+
context.signal.addEventListener("abort", () => {
|
|
250
|
+
aborted = true;
|
|
251
|
+
const reason = context.signal.reason;
|
|
252
|
+
reject(reason instanceof Error ? reason : new automategraph_1.AutomateGraphError("aborted mid-await", "GRAPH_CANCELLED"));
|
|
253
|
+
});
|
|
254
|
+
});
|
|
255
|
+
// A real async workload: fall back to the abort guard instead of idle waiting.
|
|
256
|
+
await Promise.race([(0, helpers_1.sleep)(500).then(() => "unreached"), guard]);
|
|
257
|
+
sawAbort = context.signal.aborted;
|
|
258
|
+
return "unreached";
|
|
259
|
+
})
|
|
260
|
+
],
|
|
261
|
+
entryNodes: ["async-cooperative"],
|
|
262
|
+
terminalNodes: ["async-cooperative"]
|
|
263
|
+
});
|
|
264
|
+
const engine = new automategraph_1.GraphExecutionEngine(definition);
|
|
265
|
+
const running = engine.run();
|
|
266
|
+
await (0, helpers_1.sleep)(15);
|
|
267
|
+
await engine.cancel();
|
|
268
|
+
const report = await running;
|
|
269
|
+
if (!aborted)
|
|
270
|
+
throw new Error("abort event never reached the async callback");
|
|
271
|
+
if (report.status !== "CANCELLED")
|
|
272
|
+
throw new Error(report.status);
|
|
273
|
+
if (sawAbort !== undefined)
|
|
274
|
+
throw new Error("callback continued past the abort guard");
|
|
275
|
+
if (report.results.length !== 1)
|
|
276
|
+
throw new Error("unexpected extra activations");
|
|
277
|
+
// v1.1 (A1) fixed the asymmetry: rejecting because of the abort now
|
|
278
|
+
// settles exactly like resolving after it — NodeStatus CANCELLED and a
|
|
279
|
+
// handled GRAPH_CANCELLED record (previously FAILED + unhandled).
|
|
280
|
+
const nodeResult = report.results[0];
|
|
281
|
+
if (nodeResult.status !== "CANCELLED")
|
|
282
|
+
throw new Error(nodeResult.status);
|
|
283
|
+
if (report.errors.length !== 1)
|
|
284
|
+
throw new Error(`errors=${report.errors.length}`);
|
|
285
|
+
if (report.errors[0].code !== "GRAPH_CANCELLED")
|
|
286
|
+
throw new Error(report.errors[0].code);
|
|
287
|
+
if (!report.errors[0].handled)
|
|
288
|
+
throw new Error("cancellation error must be recorded as handled");
|
|
289
|
+
if (nodeResult.output !== undefined)
|
|
290
|
+
throw new Error("aborted callback must not record output");
|
|
291
|
+
// v1.1 (A6): the result carries its own error record.
|
|
292
|
+
if (!nodeResult.error)
|
|
293
|
+
throw new Error("result.error missing");
|
|
294
|
+
if (nodeResult.error.id !== report.errors[0].id)
|
|
295
|
+
throw new Error("result.error mismatch");
|
|
296
|
+
t.log("graph status", report.status, "| node status", nodeResult.status);
|
|
297
|
+
t.log("error record", `${report.errors[0].code} handled=${report.errors[0].handled}`);
|
|
298
|
+
t.log("finding: since v1.1 (A1) cooperative cancellation is symmetric — a callback that rejects " +
|
|
299
|
+
"because of the abort settles CANCELLED with a handled GRAPH_CANCELLED record, exactly like " +
|
|
300
|
+
"one that resolves after it; result.error now carries the record (A6)");
|
|
301
|
+
}, BIG);
|
|
302
|
+
/* A-11 — async callback that ignores cancellation */
|
|
303
|
+
asy.t("an async callback that ignores the signal delays settlement; successors stay unscheduled", async (t) => {
|
|
304
|
+
const definition = (0, helpers_1.g)({
|
|
305
|
+
nodes: [
|
|
306
|
+
(0, helpers_1.node)("stubborn-async", async () => { await (0, helpers_1.sleep)(60); return "finished-anyway"; }, { next: ["tail"] }),
|
|
307
|
+
(0, helpers_1.constNode)("tail", "TAIL")
|
|
308
|
+
],
|
|
309
|
+
entryNodes: ["stubborn-async"],
|
|
310
|
+
terminalNodes: ["tail"]
|
|
311
|
+
});
|
|
312
|
+
const engine = new automategraph_1.GraphExecutionEngine(definition);
|
|
313
|
+
const startedAt = Date.now();
|
|
314
|
+
const running = engine.run();
|
|
315
|
+
await (0, helpers_1.sleep)(10);
|
|
316
|
+
await engine.cancel();
|
|
317
|
+
const report = await running;
|
|
318
|
+
const durationMs = Date.now() - startedAt;
|
|
319
|
+
if (report.status !== "CANCELLED")
|
|
320
|
+
throw new Error(report.status);
|
|
321
|
+
if (durationMs < 40)
|
|
322
|
+
throw new Error(`settled too early (${durationMs}ms) — cooperative drain broken`);
|
|
323
|
+
if (report.results.some(result => result.nodeId === "tail"))
|
|
324
|
+
throw new Error("successor ran after cancel");
|
|
325
|
+
if (report.outputs.tail !== undefined)
|
|
326
|
+
throw new Error("successor output recorded");
|
|
327
|
+
t.log("drain time", `${durationMs}ms (callback sleeps 60ms and ignores the abort)`);
|
|
328
|
+
}, BIG);
|
|
329
|
+
/* A-12 — async node whose completion triggers a checkpoint */
|
|
330
|
+
asy.t("async completion triggers exactly one checkpoint per successful node", async (t) => {
|
|
331
|
+
const storage = new helpers_1.SpyStorage();
|
|
332
|
+
const definition = (0, helpers_1.linear)(["a", "b", "c"], async (id) => { await (0, helpers_1.sleep)(5); return `${id}-async`; });
|
|
333
|
+
const report = await new automategraph_1.GraphExecutionEngine(definition, { storage }).run();
|
|
334
|
+
if (report.status !== "COMPLETED")
|
|
335
|
+
throw new Error(report.status);
|
|
336
|
+
if (storage.calls !== 3)
|
|
337
|
+
throw new Error(`checkpoints=${storage.calls}`);
|
|
338
|
+
const last = storage.snapshots[storage.snapshots.length - 1];
|
|
339
|
+
if (last.outputs.c !== "c-async")
|
|
340
|
+
throw new Error("final snapshot incomplete");
|
|
341
|
+
if (Object.keys(last.outputs).length !== 3)
|
|
342
|
+
throw new Error("snapshot outputs mismatch");
|
|
343
|
+
}, BIG);
|
|
344
|
+
/* A-13 — async context.emit is awaited in order */
|
|
345
|
+
asy.t("context.emit from an async callback is awaited and ordered", async (t) => {
|
|
346
|
+
const seen = [];
|
|
347
|
+
const definition = (0, helpers_1.g)({
|
|
348
|
+
nodes: [
|
|
349
|
+
(0, helpers_1.node)("emitter", async (context) => {
|
|
350
|
+
await context.emit("async.first", { n: 1 });
|
|
351
|
+
await context.emit("async.second", { n: 2 });
|
|
352
|
+
return "emitted";
|
|
353
|
+
})
|
|
354
|
+
],
|
|
355
|
+
entryNodes: ["emitter"],
|
|
356
|
+
terminalNodes: ["emitter"]
|
|
357
|
+
});
|
|
358
|
+
const engine = new automategraph_1.GraphExecutionEngine(definition);
|
|
359
|
+
engine.events.on("async.first", () => { seen.push("first"); }, { required: true });
|
|
360
|
+
engine.events.on("async.second", async () => { await (0, helpers_1.sleep)(3); seen.push("second"); }, { required: true });
|
|
361
|
+
const report = await engine.run();
|
|
362
|
+
if (report.status !== "COMPLETED")
|
|
363
|
+
throw new Error(report.status);
|
|
364
|
+
if (seen.join(",") !== "first,second")
|
|
365
|
+
throw new Error(seen.join(","));
|
|
366
|
+
if (report.outputs.emitter !== "emitted")
|
|
367
|
+
throw new Error("output missing");
|
|
368
|
+
}, BIG);
|
|
369
|
+
/* A-14 — async parallelism */
|
|
370
|
+
asy.t("async callbacks on independent branches execute in parallel", async (t) => {
|
|
371
|
+
const definition = (0, helpers_1.g)({
|
|
372
|
+
nodes: [
|
|
373
|
+
(0, helpers_1.node)("root", () => "root", { next: ["p1", "p2", "p3", "p4"] }),
|
|
374
|
+
...["p1", "p2", "p3", "p4"].map(id => (0, helpers_1.node)(id, async () => { await (0, helpers_1.sleep)(40); return id; }))
|
|
375
|
+
],
|
|
376
|
+
entryNodes: ["root"],
|
|
377
|
+
terminalNodes: ["p4"]
|
|
378
|
+
});
|
|
379
|
+
const startedAt = Date.now();
|
|
380
|
+
const report = await new automategraph_1.GraphExecutionEngine(definition).run();
|
|
381
|
+
const durationMs = Date.now() - startedAt;
|
|
382
|
+
if (report.status !== "COMPLETED")
|
|
383
|
+
throw new Error(report.status);
|
|
384
|
+
if (report.results.filter(result => result.status === "SUCCEEDED").length !== 5) {
|
|
385
|
+
throw new Error("not all async branches succeeded");
|
|
386
|
+
}
|
|
387
|
+
if (durationMs >= 100)
|
|
388
|
+
throw new Error(`serialized: ${durationMs}ms for 4x40ms in parallel`);
|
|
389
|
+
t.log("wall time", `${durationMs}ms (serial would be ~160ms)`);
|
|
390
|
+
}, BIG);
|
|
391
|
+
/* A-15 — mixed sync/async pipeline keeps isolation */
|
|
392
|
+
asy.t("mixed sync and async nodes run together in one pipeline", async (t) => {
|
|
393
|
+
const definition = (0, helpers_1.g)({
|
|
394
|
+
id: "mixed-pipeline",
|
|
395
|
+
version: "1.0.0",
|
|
396
|
+
nodes: [
|
|
397
|
+
(0, helpers_1.node)("sync-validate", () => "valid", { next: ["async-enrich"] }),
|
|
398
|
+
(0, helpers_1.node)("async-enrich", async (context) => {
|
|
399
|
+
await (0, helpers_1.sleep)(5);
|
|
400
|
+
return `enriched(${context.outputs["sync-validate"]})`;
|
|
401
|
+
}, { next: ["sync-price"] }),
|
|
402
|
+
(0, helpers_1.node)("sync-price", context => `priced(${context.outputs["async-enrich"]})`, { next: ["async-store"] }),
|
|
403
|
+
(0, helpers_1.node)("async-store", async (context) => {
|
|
404
|
+
await (0, helpers_1.sleep)(5);
|
|
405
|
+
return `stored(${context.outputs["sync-price"]})`;
|
|
406
|
+
})
|
|
407
|
+
],
|
|
408
|
+
entryNodes: ["sync-validate"],
|
|
409
|
+
terminalNodes: ["async-store"]
|
|
410
|
+
});
|
|
411
|
+
const report = await new automategraph_1.GraphExecutionEngine(definition).run();
|
|
412
|
+
if (report.status !== "COMPLETED")
|
|
413
|
+
throw new Error(report.status);
|
|
414
|
+
const final = String(report.outputs["async-store"]);
|
|
415
|
+
if (final !== "stored(priced(enriched(valid)))")
|
|
416
|
+
throw new Error(final);
|
|
417
|
+
if (report.results.length !== 4)
|
|
418
|
+
throw new Error(`results=${report.results.length}`);
|
|
419
|
+
}, BIG);
|
|
420
|
+
/* A-16 — async callbacks composing the fast-path/retry/fatal branches */
|
|
421
|
+
asy.t("async callback composes success, retry and failure across a three-branch graph", async (t) => {
|
|
422
|
+
let fastAttempts = 0;
|
|
423
|
+
let retryAttempts = 0;
|
|
424
|
+
const definition = (0, helpers_1.g)({
|
|
425
|
+
nodes: [
|
|
426
|
+
(0, helpers_1.node)("root", () => "R", { next: ["async-fast", "async-retry", "async-fatal"] }),
|
|
427
|
+
(0, helpers_1.node)("async-fast", async () => { fastAttempts += 1; await (0, helpers_1.sleep)(5); return "fast-ok"; }),
|
|
428
|
+
(0, helpers_1.node)("async-retry", async () => {
|
|
429
|
+
retryAttempts += 1;
|
|
430
|
+
await (0, helpers_1.sleep)(5);
|
|
431
|
+
if (retryAttempts < 2)
|
|
432
|
+
throw new Error("async-once");
|
|
433
|
+
return "retry-ok";
|
|
434
|
+
}, { retry: { maxAttempts: 2 }, errorPolicy: "RETRY" }),
|
|
435
|
+
(0, helpers_1.node)("async-fatal", async () => { await (0, helpers_1.sleep)(5); throw new Error("async-fatal-error"); })
|
|
436
|
+
],
|
|
437
|
+
entryNodes: ["root"],
|
|
438
|
+
terminalNodes: ["async-fast"]
|
|
439
|
+
});
|
|
440
|
+
const report = await new automategraph_1.GraphExecutionEngine(definition).run();
|
|
441
|
+
if (fastAttempts !== 1)
|
|
442
|
+
throw new Error(`fastAttempts=${fastAttempts}`);
|
|
443
|
+
if (retryAttempts !== 2)
|
|
444
|
+
throw new Error(`retryAttempts=${retryAttempts}`);
|
|
445
|
+
if (report.status !== "FAILED")
|
|
446
|
+
throw new Error(report.status);
|
|
447
|
+
if (report.outputs["async-fast"] !== "fast-ok")
|
|
448
|
+
throw new Error("fast output missing");
|
|
449
|
+
if (report.outputs["async-retry"] !== "retry-ok")
|
|
450
|
+
throw new Error("retry output missing");
|
|
451
|
+
if (report.errors.length !== 1)
|
|
452
|
+
throw new Error(`errors=${report.errors.length}`);
|
|
453
|
+
if (report.errors[0].nodeId !== "async-fatal")
|
|
454
|
+
throw new Error(report.errors[0].nodeId);
|
|
455
|
+
t.log("fatal error path", report.errors[0].path.join("/"));
|
|
456
|
+
}, BIG);
|
|
457
|
+
/* A-17 — async state-machine callback through a sync node */
|
|
458
|
+
asy.t("an async callback returning a marker drives a synchronous state-machine successor", async (t) => {
|
|
459
|
+
const definition = (0, helpers_1.g)({
|
|
460
|
+
nodes: [
|
|
461
|
+
(0, helpers_1.node)("async-evaluate", async (context) => {
|
|
462
|
+
await (0, helpers_1.sleep)(5);
|
|
463
|
+
const marker = context.outputs.manual ?? "AUTO";
|
|
464
|
+
return marker;
|
|
465
|
+
}, { next: ["auto-path"] }),
|
|
466
|
+
(0, helpers_1.node)("auto-path", context => {
|
|
467
|
+
const marker = context.outputs["async-evaluate"];
|
|
468
|
+
if (marker !== "AUTO")
|
|
469
|
+
throw new Error(`unexpected marker ${String(marker)}`);
|
|
470
|
+
return "auto-done";
|
|
471
|
+
})
|
|
472
|
+
],
|
|
473
|
+
entryNodes: ["async-evaluate"],
|
|
474
|
+
terminalNodes: ["auto-path"]
|
|
475
|
+
});
|
|
476
|
+
const report = await new automategraph_1.GraphExecutionEngine(definition).run();
|
|
477
|
+
if (report.status !== "COMPLETED")
|
|
478
|
+
throw new Error(report.status);
|
|
479
|
+
if (report.outputs["auto-path"] !== "auto-done")
|
|
480
|
+
throw new Error("state machine diverged");
|
|
481
|
+
}, BIG);
|
|
482
|
+
/* A-18 — abandoned async work must not corrupt a later execution */
|
|
483
|
+
asy.t("an unrelated execution started after an abandoned async node is unaffected", async (t) => {
|
|
484
|
+
const abandoned = [];
|
|
485
|
+
const slow = (0, helpers_1.g)({
|
|
486
|
+
nodes: [
|
|
487
|
+
(0, helpers_1.node)("stubborn", async () => {
|
|
488
|
+
await (0, helpers_1.sleep)(150);
|
|
489
|
+
abandoned.push("late side effect");
|
|
490
|
+
return "late";
|
|
491
|
+
}, { timeoutMs: 20 })
|
|
492
|
+
],
|
|
493
|
+
entryNodes: ["stubborn"],
|
|
494
|
+
terminalNodes: ["stubborn"]
|
|
495
|
+
});
|
|
496
|
+
const first = await new automategraph_1.GraphExecutionEngine(slow).run();
|
|
497
|
+
if (first.status !== "FAILED")
|
|
498
|
+
throw new Error(first.status);
|
|
499
|
+
const second = await new automategraph_1.GraphExecutionEngine((0, helpers_1.linear)(["x", "y"], async (id) => `${id}!`)).run();
|
|
500
|
+
if (second.status !== "COMPLETED")
|
|
501
|
+
throw new Error(second.status);
|
|
502
|
+
if (second.outputs.y !== "y!")
|
|
503
|
+
throw new Error("second execution corrupted");
|
|
504
|
+
if (second.errors.length !== 0)
|
|
505
|
+
throw new Error("errors leaked between executions");
|
|
506
|
+
if (Object.keys(second.outputs).length !== 2)
|
|
507
|
+
throw new Error("outputs leaked between executions");
|
|
508
|
+
await (0, helpers_1.sleep)(160);
|
|
509
|
+
if (abandoned.length !== 1)
|
|
510
|
+
throw new Error("abandoned side effect did not run at all");
|
|
511
|
+
t.log("finding: the abandoned async node still performed its side effect after settlement — " +
|
|
512
|
+
"async cancellation is cooperative only; nothing can stop an in-flight promise");
|
|
513
|
+
}, BIG);
|
|
514
|
+
/* A-19 — async node emitting into a non-required listener */
|
|
515
|
+
asy.t("diverse async callbacks (timers, microtasks, thenables) are classified correctly", async (t) => {
|
|
516
|
+
const definition = (0, helpers_1.g)({
|
|
517
|
+
nodes: [
|
|
518
|
+
(0, helpers_1.node)("timer-node", async () => { await (0, helpers_1.sleep)(1); return "timer"; }, { next: ["microtask-node"] }),
|
|
519
|
+
(0, helpers_1.node)("microtask-node", async () => { await Promise.resolve(); return "microtask"; }, { next: ["thenable-node"] }),
|
|
520
|
+
(0, helpers_1.node)("thenable-node", () =>
|
|
521
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
522
|
+
globalThis.Promise.resolve("thenable"), { next: ["void-node"] }),
|
|
523
|
+
(0, helpers_1.node)("void-node", async () => { await (0, helpers_1.sleep)(1); })
|
|
524
|
+
],
|
|
525
|
+
entryNodes: ["timer-node"],
|
|
526
|
+
terminalNodes: ["void-node"]
|
|
527
|
+
});
|
|
528
|
+
const report = await new automategraph_1.GraphExecutionEngine(definition).run();
|
|
529
|
+
if (report.status !== "COMPLETED")
|
|
530
|
+
throw new Error(report.status);
|
|
531
|
+
if (report.outputs["timer-node"] !== "timer")
|
|
532
|
+
throw new Error("timer");
|
|
533
|
+
if (report.outputs["microtask-node"] !== "microtask")
|
|
534
|
+
throw new Error("microtask");
|
|
535
|
+
if (report.outputs["thenable-node"] !== "thenable")
|
|
536
|
+
throw new Error("thenable");
|
|
537
|
+
if (report.outputs["void-node"] !== undefined)
|
|
538
|
+
throw new Error("void");
|
|
539
|
+
if (report.results.every(result => result.status === "SUCCEEDED") !== true)
|
|
540
|
+
throw new Error("some failed");
|
|
541
|
+
}, BIG);
|
|
542
|
+
/* A-20 — async node used with the full plugin/storage stack */
|
|
543
|
+
asy.t("async callbacks integrate with plugins, storage snapshots and the execution report", async (t) => {
|
|
544
|
+
const events = [];
|
|
545
|
+
const storage = new helpers_1.SpyStorage();
|
|
546
|
+
const definition = (0, helpers_1.g)({
|
|
547
|
+
id: "async-integrated",
|
|
548
|
+
version: "3.0.0",
|
|
549
|
+
nodes: [
|
|
550
|
+
(0, helpers_1.node)("load", async () => { await (0, helpers_1.sleep)(5); return { rows: 3 }; }, { next: ["transform"] }),
|
|
551
|
+
(0, helpers_1.node)("transform", async (context) => {
|
|
552
|
+
await (0, helpers_1.sleep)(5);
|
|
553
|
+
const rows = context.outputs.load.rows;
|
|
554
|
+
return { rows: rows * 2 };
|
|
555
|
+
}, { next: ["persist"] }),
|
|
556
|
+
(0, helpers_1.node)("persist", async () => { await (0, helpers_1.sleep)(5); return "PERSISTED"; })
|
|
557
|
+
],
|
|
558
|
+
entryNodes: ["load"],
|
|
559
|
+
terminalNodes: ["persist"]
|
|
560
|
+
});
|
|
561
|
+
const engine = new automategraph_1.GraphExecutionEngine(definition, {
|
|
562
|
+
storage,
|
|
563
|
+
plugins: [
|
|
564
|
+
{
|
|
565
|
+
id: "async-plugin",
|
|
566
|
+
version: "1.2.0",
|
|
567
|
+
async initialize() { await (0, helpers_1.sleep)(3); events.push("init"); },
|
|
568
|
+
async close() { await (0, helpers_1.sleep)(3); events.push("close"); }
|
|
569
|
+
}
|
|
570
|
+
]
|
|
571
|
+
});
|
|
572
|
+
const captured = (0, helpers_1.capture)(engine, ["node.started", "node.succeeded", "graph.finished"]);
|
|
573
|
+
const report = await engine.run();
|
|
574
|
+
if (report.status !== "COMPLETED")
|
|
575
|
+
throw new Error(report.status);
|
|
576
|
+
if (report.outputs.transform.rows !== 6)
|
|
577
|
+
throw new Error("async chain output wrong");
|
|
578
|
+
if (events.join(",") !== "init,close")
|
|
579
|
+
throw new Error(events.join(","));
|
|
580
|
+
if (storage.calls !== 3)
|
|
581
|
+
throw new Error(`checkpoints=${storage.calls}`);
|
|
582
|
+
if (captured.filter(entry => entry.event === "node.succeeded").length !== 3)
|
|
583
|
+
throw new Error("events");
|
|
584
|
+
if (storage.snapshots.some(snapshot => snapshot.graphVersion !== "3.0.0"))
|
|
585
|
+
throw new Error("snapshot version");
|
|
586
|
+
const firstSnapshot = storage.snapshots[0];
|
|
587
|
+
if (firstSnapshot.outputs.load === undefined)
|
|
588
|
+
throw new Error("first checkpoint missing output");
|
|
589
|
+
t.log("checkpoints", storage.calls);
|
|
590
|
+
t.log("plugin lifecycle", events.join(" -> "));
|
|
591
|
+
}, BIG);
|
|
592
|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