@dudousxd/nestjs-durable-testing 0.21.0 → 0.22.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.
- package/dist/index.d.ts +34 -1
- package/dist/index.js +900 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -3816,6 +3816,42 @@ function runStateStoreContract(name, makeStore) {
|
|
|
3816
3816
|
});
|
|
3817
3817
|
expect3(await store.listCheckpoints("other")).toHaveLength(1);
|
|
3818
3818
|
});
|
|
3819
|
+
t("getRuns returns the existing runs among the given ids", async () => {
|
|
3820
|
+
expect3(store.getRuns).toBeTypeOf("function");
|
|
3821
|
+
await store.createRun(run({
|
|
3822
|
+
id: "p.all.0.0",
|
|
3823
|
+
status: "completed",
|
|
3824
|
+
output: {
|
|
3825
|
+
n: 1
|
|
3826
|
+
}
|
|
3827
|
+
}));
|
|
3828
|
+
await store.createRun(run({
|
|
3829
|
+
id: "p.all.0.1",
|
|
3830
|
+
status: "suspended"
|
|
3831
|
+
}));
|
|
3832
|
+
await store.createRun(run({
|
|
3833
|
+
id: "other"
|
|
3834
|
+
}));
|
|
3835
|
+
const got = await store.getRuns?.([
|
|
3836
|
+
"p.all.0.0",
|
|
3837
|
+
"p.all.0.1",
|
|
3838
|
+
"p.all.0.2",
|
|
3839
|
+
"p.all.0.0"
|
|
3840
|
+
]) ?? [];
|
|
3841
|
+
expect3(got.map((r) => r.id).sort()).toEqual([
|
|
3842
|
+
"p.all.0.0",
|
|
3843
|
+
"p.all.0.1"
|
|
3844
|
+
]);
|
|
3845
|
+
const done = got.find((r) => r.id === "p.all.0.0");
|
|
3846
|
+
expect3(done?.status).toBe("completed");
|
|
3847
|
+
expect3(done?.output).toEqual({
|
|
3848
|
+
n: 1
|
|
3849
|
+
});
|
|
3850
|
+
expect3(await store.getRuns?.([])).toEqual([]);
|
|
3851
|
+
expect3(await store.getRuns?.([
|
|
3852
|
+
"missing"
|
|
3853
|
+
])).toEqual([]);
|
|
3854
|
+
});
|
|
3819
3855
|
t("listSignalWaitersByRun returns only the given runs' waiters", async () => {
|
|
3820
3856
|
expect3(store.listSignalWaitersByRun).toBeTypeOf("function");
|
|
3821
3857
|
await store.putSignalWaiter({
|
|
@@ -4291,6 +4327,869 @@ async function assertTransportConformance(transport, idPrefix = "conf") {
|
|
|
4291
4327
|
}
|
|
4292
4328
|
}
|
|
4293
4329
|
__name(assertTransportConformance, "assertTransportConformance");
|
|
4330
|
+
|
|
4331
|
+
// src/run-dispatch-contract.ts
|
|
4332
|
+
import { InMemoryStateStore as InMemoryStateStore4, WorkflowEngine as WorkflowEngine5 } from "@dudousxd/nestjs-durable-core";
|
|
4333
|
+
import { describe as describe3, expect as expect4, it as it3 } from "vitest";
|
|
4334
|
+
function recorded(inner) {
|
|
4335
|
+
const batches = [];
|
|
4336
|
+
const failing = {
|
|
4337
|
+
on: false
|
|
4338
|
+
};
|
|
4339
|
+
const transport = new Proxy(inner, {
|
|
4340
|
+
get(target, prop, receiver) {
|
|
4341
|
+
if (prop === "dispatchRuns") {
|
|
4342
|
+
return async (runs, opts) => {
|
|
4343
|
+
if (failing.on) throw new Error("broker down");
|
|
4344
|
+
batches.push(runs);
|
|
4345
|
+
return target.dispatchRuns?.(runs, opts);
|
|
4346
|
+
};
|
|
4347
|
+
}
|
|
4348
|
+
const value = Reflect.get(target, prop, receiver);
|
|
4349
|
+
return typeof value === "function" ? value.bind(target) : value;
|
|
4350
|
+
}
|
|
4351
|
+
});
|
|
4352
|
+
return {
|
|
4353
|
+
transport,
|
|
4354
|
+
batches,
|
|
4355
|
+
failing
|
|
4356
|
+
};
|
|
4357
|
+
}
|
|
4358
|
+
__name(recorded, "recorded");
|
|
4359
|
+
async function until(check, timeoutMs) {
|
|
4360
|
+
const deadline = Date.now() + timeoutMs;
|
|
4361
|
+
while (Date.now() < deadline) {
|
|
4362
|
+
if (await check()) return;
|
|
4363
|
+
await new Promise((resolve) => setTimeout(resolve, 10));
|
|
4364
|
+
}
|
|
4365
|
+
throw new Error("condition not met");
|
|
4366
|
+
}
|
|
4367
|
+
__name(until, "until");
|
|
4368
|
+
var pause = /* @__PURE__ */ __name((ms2) => new Promise((resolve) => setTimeout(resolve, ms2)), "pause");
|
|
4369
|
+
var FANS = [
|
|
4370
|
+
{
|
|
4371
|
+
fan: "ctx.all fan",
|
|
4372
|
+
settle: false
|
|
4373
|
+
},
|
|
4374
|
+
{
|
|
4375
|
+
fan: "ctx.allSettled fan",
|
|
4376
|
+
settle: true
|
|
4377
|
+
}
|
|
4378
|
+
];
|
|
4379
|
+
function instances(store, transports, clock) {
|
|
4380
|
+
return transports.map((transport, i) => {
|
|
4381
|
+
const engine = new WorkflowEngine5({
|
|
4382
|
+
store,
|
|
4383
|
+
transport,
|
|
4384
|
+
reconcileMs: 0,
|
|
4385
|
+
...clock ? {
|
|
4386
|
+
clock
|
|
4387
|
+
} : {}
|
|
4388
|
+
});
|
|
4389
|
+
return {
|
|
4390
|
+
name: `instance-${i}`,
|
|
4391
|
+
engine
|
|
4392
|
+
};
|
|
4393
|
+
});
|
|
4394
|
+
}
|
|
4395
|
+
__name(instances, "instances");
|
|
4396
|
+
function registerFan(all, fanSize, ran, settle2) {
|
|
4397
|
+
for (const { name, engine } of all) {
|
|
4398
|
+
engine.register("child", "1", async (ctx, input) => {
|
|
4399
|
+
const { i } = input;
|
|
4400
|
+
return ctx.localStep("work", async () => {
|
|
4401
|
+
ran.set(i, [
|
|
4402
|
+
...ran.get(i) ?? [],
|
|
4403
|
+
name
|
|
4404
|
+
]);
|
|
4405
|
+
await pause(15);
|
|
4406
|
+
return i * 2;
|
|
4407
|
+
});
|
|
4408
|
+
});
|
|
4409
|
+
engine.register("parent", "1", async (ctx) => {
|
|
4410
|
+
const inputs = Array.from({
|
|
4411
|
+
length: fanSize
|
|
4412
|
+
}, (_, i) => ({
|
|
4413
|
+
i
|
|
4414
|
+
}));
|
|
4415
|
+
return settle2 ? ctx.allSettled("child", inputs) : ctx.all("child", inputs);
|
|
4416
|
+
});
|
|
4417
|
+
}
|
|
4418
|
+
}
|
|
4419
|
+
__name(registerFan, "registerFan");
|
|
4420
|
+
function doubled(fanSize, settle2) {
|
|
4421
|
+
const values = Array.from({
|
|
4422
|
+
length: fanSize
|
|
4423
|
+
}, (_, i) => i * 2);
|
|
4424
|
+
return settle2 ? values.map((value) => ({
|
|
4425
|
+
status: "fulfilled",
|
|
4426
|
+
value
|
|
4427
|
+
})) : values;
|
|
4428
|
+
}
|
|
4429
|
+
__name(doubled, "doubled");
|
|
4430
|
+
function holdingTurn(inner, hold) {
|
|
4431
|
+
let release;
|
|
4432
|
+
const gate = new Promise((resolve) => {
|
|
4433
|
+
release = resolve;
|
|
4434
|
+
});
|
|
4435
|
+
const state = {
|
|
4436
|
+
held: false,
|
|
4437
|
+
release: /* @__PURE__ */ __name(() => release(), "release")
|
|
4438
|
+
};
|
|
4439
|
+
const store = new Proxy(inner, {
|
|
4440
|
+
get(target, prop, receiver) {
|
|
4441
|
+
const value = Reflect.get(target, prop, receiver);
|
|
4442
|
+
if (typeof value !== "function") return value;
|
|
4443
|
+
const fn = value;
|
|
4444
|
+
const holds = /* @__PURE__ */ __name((args) => {
|
|
4445
|
+
if (state.held) return false;
|
|
4446
|
+
if (hold === "suspend" && (prop === "updateRun" || prop === "updateRunIf")) {
|
|
4447
|
+
const patch = prop === "updateRun" ? args[1] : args[2];
|
|
4448
|
+
return args[0] === "p" && patch.status === "suspended";
|
|
4449
|
+
}
|
|
4450
|
+
if (hold === "placeholder" && prop === "saveCheckpoint") {
|
|
4451
|
+
const cp2 = args[0];
|
|
4452
|
+
return cp2.runId === "p" && cp2.status === "running" && cp2.name.startsWith("signal:child:");
|
|
4453
|
+
}
|
|
4454
|
+
return false;
|
|
4455
|
+
}, "holds");
|
|
4456
|
+
return async (...args) => {
|
|
4457
|
+
if (holds(args)) {
|
|
4458
|
+
state.held = true;
|
|
4459
|
+
await gate;
|
|
4460
|
+
}
|
|
4461
|
+
return fn.apply(target, args);
|
|
4462
|
+
};
|
|
4463
|
+
}
|
|
4464
|
+
});
|
|
4465
|
+
return {
|
|
4466
|
+
store,
|
|
4467
|
+
state
|
|
4468
|
+
};
|
|
4469
|
+
}
|
|
4470
|
+
__name(holdingTurn, "holdingTurn");
|
|
4471
|
+
var MID_TURN = [
|
|
4472
|
+
{
|
|
4473
|
+
what: "ctx.child's completion",
|
|
4474
|
+
body: /* @__PURE__ */ __name((ctx) => ctx.child("child", {}), "body"),
|
|
4475
|
+
output: "done",
|
|
4476
|
+
signal: false
|
|
4477
|
+
},
|
|
4478
|
+
{
|
|
4479
|
+
what: "ctx.child's completion, raced against its timeline placeholder",
|
|
4480
|
+
body: /* @__PURE__ */ __name((ctx) => ctx.child("child", {}), "body"),
|
|
4481
|
+
output: "done",
|
|
4482
|
+
signal: false,
|
|
4483
|
+
hold: "placeholder"
|
|
4484
|
+
},
|
|
4485
|
+
{
|
|
4486
|
+
what: "a ctx.all fan's completions",
|
|
4487
|
+
body: /* @__PURE__ */ __name((ctx) => ctx.all("child", [
|
|
4488
|
+
{},
|
|
4489
|
+
{},
|
|
4490
|
+
{}
|
|
4491
|
+
]), "body"),
|
|
4492
|
+
output: [
|
|
4493
|
+
"done",
|
|
4494
|
+
"done",
|
|
4495
|
+
"done"
|
|
4496
|
+
],
|
|
4497
|
+
signal: false
|
|
4498
|
+
},
|
|
4499
|
+
{
|
|
4500
|
+
what: "a ctx.allSettled fan's completions",
|
|
4501
|
+
body: /* @__PURE__ */ __name((ctx) => ctx.allSettled("child", [
|
|
4502
|
+
{},
|
|
4503
|
+
{},
|
|
4504
|
+
{}
|
|
4505
|
+
]), "body"),
|
|
4506
|
+
output: [
|
|
4507
|
+
1,
|
|
4508
|
+
2,
|
|
4509
|
+
3
|
|
4510
|
+
].map(() => ({
|
|
4511
|
+
status: "fulfilled",
|
|
4512
|
+
value: "done"
|
|
4513
|
+
})),
|
|
4514
|
+
signal: false
|
|
4515
|
+
},
|
|
4516
|
+
{
|
|
4517
|
+
what: "a signal",
|
|
4518
|
+
body: /* @__PURE__ */ __name((ctx) => ctx.waitForSignal("go"), "body"),
|
|
4519
|
+
output: "sent",
|
|
4520
|
+
signal: true
|
|
4521
|
+
}
|
|
4522
|
+
];
|
|
4523
|
+
async function shutdown(all, transports) {
|
|
4524
|
+
await Promise.allSettled(all.map(({ engine }) => engine.drain(2e3)));
|
|
4525
|
+
await Promise.allSettled(transports.map((t) => t.close?.()));
|
|
4526
|
+
}
|
|
4527
|
+
__name(shutdown, "shutdown");
|
|
4528
|
+
function runRunDispatchContract(name, makeHarness, options = {}) {
|
|
4529
|
+
const timeoutMs = options.timeoutMs ?? 3e4;
|
|
4530
|
+
const fanSize = options.fanSize ?? 300;
|
|
4531
|
+
const dedupes = options.dedupesWaitingRuns ?? true;
|
|
4532
|
+
describe3(`Run dispatch contract: ${name}`, () => {
|
|
4533
|
+
async function pairOrSkip(skip) {
|
|
4534
|
+
const harness = await makeHarness();
|
|
4535
|
+
if (typeof harness === "string") {
|
|
4536
|
+
console.warn(`[run-dispatch contract] ${name} skipped: ${harness}`);
|
|
4537
|
+
skip();
|
|
4538
|
+
return void 0;
|
|
4539
|
+
}
|
|
4540
|
+
return harness.pair();
|
|
4541
|
+
}
|
|
4542
|
+
__name(pairOrSkip, "pairOrSkip");
|
|
4543
|
+
for (const { fan, settle: settle2 } of FANS) {
|
|
4544
|
+
it3(`queues a ${fan}'s children on the transport in batches, and the fan completes`, async (ctx) => {
|
|
4545
|
+
const pair = await pairOrSkip(() => ctx.skip());
|
|
4546
|
+
if (!pair) return;
|
|
4547
|
+
const a = recorded(pair[0]);
|
|
4548
|
+
const b = recorded(pair[1]);
|
|
4549
|
+
const store = new InMemoryStateStore4();
|
|
4550
|
+
const all = instances(store, [
|
|
4551
|
+
a.transport,
|
|
4552
|
+
b.transport
|
|
4553
|
+
]);
|
|
4554
|
+
const ran = /* @__PURE__ */ new Map();
|
|
4555
|
+
registerFan(all, fanSize, ran, settle2);
|
|
4556
|
+
try {
|
|
4557
|
+
for (const { engine } of all) expect4(engine.consumeRuns()).toBeTypeOf("function");
|
|
4558
|
+
await all[0]?.engine.start("parent", {}, "p");
|
|
4559
|
+
await until(async () => (await store.getRun("p"))?.status === "completed", timeoutMs);
|
|
4560
|
+
expect4((await store.getRun("p"))?.output).toEqual(doubled(fanSize, settle2));
|
|
4561
|
+
const batches = [
|
|
4562
|
+
...a.batches,
|
|
4563
|
+
...b.batches
|
|
4564
|
+
];
|
|
4565
|
+
const queued = batches.flat().map((r) => r.runId);
|
|
4566
|
+
const children = (await store.listRuns({
|
|
4567
|
+
workflow: "child"
|
|
4568
|
+
})).map((r) => r.id);
|
|
4569
|
+
expect4(children).toHaveLength(fanSize);
|
|
4570
|
+
expect4(new Set(queued)).toEqual(/* @__PURE__ */ new Set([
|
|
4571
|
+
"p",
|
|
4572
|
+
...children
|
|
4573
|
+
]));
|
|
4574
|
+
expect4(Math.max(...batches.map((batch) => batch.length))).toBeLessThanOrEqual(500);
|
|
4575
|
+
expect4(batches.length).toBeLessThanOrEqual(Math.ceil(fanSize / 20));
|
|
4576
|
+
} finally {
|
|
4577
|
+
await shutdown(all, pair);
|
|
4578
|
+
}
|
|
4579
|
+
}, timeoutMs + 1e4);
|
|
4580
|
+
it3(`splits a ${fan}'s children across the instances, each child executed once`, async (ctx) => {
|
|
4581
|
+
const pair = await pairOrSkip(() => ctx.skip());
|
|
4582
|
+
if (!pair) return;
|
|
4583
|
+
const store = new InMemoryStateStore4();
|
|
4584
|
+
const all = instances(store, pair);
|
|
4585
|
+
const ran = /* @__PURE__ */ new Map();
|
|
4586
|
+
registerFan(all, fanSize, ran, settle2);
|
|
4587
|
+
try {
|
|
4588
|
+
for (const { engine } of all) engine.consumeRuns();
|
|
4589
|
+
await all[0]?.engine.start("parent", {}, "p");
|
|
4590
|
+
await until(async () => (await store.getRun("p"))?.status === "completed", timeoutMs);
|
|
4591
|
+
expect4(ran.size).toBe(fanSize);
|
|
4592
|
+
for (const executors of ran.values()) expect4(executors).toHaveLength(1);
|
|
4593
|
+
const byInstance = /* @__PURE__ */ new Map();
|
|
4594
|
+
for (const [executor] of ran.values()) {
|
|
4595
|
+
byInstance.set(executor, (byInstance.get(executor) ?? 0) + 1);
|
|
4596
|
+
}
|
|
4597
|
+
expect4(byInstance.get("instance-0") ?? 0).toBeGreaterThan(0);
|
|
4598
|
+
expect4(byInstance.get("instance-1") ?? 0).toBeGreaterThan(0);
|
|
4599
|
+
} finally {
|
|
4600
|
+
await shutdown(all, pair);
|
|
4601
|
+
}
|
|
4602
|
+
}, timeoutMs + 1e4);
|
|
4603
|
+
}
|
|
4604
|
+
it3("leaves a run whose queueing failed pending, and the poll takes it", async (ctx) => {
|
|
4605
|
+
const pair = await pairOrSkip(() => ctx.skip());
|
|
4606
|
+
if (!pair) return;
|
|
4607
|
+
const a = recorded(pair[0]);
|
|
4608
|
+
const store = new InMemoryStateStore4();
|
|
4609
|
+
const all = instances(store, [
|
|
4610
|
+
a.transport
|
|
4611
|
+
]);
|
|
4612
|
+
let turns = 0;
|
|
4613
|
+
all[0]?.engine.register("wf", "1", async () => {
|
|
4614
|
+
turns += 1;
|
|
4615
|
+
return "done";
|
|
4616
|
+
});
|
|
4617
|
+
const engine = all[0]?.engine;
|
|
4618
|
+
try {
|
|
4619
|
+
engine.consumeRuns();
|
|
4620
|
+
a.failing.on = true;
|
|
4621
|
+
await engine.start("wf", {}, "lost");
|
|
4622
|
+
await engine.start("wf", {}, "kept");
|
|
4623
|
+
await pause(100);
|
|
4624
|
+
expect4((await store.getRun("lost"))?.status).toBe("pending");
|
|
4625
|
+
expect4(turns).toBe(0);
|
|
4626
|
+
a.failing.on = false;
|
|
4627
|
+
await engine.runPending();
|
|
4628
|
+
await until(async () => (await store.getRun("lost"))?.status === "completed", timeoutMs);
|
|
4629
|
+
expect4((await store.getRun("kept"))?.status).toBe("completed");
|
|
4630
|
+
a.failing.on = true;
|
|
4631
|
+
await engine.start("wf", {}, "down");
|
|
4632
|
+
await pause(50);
|
|
4633
|
+
expect4((await store.getRun("down"))?.status).toBe("pending");
|
|
4634
|
+
await engine.runPending();
|
|
4635
|
+
await until(async () => (await store.getRun("down"))?.status === "completed", timeoutMs);
|
|
4636
|
+
expect4(turns).toBe(3);
|
|
4637
|
+
} finally {
|
|
4638
|
+
a.failing.on = false;
|
|
4639
|
+
await shutdown(all, [
|
|
4640
|
+
pair[0],
|
|
4641
|
+
pair[1]
|
|
4642
|
+
]);
|
|
4643
|
+
}
|
|
4644
|
+
}, timeoutMs + 1e4);
|
|
4645
|
+
it3("skips a queued run that is no longer due", async (ctx) => {
|
|
4646
|
+
const pair = await pairOrSkip(() => ctx.skip());
|
|
4647
|
+
if (!pair) return;
|
|
4648
|
+
const store = new InMemoryStateStore4();
|
|
4649
|
+
const [local, consumer] = instances(store, pair);
|
|
4650
|
+
let turns = 0;
|
|
4651
|
+
for (const { engine } of [
|
|
4652
|
+
local,
|
|
4653
|
+
consumer
|
|
4654
|
+
]) {
|
|
4655
|
+
engine.register("done", "1", async () => {
|
|
4656
|
+
turns += 1;
|
|
4657
|
+
return 1;
|
|
4658
|
+
});
|
|
4659
|
+
engine.register("waiting", "1", async (ctx2) => {
|
|
4660
|
+
turns += 1;
|
|
4661
|
+
await ctx2.waitForSignal("never");
|
|
4662
|
+
});
|
|
4663
|
+
}
|
|
4664
|
+
try {
|
|
4665
|
+
await local.engine.start("done", {}, "finished");
|
|
4666
|
+
await local.engine.start("waiting", {}, "parked");
|
|
4667
|
+
await until(async () => (await store.getRun("parked"))?.status === "suspended", timeoutMs);
|
|
4668
|
+
await until(async () => (await store.getRun("finished"))?.status === "completed", timeoutMs);
|
|
4669
|
+
expect4(turns).toBe(2);
|
|
4670
|
+
consumer.engine.consumeRuns();
|
|
4671
|
+
await pair[0].dispatchRuns?.([
|
|
4672
|
+
{
|
|
4673
|
+
runId: "finished",
|
|
4674
|
+
reason: "start",
|
|
4675
|
+
key: "1"
|
|
4676
|
+
},
|
|
4677
|
+
{
|
|
4678
|
+
runId: "parked",
|
|
4679
|
+
reason: "start",
|
|
4680
|
+
key: "1"
|
|
4681
|
+
}
|
|
4682
|
+
]);
|
|
4683
|
+
await pause(1500);
|
|
4684
|
+
expect4(turns).toBe(2);
|
|
4685
|
+
expect4((await store.getRun("parked"))?.status).toBe("suspended");
|
|
4686
|
+
} finally {
|
|
4687
|
+
await shutdown([
|
|
4688
|
+
local,
|
|
4689
|
+
consumer
|
|
4690
|
+
], pair);
|
|
4691
|
+
}
|
|
4692
|
+
}, timeoutMs + 1e4);
|
|
4693
|
+
it3("a wake resumes a parked run, and skips a finished one", async (ctx) => {
|
|
4694
|
+
const pair = await pairOrSkip(() => ctx.skip());
|
|
4695
|
+
if (!pair) return;
|
|
4696
|
+
const store = new InMemoryStateStore4();
|
|
4697
|
+
const [local, consumer] = instances(store, pair);
|
|
4698
|
+
let parkedTurns = 0;
|
|
4699
|
+
let finishedTurns = 0;
|
|
4700
|
+
for (const { engine } of [
|
|
4701
|
+
local,
|
|
4702
|
+
consumer
|
|
4703
|
+
]) {
|
|
4704
|
+
engine.register("done", "1", async () => {
|
|
4705
|
+
finishedTurns += 1;
|
|
4706
|
+
return 1;
|
|
4707
|
+
});
|
|
4708
|
+
engine.register("waiting", "1", async (wctx) => {
|
|
4709
|
+
parkedTurns += 1;
|
|
4710
|
+
await wctx.waitForSignal("never");
|
|
4711
|
+
});
|
|
4712
|
+
}
|
|
4713
|
+
try {
|
|
4714
|
+
await local.engine.start("done", {}, "finished");
|
|
4715
|
+
await local.engine.start("waiting", {}, "parked");
|
|
4716
|
+
await until(async () => (await store.getRun("parked"))?.status === "suspended", timeoutMs);
|
|
4717
|
+
await until(async () => (await store.getRun("finished"))?.status === "completed", timeoutMs);
|
|
4718
|
+
consumer.engine.consumeRuns();
|
|
4719
|
+
await pair[0].dispatchRuns?.([
|
|
4720
|
+
{
|
|
4721
|
+
runId: "finished",
|
|
4722
|
+
reason: "wake"
|
|
4723
|
+
},
|
|
4724
|
+
{
|
|
4725
|
+
runId: "parked",
|
|
4726
|
+
reason: "wake"
|
|
4727
|
+
}
|
|
4728
|
+
]);
|
|
4729
|
+
await until(() => parkedTurns === 2, timeoutMs);
|
|
4730
|
+
await pause(500);
|
|
4731
|
+
expect4(parkedTurns).toBe(2);
|
|
4732
|
+
expect4(finishedTurns).toBe(1);
|
|
4733
|
+
expect4((await store.getRun("parked"))?.status).toBe("suspended");
|
|
4734
|
+
} finally {
|
|
4735
|
+
await shutdown([
|
|
4736
|
+
local,
|
|
4737
|
+
consumer
|
|
4738
|
+
], pair);
|
|
4739
|
+
}
|
|
4740
|
+
}, timeoutMs + 1e4);
|
|
4741
|
+
it3("a signal's wake goes through the queue, and signal resolves once it is queued", async (ctx) => {
|
|
4742
|
+
const pair = await pairOrSkip(() => ctx.skip());
|
|
4743
|
+
if (!pair) return;
|
|
4744
|
+
const store = new InMemoryStateStore4();
|
|
4745
|
+
const a = recorded(pair[0]);
|
|
4746
|
+
const all = instances(store, [
|
|
4747
|
+
a.transport,
|
|
4748
|
+
pair[1]
|
|
4749
|
+
]);
|
|
4750
|
+
const resumedOn = [];
|
|
4751
|
+
for (const { name: name2, engine } of all) {
|
|
4752
|
+
engine.register("waits", "1", async (wctx) => {
|
|
4753
|
+
const got = await wctx.waitForSignal("go");
|
|
4754
|
+
return wctx.localStep("after", async () => {
|
|
4755
|
+
resumedOn.push(name2);
|
|
4756
|
+
return got;
|
|
4757
|
+
});
|
|
4758
|
+
});
|
|
4759
|
+
engine.consumeRuns();
|
|
4760
|
+
}
|
|
4761
|
+
try {
|
|
4762
|
+
await all[0]?.engine.start("waits", {}, "w");
|
|
4763
|
+
await until(async () => (await store.getRun("w"))?.status === "suspended", timeoutMs);
|
|
4764
|
+
a.batches.length = 0;
|
|
4765
|
+
const result = await all[0]?.engine.signal("go", "payload");
|
|
4766
|
+
expect4(result?.status).toBe("suspended");
|
|
4767
|
+
await until(async () => (await store.getRun("w"))?.status === "completed", timeoutMs);
|
|
4768
|
+
expect4(a.batches.flat()).toEqual([
|
|
4769
|
+
{
|
|
4770
|
+
runId: "w",
|
|
4771
|
+
reason: "wake"
|
|
4772
|
+
}
|
|
4773
|
+
]);
|
|
4774
|
+
expect4((await store.getRun("w"))?.output).toBe("payload");
|
|
4775
|
+
expect4(resumedOn).toHaveLength(1);
|
|
4776
|
+
} finally {
|
|
4777
|
+
await shutdown(all, pair);
|
|
4778
|
+
}
|
|
4779
|
+
}, timeoutMs + 1e4);
|
|
4780
|
+
it3("queues due timers on the transport instead of resuming them inline in the poll", async (ctx) => {
|
|
4781
|
+
const pair = await pairOrSkip(() => ctx.skip());
|
|
4782
|
+
if (!pair) return;
|
|
4783
|
+
const a = recorded(pair[0]);
|
|
4784
|
+
let now = Date.now();
|
|
4785
|
+
const store = new InMemoryStateStore4();
|
|
4786
|
+
const all = instances(store, [
|
|
4787
|
+
a.transport,
|
|
4788
|
+
pair[1]
|
|
4789
|
+
], () => now);
|
|
4790
|
+
const n = 40;
|
|
4791
|
+
const woke = /* @__PURE__ */ new Map();
|
|
4792
|
+
for (const { name: name2, engine } of all) {
|
|
4793
|
+
engine.register("sleeper", "1", async (ctx2, input) => {
|
|
4794
|
+
const { i } = input;
|
|
4795
|
+
await ctx2.sleep(1e3);
|
|
4796
|
+
return ctx2.localStep("after", async () => {
|
|
4797
|
+
woke.set(i, [
|
|
4798
|
+
...woke.get(i) ?? [],
|
|
4799
|
+
name2
|
|
4800
|
+
]);
|
|
4801
|
+
await pause(15);
|
|
4802
|
+
return i;
|
|
4803
|
+
});
|
|
4804
|
+
});
|
|
4805
|
+
}
|
|
4806
|
+
try {
|
|
4807
|
+
for (const { engine } of all) engine.consumeRuns();
|
|
4808
|
+
for (let i = 0; i < n; i += 1) await all[0]?.engine.start("sleeper", {
|
|
4809
|
+
i
|
|
4810
|
+
}, `s${i}`);
|
|
4811
|
+
await until(async () => {
|
|
4812
|
+
const runs = await store.listRuns({
|
|
4813
|
+
workflow: "sleeper",
|
|
4814
|
+
status: "suspended"
|
|
4815
|
+
});
|
|
4816
|
+
return runs.length === n;
|
|
4817
|
+
}, timeoutMs);
|
|
4818
|
+
a.batches.length = 0;
|
|
4819
|
+
now += 2e3;
|
|
4820
|
+
const results = await all[0]?.engine.resumeDueTimers(now);
|
|
4821
|
+
expect4(results).toHaveLength(n);
|
|
4822
|
+
expect4(results?.every((r) => r.status === "suspended")).toBe(true);
|
|
4823
|
+
expect4(new Set(a.batches.flat().map((r) => r.runId)).size).toBe(n);
|
|
4824
|
+
await until(async () => {
|
|
4825
|
+
const runs = await store.listRuns({
|
|
4826
|
+
workflow: "sleeper",
|
|
4827
|
+
status: "completed"
|
|
4828
|
+
});
|
|
4829
|
+
if (runs.length === n) return true;
|
|
4830
|
+
await all[0]?.engine.resumeDueTimers(now);
|
|
4831
|
+
await pause(50);
|
|
4832
|
+
return false;
|
|
4833
|
+
}, timeoutMs);
|
|
4834
|
+
for (const executors of woke.values()) expect4(executors).toHaveLength(1);
|
|
4835
|
+
} finally {
|
|
4836
|
+
await shutdown(all, pair);
|
|
4837
|
+
}
|
|
4838
|
+
}, timeoutMs + 1e4);
|
|
4839
|
+
it3("hands a consumer at most `concurrency` runs at once", async (ctx) => {
|
|
4840
|
+
const pair = await pairOrSkip(() => ctx.skip());
|
|
4841
|
+
if (!pair) return;
|
|
4842
|
+
const [producer, consumerTransport] = pair;
|
|
4843
|
+
let active = 0;
|
|
4844
|
+
let peak = 0;
|
|
4845
|
+
const handled = [];
|
|
4846
|
+
let release;
|
|
4847
|
+
const gate = new Promise((resolve) => {
|
|
4848
|
+
release = resolve;
|
|
4849
|
+
});
|
|
4850
|
+
const opts = {
|
|
4851
|
+
concurrency: 3
|
|
4852
|
+
};
|
|
4853
|
+
const stop = consumerTransport.onDispatchedRun?.(async ({ runId }) => {
|
|
4854
|
+
active += 1;
|
|
4855
|
+
peak = Math.max(peak, active);
|
|
4856
|
+
await gate;
|
|
4857
|
+
handled.push(runId);
|
|
4858
|
+
active -= 1;
|
|
4859
|
+
}, opts);
|
|
4860
|
+
try {
|
|
4861
|
+
await producer.dispatchRuns?.(Array.from({
|
|
4862
|
+
length: 8
|
|
4863
|
+
}, (_, i) => ({
|
|
4864
|
+
runId: `c${i}`
|
|
4865
|
+
})));
|
|
4866
|
+
await until(() => active === 3, timeoutMs);
|
|
4867
|
+
await pause(300);
|
|
4868
|
+
expect4(peak).toBe(3);
|
|
4869
|
+
release();
|
|
4870
|
+
await until(() => handled.length === 8, timeoutMs);
|
|
4871
|
+
expect4(new Set(handled).size).toBe(8);
|
|
4872
|
+
expect4(peak).toBe(3);
|
|
4873
|
+
} finally {
|
|
4874
|
+
release();
|
|
4875
|
+
await stop?.();
|
|
4876
|
+
await Promise.allSettled(pair.map((t) => t.close?.()));
|
|
4877
|
+
}
|
|
4878
|
+
}, timeoutMs + 1e4);
|
|
4879
|
+
it3.runIf(!dedupes)("runs one turn of a run queued twice", async (ctx) => {
|
|
4880
|
+
const pair = await pairOrSkip(() => ctx.skip());
|
|
4881
|
+
if (!pair) return;
|
|
4882
|
+
const store = new InMemoryStateStore4();
|
|
4883
|
+
const all = instances(store, pair);
|
|
4884
|
+
let turns = 0;
|
|
4885
|
+
for (const { engine } of all) {
|
|
4886
|
+
engine.register("wf", "1", async (wctx) => {
|
|
4887
|
+
turns += 1;
|
|
4888
|
+
await wctx.waitForSignal("never");
|
|
4889
|
+
});
|
|
4890
|
+
}
|
|
4891
|
+
try {
|
|
4892
|
+
await store.createRun({
|
|
4893
|
+
id: "twice",
|
|
4894
|
+
workflow: "wf",
|
|
4895
|
+
workflowVersion: "1",
|
|
4896
|
+
status: "pending",
|
|
4897
|
+
input: {},
|
|
4898
|
+
createdAt: /* @__PURE__ */ new Date(),
|
|
4899
|
+
updatedAt: /* @__PURE__ */ new Date()
|
|
4900
|
+
});
|
|
4901
|
+
await pair[0].dispatchRuns?.([
|
|
4902
|
+
{
|
|
4903
|
+
runId: "twice",
|
|
4904
|
+
reason: "start",
|
|
4905
|
+
key: "1"
|
|
4906
|
+
}
|
|
4907
|
+
]);
|
|
4908
|
+
await pair[0].dispatchRuns?.([
|
|
4909
|
+
{
|
|
4910
|
+
runId: "twice",
|
|
4911
|
+
reason: "start",
|
|
4912
|
+
key: "2"
|
|
4913
|
+
}
|
|
4914
|
+
]);
|
|
4915
|
+
for (const { engine } of all) engine.consumeRuns();
|
|
4916
|
+
await until(async () => (await store.getRun("twice"))?.status === "suspended", timeoutMs);
|
|
4917
|
+
await pause(1500);
|
|
4918
|
+
expect4(turns).toBe(1);
|
|
4919
|
+
} finally {
|
|
4920
|
+
await shutdown(all, pair);
|
|
4921
|
+
}
|
|
4922
|
+
}, timeoutMs + 1e4);
|
|
4923
|
+
it3.runIf(dedupes)("queues a run once while it waits, however often it is dispatched", async (ctx) => {
|
|
4924
|
+
const pair = await pairOrSkip(() => ctx.skip());
|
|
4925
|
+
if (!pair) return;
|
|
4926
|
+
const [producer, consumerTransport] = pair;
|
|
4927
|
+
const handled = [];
|
|
4928
|
+
try {
|
|
4929
|
+
const once = {
|
|
4930
|
+
runId: "once",
|
|
4931
|
+
reason: "start",
|
|
4932
|
+
key: "1"
|
|
4933
|
+
};
|
|
4934
|
+
await producer.dispatchRuns?.([
|
|
4935
|
+
once
|
|
4936
|
+
]);
|
|
4937
|
+
await producer.dispatchRuns?.([
|
|
4938
|
+
once,
|
|
4939
|
+
once
|
|
4940
|
+
]);
|
|
4941
|
+
const stop = consumerTransport.onDispatchedRun?.(async ({ runId }) => {
|
|
4942
|
+
handled.push(runId);
|
|
4943
|
+
}, {
|
|
4944
|
+
concurrency: 4
|
|
4945
|
+
});
|
|
4946
|
+
await until(() => handled.length >= 1, timeoutMs);
|
|
4947
|
+
await pause(500);
|
|
4948
|
+
await stop?.();
|
|
4949
|
+
expect4(handled).toEqual([
|
|
4950
|
+
"once"
|
|
4951
|
+
]);
|
|
4952
|
+
} finally {
|
|
4953
|
+
await Promise.allSettled(pair.map((t) => t.close?.()));
|
|
4954
|
+
}
|
|
4955
|
+
}, timeoutMs + 1e4);
|
|
4956
|
+
for (const [what, again] of [
|
|
4957
|
+
[
|
|
4958
|
+
"a start for a new pending state",
|
|
4959
|
+
{
|
|
4960
|
+
reason: "start",
|
|
4961
|
+
key: "2"
|
|
4962
|
+
}
|
|
4963
|
+
],
|
|
4964
|
+
[
|
|
4965
|
+
"a wake",
|
|
4966
|
+
{
|
|
4967
|
+
reason: "wake"
|
|
4968
|
+
}
|
|
4969
|
+
]
|
|
4970
|
+
]) {
|
|
4971
|
+
it3(`hands a run out again when ${what} lands while its entry is being handled`, async (ctx) => {
|
|
4972
|
+
const pair = await pairOrSkip(() => ctx.skip());
|
|
4973
|
+
if (!pair) return;
|
|
4974
|
+
const [producer, consumerTransport] = pair;
|
|
4975
|
+
const handled = [];
|
|
4976
|
+
let release;
|
|
4977
|
+
const gate = new Promise((resolve) => {
|
|
4978
|
+
release = resolve;
|
|
4979
|
+
});
|
|
4980
|
+
let taken = 0;
|
|
4981
|
+
const stop = consumerTransport.onDispatchedRun?.(async ({ runId }) => {
|
|
4982
|
+
taken += 1;
|
|
4983
|
+
if (taken === 1) await gate;
|
|
4984
|
+
handled.push(runId);
|
|
4985
|
+
}, {
|
|
4986
|
+
concurrency: 2
|
|
4987
|
+
});
|
|
4988
|
+
try {
|
|
4989
|
+
await producer.dispatchRuns?.([
|
|
4990
|
+
{
|
|
4991
|
+
runId: "busy",
|
|
4992
|
+
reason: "start",
|
|
4993
|
+
key: "1"
|
|
4994
|
+
}
|
|
4995
|
+
]);
|
|
4996
|
+
await until(() => taken === 1, timeoutMs);
|
|
4997
|
+
await producer.dispatchRuns?.([
|
|
4998
|
+
{
|
|
4999
|
+
runId: "busy",
|
|
5000
|
+
...again
|
|
5001
|
+
}
|
|
5002
|
+
]);
|
|
5003
|
+
await pause(200);
|
|
5004
|
+
release();
|
|
5005
|
+
await until(() => handled.length >= 2, timeoutMs);
|
|
5006
|
+
expect4(handled.slice(0, 2)).toEqual([
|
|
5007
|
+
"busy",
|
|
5008
|
+
"busy"
|
|
5009
|
+
]);
|
|
5010
|
+
} finally {
|
|
5011
|
+
release();
|
|
5012
|
+
await stop?.();
|
|
5013
|
+
await Promise.allSettled(pair.map((t) => t.close?.()));
|
|
5014
|
+
}
|
|
5015
|
+
}, timeoutMs + 1e4);
|
|
5016
|
+
}
|
|
5017
|
+
it3("stops taking runs on stop, and resolves once the runs in flight settled", async (ctx) => {
|
|
5018
|
+
const pair = await pairOrSkip(() => ctx.skip());
|
|
5019
|
+
if (!pair) return;
|
|
5020
|
+
const [first, second] = pair;
|
|
5021
|
+
const handledFirst = [];
|
|
5022
|
+
let active = 0;
|
|
5023
|
+
let release;
|
|
5024
|
+
const gate = new Promise((resolve) => {
|
|
5025
|
+
release = resolve;
|
|
5026
|
+
});
|
|
5027
|
+
const stopFirst = first.onDispatchedRun?.(async ({ runId }) => {
|
|
5028
|
+
active += 1;
|
|
5029
|
+
await gate;
|
|
5030
|
+
handledFirst.push(runId);
|
|
5031
|
+
active -= 1;
|
|
5032
|
+
}, {
|
|
5033
|
+
concurrency: 2
|
|
5034
|
+
});
|
|
5035
|
+
try {
|
|
5036
|
+
await first.dispatchRuns?.([
|
|
5037
|
+
{
|
|
5038
|
+
runId: "in-flight-1"
|
|
5039
|
+
},
|
|
5040
|
+
{
|
|
5041
|
+
runId: "in-flight-2"
|
|
5042
|
+
}
|
|
5043
|
+
]);
|
|
5044
|
+
await until(() => active === 2, timeoutMs);
|
|
5045
|
+
let stopped = false;
|
|
5046
|
+
const stopping = stopFirst?.().then(() => {
|
|
5047
|
+
stopped = true;
|
|
5048
|
+
});
|
|
5049
|
+
await pause(200);
|
|
5050
|
+
expect4(stopped).toBe(false);
|
|
5051
|
+
await first.dispatchRuns?.([
|
|
5052
|
+
{
|
|
5053
|
+
runId: "after-1"
|
|
5054
|
+
},
|
|
5055
|
+
{
|
|
5056
|
+
runId: "after-2"
|
|
5057
|
+
}
|
|
5058
|
+
]);
|
|
5059
|
+
release();
|
|
5060
|
+
await stopping;
|
|
5061
|
+
expect4(new Set(handledFirst)).toEqual(/* @__PURE__ */ new Set([
|
|
5062
|
+
"in-flight-1",
|
|
5063
|
+
"in-flight-2"
|
|
5064
|
+
]));
|
|
5065
|
+
await pause(300);
|
|
5066
|
+
expect4(handledFirst).toHaveLength(2);
|
|
5067
|
+
const handledSecond = [];
|
|
5068
|
+
const stopSecond = second.onDispatchedRun?.(async ({ runId }) => {
|
|
5069
|
+
handledSecond.push(runId);
|
|
5070
|
+
}, {
|
|
5071
|
+
concurrency: 2
|
|
5072
|
+
});
|
|
5073
|
+
await until(() => handledSecond.length === 2, timeoutMs);
|
|
5074
|
+
expect4(new Set(handledSecond)).toEqual(/* @__PURE__ */ new Set([
|
|
5075
|
+
"after-1",
|
|
5076
|
+
"after-2"
|
|
5077
|
+
]));
|
|
5078
|
+
await stopSecond?.();
|
|
5079
|
+
} finally {
|
|
5080
|
+
release();
|
|
5081
|
+
await Promise.allSettled(pair.map((t) => t.close?.()));
|
|
5082
|
+
}
|
|
5083
|
+
}, timeoutMs + 1e4);
|
|
5084
|
+
it3("drain waits for a run taken off the queue, and the draining instance takes no more", async (ctx) => {
|
|
5085
|
+
const pair = await pairOrSkip(() => ctx.skip());
|
|
5086
|
+
if (!pair) return;
|
|
5087
|
+
const store = new InMemoryStateStore4();
|
|
5088
|
+
const all = instances(store, pair);
|
|
5089
|
+
let release;
|
|
5090
|
+
const gate = new Promise((resolve) => {
|
|
5091
|
+
release = resolve;
|
|
5092
|
+
});
|
|
5093
|
+
const ranOn = /* @__PURE__ */ new Map();
|
|
5094
|
+
for (const { name: name2, engine } of all) {
|
|
5095
|
+
engine.register("slow", "1", async (ctx2, input) => ctx2.localStep("work", async () => {
|
|
5096
|
+
const { id } = input;
|
|
5097
|
+
ranOn.set(id, name2);
|
|
5098
|
+
if (id === "held") await gate;
|
|
5099
|
+
return id;
|
|
5100
|
+
}));
|
|
5101
|
+
}
|
|
5102
|
+
const [draining, other] = all;
|
|
5103
|
+
try {
|
|
5104
|
+
draining.engine.consumeRuns();
|
|
5105
|
+
await draining.engine.start("slow", {
|
|
5106
|
+
id: "held"
|
|
5107
|
+
}, "held");
|
|
5108
|
+
await until(() => ranOn.has("held"), timeoutMs);
|
|
5109
|
+
let drained = false;
|
|
5110
|
+
const drain = draining.engine.drain(timeoutMs).then(() => {
|
|
5111
|
+
drained = true;
|
|
5112
|
+
});
|
|
5113
|
+
await pause(200);
|
|
5114
|
+
expect4(drained).toBe(false);
|
|
5115
|
+
await draining.engine.start("slow", {
|
|
5116
|
+
id: "later"
|
|
5117
|
+
}, "later");
|
|
5118
|
+
await pause(200);
|
|
5119
|
+
expect4(ranOn.has("later")).toBe(false);
|
|
5120
|
+
release();
|
|
5121
|
+
await drain;
|
|
5122
|
+
expect4((await store.getRun("held"))?.status).toBe("completed");
|
|
5123
|
+
other.engine.consumeRuns();
|
|
5124
|
+
await until(async () => (await store.getRun("later"))?.status === "completed", timeoutMs);
|
|
5125
|
+
expect4(ranOn.get("later")).toBe("instance-1");
|
|
5126
|
+
} finally {
|
|
5127
|
+
release();
|
|
5128
|
+
await shutdown(all, pair);
|
|
5129
|
+
}
|
|
5130
|
+
}, timeoutMs + 1e4);
|
|
5131
|
+
for (const { what, body, output, signal, hold = "suspend" } of MID_TURN) {
|
|
5132
|
+
it3(`${what}, landing while the parent's turn runs on the other instance, resumes it once that turn ends`, async (ctx) => {
|
|
5133
|
+
const pair = await pairOrSkip(() => ctx.skip());
|
|
5134
|
+
if (!pair) return;
|
|
5135
|
+
const inner = new InMemoryStateStore4();
|
|
5136
|
+
const { store, state } = holdingTurn(inner, hold);
|
|
5137
|
+
const now = Date.now();
|
|
5138
|
+
const [first, second] = pair;
|
|
5139
|
+
const busy = new Proxy(first, {
|
|
5140
|
+
get(target, prop, receiver) {
|
|
5141
|
+
if (prop === "onDispatchedRun") {
|
|
5142
|
+
return (handler, opts) => target.onDispatchedRun?.(handler, {
|
|
5143
|
+
...opts,
|
|
5144
|
+
concurrency: 1
|
|
5145
|
+
});
|
|
5146
|
+
}
|
|
5147
|
+
const value = Reflect.get(target, prop, receiver);
|
|
5148
|
+
return typeof value === "function" ? value.bind(target) : value;
|
|
5149
|
+
}
|
|
5150
|
+
});
|
|
5151
|
+
const engines = [
|
|
5152
|
+
busy,
|
|
5153
|
+
second
|
|
5154
|
+
].map((transport) => new WorkflowEngine5({
|
|
5155
|
+
store,
|
|
5156
|
+
transport,
|
|
5157
|
+
clock: /* @__PURE__ */ __name(() => now, "clock")
|
|
5158
|
+
}));
|
|
5159
|
+
for (const engine of engines) {
|
|
5160
|
+
engine.register("child", "1", async () => "done");
|
|
5161
|
+
engine.register("parent", "1", async (wctx) => body(wctx));
|
|
5162
|
+
}
|
|
5163
|
+
const [holder, other] = engines;
|
|
5164
|
+
try {
|
|
5165
|
+
holder.consumeRuns();
|
|
5166
|
+
await holder.start("parent", {}, "p");
|
|
5167
|
+
await until(() => state.held, timeoutMs);
|
|
5168
|
+
other.consumeRuns();
|
|
5169
|
+
if (signal) await other.signal("go", "sent");
|
|
5170
|
+
else if (hold === "suspend") {
|
|
5171
|
+
const n = Array.isArray(output) ? output.length : 1;
|
|
5172
|
+
await until(async () => (await inner.listRuns({
|
|
5173
|
+
workflow: "child",
|
|
5174
|
+
status: "completed"
|
|
5175
|
+
})).length >= n, timeoutMs);
|
|
5176
|
+
}
|
|
5177
|
+
await pause(2600);
|
|
5178
|
+
state.release();
|
|
5179
|
+
await until(async () => (await inner.getRun("p"))?.status === "completed", timeoutMs);
|
|
5180
|
+
expect4((await inner.getRun("p"))?.output).toEqual(output);
|
|
5181
|
+
} finally {
|
|
5182
|
+
state.release();
|
|
5183
|
+
await shutdown(engines.map((engine, i) => ({
|
|
5184
|
+
name: `instance-${i}`,
|
|
5185
|
+
engine
|
|
5186
|
+
})), pair);
|
|
5187
|
+
}
|
|
5188
|
+
}, timeoutMs + 2e4);
|
|
5189
|
+
}
|
|
5190
|
+
});
|
|
5191
|
+
}
|
|
5192
|
+
__name(runRunDispatchContract, "runRunDispatchContract");
|
|
4294
5193
|
export {
|
|
4295
5194
|
DURABLE_CANONICAL_COLUMNS,
|
|
4296
5195
|
MutableClock,
|
|
@@ -4313,6 +5212,7 @@ export {
|
|
|
4313
5212
|
recordedSteps,
|
|
4314
5213
|
registerCheckpointAggregationCases,
|
|
4315
5214
|
runAdmissionBackendContract,
|
|
5215
|
+
runRunDispatchContract,
|
|
4316
5216
|
runStateStoreContract,
|
|
4317
5217
|
serializeRunHistory
|
|
4318
5218
|
};
|