@entifix/testing-unit 0.23.24 → 0.23.26
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow-engine.contract.d.ts","sourceRoot":"","sources":["../../src/contracts/flow-engine.contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,eAAe,EAKrB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAIxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAsCjE,sDAAsD;AACtD,eAAO,MAAM,yBAAyB,EAAE,eAQtC,CAAC;AA4EH;;;;;;;;GAQG;AACH,eAAO,MAAM,0BAA0B,GACrC,MAAM,MAAM,EACZ,MAAM,CACJ,OAAO,EAAE,eAAe,EACxB,WAAW,EAAE,eAAe,KACzB,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,KACpC,
|
|
1
|
+
{"version":3,"file":"flow-engine.contract.d.ts","sourceRoot":"","sources":["../../src/contracts/flow-engine.contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,eAAe,EAKrB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAIxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAsCjE,sDAAsD;AACtD,eAAO,MAAM,yBAAyB,EAAE,eAQtC,CAAC;AA4EH;;;;;;;;GAQG;AACH,eAAO,MAAM,0BAA0B,GACrC,MAAM,MAAM,EACZ,MAAM,CACJ,OAAO,EAAE,eAAe,EACxB,WAAW,EAAE,eAAe,KACzB,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,KACpC,IA6PF,CAAC"}
|
|
@@ -146,16 +146,27 @@ const succeeding = ()=>Effect.succeed({
|
|
|
146
146
|
*/ export const describeFlowEngineContract = (name, make)=>{
|
|
147
147
|
const run = (effect)=>Effect.runPromise(effect);
|
|
148
148
|
/**
|
|
149
|
+
* How long a case watches a flow move: every 10 ms, for up to 10 s. A durable
|
|
150
|
+
* engine on a cold runner over a busy database took more than 2 s to finish
|
|
151
|
+
* a three-step flow on CI, and a budget tighter than the engine is a case
|
|
152
|
+
* that fails on a slow machine rather than on a wrong state. An engine that
|
|
153
|
+
* settles at once costs nothing for it.
|
|
154
|
+
*/ const polled = Schedule.spaced('10 millis').pipe(Schedule.upTo({
|
|
155
|
+
duration: '10 seconds'
|
|
156
|
+
}));
|
|
157
|
+
/**
|
|
149
158
|
* The flow's status once it has stopped moving. A start answers the flow id,
|
|
150
159
|
* never the outcome — a durable engine runs the slip detached — so a case
|
|
151
160
|
* reads the state the flow comes to rest in, a wait included.
|
|
152
161
|
*/ const settled = (engine, flowId)=>run(engine.status(flowId).pipe(Effect.repeat({
|
|
153
162
|
until: (status)=>status.state !== 'running',
|
|
154
|
-
schedule:
|
|
155
|
-
times: 200
|
|
163
|
+
schedule: polled
|
|
156
164
|
})));
|
|
157
165
|
const state = async (engine, flowId)=>(await settled(engine, flowId)).state;
|
|
158
|
-
|
|
166
|
+
// Above the watch, with room for the case's own setup: a fresh database.
|
|
167
|
+
describe(`FlowEngine contract: ${name}`, {
|
|
168
|
+
timeout: 20000
|
|
169
|
+
}, ()=>{
|
|
159
170
|
it('answers the slip’s flow id, and the same one for a repeated key', async ()=>{
|
|
160
171
|
const engine = await make(flowEngineContractCatalog, succeeding);
|
|
161
172
|
const slip = slipOf('flow-1', [
|
|
@@ -318,8 +329,7 @@ const succeeding = ()=>Effect.succeed({
|
|
|
318
329
|
}), 'k'));
|
|
319
330
|
const status = await run(engine.status('flow-1').pipe(Effect.repeat({
|
|
320
331
|
until: (next)=>next.state === 'completed',
|
|
321
|
-
schedule:
|
|
322
|
-
times: 200
|
|
332
|
+
schedule: polled
|
|
323
333
|
})));
|
|
324
334
|
expect(status.state).toBe('completed');
|
|
325
335
|
expect(called).toEqual([
|
|
@@ -336,8 +346,7 @@ const succeeding = ()=>Effect.succeed({
|
|
|
336
346
|
}), 'k'));
|
|
337
347
|
const status = await run(engine.status('flow-1').pipe(Effect.repeat({
|
|
338
348
|
until: (next)=>next.state === 'stranded',
|
|
339
|
-
schedule:
|
|
340
|
-
times: 200
|
|
349
|
+
schedule: polled
|
|
341
350
|
})));
|
|
342
351
|
expect(status).toMatchObject({
|
|
343
352
|
state: 'stranded',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/contracts/flow-engine.contract.ts"],"sourcesContent":["import {\n defineCatalog,\n defineFragment,\n type FragmentCatalog,\n type FragmentDescriptor,\n fragmentRef,\n type Slip,\n type SlipStep,\n} from '@entifix/business/flow';\nimport { Declined } from '@entifix/core';\nimport type { FlowEngine } from '@entifix/transactions';\nimport { Effect, Schedule, Schema } from 'effect';\nimport { describe, expect, it } from 'vitest';\n\nimport type { FakeParticipant } from '../doubles/flow-engine.js';\n\nconst contract = {\n input: Schema.Unknown,\n output: Schema.Unknown,\n failure: Schema.Unknown,\n};\n\nconst fragment = (\n id: string,\n kind: FragmentDescriptor['kind'],\n): FragmentDescriptor =>\n defineFragment({\n id: `contract.${id}`,\n version: 1,\n module: 'contract',\n kind,\n participant: 'contract',\n call: { method: 'POST', path: `/api/${id}` },\n ...(kind === 'compensatable'\n ? { compensation: { method: 'DELETE', path: `/api/${id}/:id` } as const }\n : {}),\n cardinality: 'one',\n contract,\n });\n\nconst hold = fragment('hold', 'compensatable');\nconst take = fragment('take', 'pivot');\nconst settle = fragment('settle', 'retriable');\nconst wait = fragment('await', 'wait');\n/** A wait that declares what it is answered with, for guards to branch on. */\nconst report = defineFragment({\n ...fragment('report', 'wait'),\n outcomes: ['delivered', 'refused'],\n});\nconst close = fragment('close', 'retriable');\nconst restore = fragment('restore', 'retriable');\n\n/** The catalog every case composes its slips from. */\nexport const flowEngineContractCatalog: FragmentCatalog = defineCatalog([\n hold,\n take,\n settle,\n wait,\n report,\n close,\n restore,\n]);\n\nconst stepOf = (descriptor: FragmentDescriptor): SlipStep => ({\n ref: fragmentRef(descriptor),\n step: descriptor.id.replace('contract.', ''),\n cardinality: 'one',\n});\n\nconst slipOf = (\n flowId: string,\n steps: readonly FragmentDescriptor[],\n): Slip => ({\n slipVersion: 1,\n flowId,\n recipe: 'contract',\n stages: [{ name: 'main', steps: steps.map(stepOf) }],\n resolution: [],\n composedAt: '2026-01-01T00:00:00.000Z',\n});\n\n/**\n * take ▸ report ▸ close (on `delivered`) ▸ restore (on `refused` or the\n * timeout's `unanswered`): the one branch a slip can take, on a wait's answer.\n */\nconst branchingSlip = (\n flowId: string,\n report: Readonly<Record<string, unknown>> = {},\n): Slip => ({\n ...slipOf(flowId, []),\n stages: [\n {\n name: 'main',\n steps: [\n { ref: fragmentRef(take), step: 'take', cardinality: 'one' },\n {\n ref: 'contract.report@1',\n step: 'report',\n cardinality: 'one',\n parameters: { correlation: `parcel-${flowId}`, ...report },\n },\n {\n ref: fragmentRef(close),\n step: 'close',\n cardinality: 'one',\n guard: { wait: 'report', outcomes: ['delivered'] },\n },\n {\n ref: fragmentRef(restore),\n step: 'restore',\n cardinality: 'one',\n guard: { wait: 'report', outcomes: ['refused', 'unanswered'] },\n },\n ],\n },\n ],\n});\n\n/** A participant that succeeds, remembering every step it was called for. */\nconst recording = () => {\n const called: string[] = [];\n const participant: FakeParticipant = step => {\n called.push(step.step);\n return Effect.succeed({ ok: true });\n };\n return { called, participant };\n};\n\nconst failing =\n (failAt: string): FakeParticipant =>\n step =>\n step.step === failAt\n ? Effect.fail(new Declined({ reason: 'refused' }))\n : Effect.succeed({ ok: true });\n\nconst succeeding: FakeParticipant = () => Effect.succeed({ ok: true });\n\n/**\n * What every {@link FlowEngine} must guarantee, whatever runs it: a start is\n * idempotent on its key, a failure before the commit point compensates and one\n * after it suspends, a wait takes the signal it waits for and no other, and an\n * unknown flow is a typed `FlowNotFound`.\n *\n * `make` builds a fresh engine over the contract's catalog and the participant\n * a case supplies.\n */\nexport const describeFlowEngineContract = (\n name: string,\n make: (\n catalog: FragmentCatalog,\n participant: FakeParticipant,\n ) => FlowEngine | Promise<FlowEngine>,\n): void => {\n const run = <A, E>(effect: Effect.Effect<A, E>) => Effect.runPromise(effect);\n /**\n * The flow's status once it has stopped moving. A start answers the flow id,\n * never the outcome — a durable engine runs the slip detached — so a case\n * reads the state the flow comes to rest in, a wait included.\n */\n const settled = (engine: FlowEngine, flowId: string) =>\n run(\n engine.status(flowId).pipe(\n Effect.repeat({\n until: status => status.state !== 'running',\n schedule: Schedule.spaced('10 millis'),\n times: 200,\n }),\n ),\n );\n const state = async (engine: FlowEngine, flowId: string) =>\n (await settled(engine, flowId)).state;\n\n describe(`FlowEngine contract: ${name}`, () => {\n it('answers the slip’s flow id, and the same one for a repeated key', async () => {\n const engine = await make(flowEngineContractCatalog, succeeding);\n const slip = slipOf('flow-1', [hold, take, settle]);\n\n const first = await run(engine.start(slip, 'key-1'));\n const again = await run(engine.start(slipOf('flow-2', [hold]), 'key-1'));\n\n expect(first).toEqual({ flowId: 'flow-1' });\n expect(again).toEqual({ flowId: 'flow-1' });\n });\n\n it('completes a flow whose every step succeeds', async () => {\n const engine = await make(flowEngineContractCatalog, succeeding);\n await run(engine.start(slipOf('flow-1', [hold, take, settle]), 'k'));\n\n expect(await state(engine, 'flow-1')).toBe('completed');\n });\n\n it('compensates a failure before the commit point', async () => {\n const engine = await make(flowEngineContractCatalog, failing('take'));\n await run(engine.start(slipOf('flow-1', [hold, take, settle]), 'k'));\n\n expect(await state(engine, 'flow-1')).toBe('compensated');\n });\n\n it('suspends a failure after the commit point, at that step', async () => {\n const engine = await make(flowEngineContractCatalog, failing('settle'));\n await run(engine.start(slipOf('flow-1', [hold, take, settle]), 'k'));\n\n expect(await settled(engine, 'flow-1')).toMatchObject({\n state: 'suspended',\n step: 'settle',\n });\n });\n\n it('waits for the signal it waits for, and refuses any other', async () => {\n const engine = await make(flowEngineContractCatalog, succeeding);\n await run(engine.start(slipOf('flow-1', [take, wait, settle]), 'k'));\n\n expect(await state(engine, 'flow-1')).toBe('waiting');\n const wrong = await run(\n Effect.flip(engine.signal('flow-1', 'elsewhere', {})),\n );\n expect(wrong._tag).toBe('FlowSignalRejected');\n\n await run(engine.signal('flow-1', 'await', { delivered: true }));\n expect(await state(engine, 'flow-1')).toBe('completed');\n\n const late = await run(Effect.flip(engine.signal('flow-1', 'await', {})));\n expect(late._tag).toBe('FlowSignalRejected');\n });\n\n it('completes a wait by what it is correlated with', async () => {\n const engine = await make(flowEngineContractCatalog, succeeding);\n const slip = slipOf('flow-1', [take, wait, settle]);\n const correlated: Slip = {\n ...slip,\n stages: slip.stages.map(stage => ({\n ...stage,\n steps: stage.steps.map(step =>\n step.step === 'await'\n ? { ...step, parameters: { correlation: 'order-7' } }\n : step,\n ),\n })),\n };\n await run(engine.start(correlated, 'k'));\n expect(await state(engine, 'flow-1')).toBe('waiting');\n\n const stranger = await run(\n Effect.flip(engine.signalCorrelated('order-8', { outcome: 'any' })),\n );\n expect(stranger._tag).toBe('FlowNotFound');\n\n await run(engine.signalCorrelated('order-7', { outcome: 'delivered' }));\n expect(await state(engine, 'flow-1')).toBe('completed');\n });\n\n it('leaves every flow a signal resumed finished, however many resume at once', async () => {\n // A wait resumed as its last step finishes almost at once, so nothing\n // the signal records may land after the resume: a `running` written\n // behind the flow's own `completed` would pin it there. A burst rather\n // than one flow, because an ordering fault shows up only under load.\n const engine = await make(flowEngineContractCatalog, succeeding);\n const flowIds = Array.from({ length: 20 }, (_, n) => `burst-${n}`);\n for (const flowId of flowIds)\n await run(engine.start(slipOf(flowId, [take, wait]), flowId));\n for (const flowId of flowIds)\n expect(await state(engine, flowId)).toBe('waiting');\n\n await run(\n Effect.forEach(\n flowIds,\n flowId => engine.signal(flowId, 'await', { delivered: true }),\n { concurrency: 'unbounded' },\n ),\n );\n\n const states = await Promise.all(\n flowIds.map(flowId => state(engine, flowId)),\n );\n expect(states.filter(next => next !== 'completed')).toEqual([]);\n });\n\n it('runs only the steps guarded on the outcome a wait was answered with', async () => {\n const { called, participant } = recording();\n const engine = await make(flowEngineContractCatalog, participant);\n await run(engine.start(branchingSlip('flow-1'), 'k'));\n expect(await state(engine, 'flow-1')).toBe('waiting');\n\n await run(\n engine.signalCorrelated('parcel-flow-1', { outcome: 'refused' }),\n );\n\n expect(await state(engine, 'flow-1')).toBe('completed');\n expect(called).toEqual(['take', 'restore']);\n });\n\n it('refuses a correlated signal its wait is not answered with', async () => {\n const engine = await make(flowEngineContractCatalog, succeeding);\n await run(engine.start(branchingSlip('flow-1'), 'k'));\n expect(await state(engine, 'flow-1')).toBe('waiting');\n\n const stray = await run(\n Effect.flip(\n engine.signalCorrelated('parcel-flow-1', { outcome: 'returned' }),\n ),\n );\n\n expect(stray._tag).toBe('FlowSignalRejected');\n expect(await state(engine, 'flow-1')).toBe('waiting');\n });\n\n it('answers FlowNotFound to a correlated signal once nothing is parked on it', async () => {\n const engine = await make(flowEngineContractCatalog, succeeding);\n await run(engine.start(branchingSlip('flow-1'), 'k'));\n await settled(engine, 'flow-1');\n await run(\n engine.signalCorrelated('parcel-flow-1', { outcome: 'delivered' }),\n );\n expect(await state(engine, 'flow-1')).toBe('completed');\n\n const again = await run(\n Effect.flip(\n engine.signalCorrelated('parcel-flow-1', { outcome: 'delivered' }),\n ),\n );\n\n expect(again._tag).toBe('FlowNotFound');\n });\n\n it('answers a timed-out wait with the outcome its onTimeout names', async () => {\n const { called, participant } = recording();\n const engine = await make(flowEngineContractCatalog, participant);\n await run(\n engine.start(\n branchingSlip('flow-1', {\n timeoutMs: 20,\n onTimeout: { outcome: 'unanswered' },\n }),\n 'k',\n ),\n );\n\n const status = await run(\n engine.status('flow-1').pipe(\n Effect.repeat({\n until: next => next.state === 'completed',\n schedule: Schedule.spaced('10 millis'),\n times: 200,\n }),\n ),\n );\n\n expect(status.state).toBe('completed');\n expect(called).toEqual(['take', 'restore']);\n });\n\n it('strands a flow whose wait runs out and strands on its timeout', async () => {\n const { called, participant } = recording();\n const engine = await make(flowEngineContractCatalog, participant);\n await run(\n engine.start(\n branchingSlip('flow-1', { timeoutMs: 20, onTimeout: 'strand' }),\n 'k',\n ),\n );\n\n const status = await run(\n engine.status('flow-1').pipe(\n Effect.repeat({\n until: next => next.state === 'stranded',\n schedule: Schedule.spaced('10 millis'),\n times: 200,\n }),\n ),\n );\n\n expect(status).toMatchObject({ state: 'stranded', step: 'report' });\n expect(called).toEqual(['take']);\n });\n\n it('interrupts a waiting flow', async () => {\n const engine = await make(flowEngineContractCatalog, succeeding);\n await run(engine.start(slipOf('flow-1', [take, wait]), 'k'));\n expect(await state(engine, 'flow-1')).toBe('waiting');\n\n await run(engine.interrupt('flow-1'));\n\n expect(await state(engine, 'flow-1')).toBe('interrupted');\n });\n\n it('answers FlowNotFound for a flow it never started', async () => {\n const engine = await make(flowEngineContractCatalog, succeeding);\n\n for (const effect of [\n engine.status('nope'),\n engine.signal('nope', 'await', {}),\n engine.signalCorrelated('nope', { outcome: 'any' }),\n engine.interrupt('nope'),\n ])\n expect((await run(Effect.flip(effect)))._tag).toBe('FlowNotFound');\n });\n });\n};\n"],"names":["defineCatalog","defineFragment","fragmentRef","Declined","Effect","Schedule","Schema","describe","expect","it","contract","input","Unknown","output","failure","fragment","id","kind","version","module","participant","call","method","path","compensation","cardinality","hold","take","settle","wait","report","outcomes","close","restore","flowEngineContractCatalog","stepOf","descriptor","ref","step","replace","slipOf","flowId","steps","slipVersion","recipe","stages","name","map","resolution","composedAt","branchingSlip","parameters","correlation","guard","recording","called","push","succeed","ok","failing","failAt","fail","reason","succeeding","describeFlowEngineContract","make","run","effect","runPromise","settled","engine","status","pipe","repeat","until","state","schedule","spaced","times","slip","first","start","again","toEqual","toBe","toMatchObject","wrong","flip","signal","_tag","delivered","late","correlated","stage","stranger","signalCorrelated","outcome","flowIds","Array","from","length","_","n","forEach","concurrency","states","Promise","all","filter","next","stray","timeoutMs","onTimeout","interrupt"],"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AQc,aAAa,CAAC;gBAAEV,OAAO;gBAAYrC,MAAM;YAAS;YACjE9B,OAAO+C,QAAQ4B,OAAO,CAAC;gBAAC;aAAO;QACjC;QAEA1E,GAAG,6BAA6B;YAC9B,MAAM6D,SAAS,MAAML,KAAK/B,2BAA2B6B;YACrD,MAAMG,IAAII,OAAOW,KAAK,CAACzC,OAAO,UAAU;gBAACb;gBAAME;aAAK,GAAG;YACvDrB,OAAO,MAAMmE,MAAML,QAAQ,WAAWc,IAAI,CAAC;YAE3C,MAAMlB,IAAII,OAAO2C,SAAS,CAAC;YAE3BzG,OAAO,MAAMmE,MAAML,QAAQ,WAAWc,IAAI,CAAC;QAC7C;QAEA3E,GAAG,oDAAoD;YACrD,MAAM6D,SAAS,MAAML,KAAK/B,2BAA2B6B;YAErD,KAAK,MAAMI,UAAU;gBACnBG,OAAOC,MAAM,CAAC;gBACdD,OAAOkB,MAAM,CAAC,QAAQ,SAAS,CAAC;gBAChClB,OAAOyB,gBAAgB,CAAC,QAAQ;oBAAEC,SAAS;gBAAM;gBACjD1B,OAAO2C,SAAS,CAAC;aAClB,CACCzG,OAAO,AAAC,CAAA,MAAM0D,IAAI9D,OAAOmF,IAAI,CAACpB,QAAO,EAAGsB,IAAI,EAAEL,IAAI,CAAC;QACvD;IACF;AACF,EAAE"}
|
|
1
|
+
{"version":3,"sources":["../../src/contracts/flow-engine.contract.ts"],"sourcesContent":["import {\n defineCatalog,\n defineFragment,\n type FragmentCatalog,\n type FragmentDescriptor,\n fragmentRef,\n type Slip,\n type SlipStep,\n} from '@entifix/business/flow';\nimport { Declined } from '@entifix/core';\nimport type { FlowEngine } from '@entifix/transactions';\nimport { Effect, Schedule, Schema } from 'effect';\nimport { describe, expect, it } from 'vitest';\n\nimport type { FakeParticipant } from '../doubles/flow-engine.js';\n\nconst contract = {\n input: Schema.Unknown,\n output: Schema.Unknown,\n failure: Schema.Unknown,\n};\n\nconst fragment = (\n id: string,\n kind: FragmentDescriptor['kind'],\n): FragmentDescriptor =>\n defineFragment({\n id: `contract.${id}`,\n version: 1,\n module: 'contract',\n kind,\n participant: 'contract',\n call: { method: 'POST', path: `/api/${id}` },\n ...(kind === 'compensatable'\n ? { compensation: { method: 'DELETE', path: `/api/${id}/:id` } as const }\n : {}),\n cardinality: 'one',\n contract,\n });\n\nconst hold = fragment('hold', 'compensatable');\nconst take = fragment('take', 'pivot');\nconst settle = fragment('settle', 'retriable');\nconst wait = fragment('await', 'wait');\n/** A wait that declares what it is answered with, for guards to branch on. */\nconst report = defineFragment({\n ...fragment('report', 'wait'),\n outcomes: ['delivered', 'refused'],\n});\nconst close = fragment('close', 'retriable');\nconst restore = fragment('restore', 'retriable');\n\n/** The catalog every case composes its slips from. */\nexport const flowEngineContractCatalog: FragmentCatalog = defineCatalog([\n hold,\n take,\n settle,\n wait,\n report,\n close,\n restore,\n]);\n\nconst stepOf = (descriptor: FragmentDescriptor): SlipStep => ({\n ref: fragmentRef(descriptor),\n step: descriptor.id.replace('contract.', ''),\n cardinality: 'one',\n});\n\nconst slipOf = (\n flowId: string,\n steps: readonly FragmentDescriptor[],\n): Slip => ({\n slipVersion: 1,\n flowId,\n recipe: 'contract',\n stages: [{ name: 'main', steps: steps.map(stepOf) }],\n resolution: [],\n composedAt: '2026-01-01T00:00:00.000Z',\n});\n\n/**\n * take ▸ report ▸ close (on `delivered`) ▸ restore (on `refused` or the\n * timeout's `unanswered`): the one branch a slip can take, on a wait's answer.\n */\nconst branchingSlip = (\n flowId: string,\n report: Readonly<Record<string, unknown>> = {},\n): Slip => ({\n ...slipOf(flowId, []),\n stages: [\n {\n name: 'main',\n steps: [\n { ref: fragmentRef(take), step: 'take', cardinality: 'one' },\n {\n ref: 'contract.report@1',\n step: 'report',\n cardinality: 'one',\n parameters: { correlation: `parcel-${flowId}`, ...report },\n },\n {\n ref: fragmentRef(close),\n step: 'close',\n cardinality: 'one',\n guard: { wait: 'report', outcomes: ['delivered'] },\n },\n {\n ref: fragmentRef(restore),\n step: 'restore',\n cardinality: 'one',\n guard: { wait: 'report', outcomes: ['refused', 'unanswered'] },\n },\n ],\n },\n ],\n});\n\n/** A participant that succeeds, remembering every step it was called for. */\nconst recording = () => {\n const called: string[] = [];\n const participant: FakeParticipant = step => {\n called.push(step.step);\n return Effect.succeed({ ok: true });\n };\n return { called, participant };\n};\n\nconst failing =\n (failAt: string): FakeParticipant =>\n step =>\n step.step === failAt\n ? Effect.fail(new Declined({ reason: 'refused' }))\n : Effect.succeed({ ok: true });\n\nconst succeeding: FakeParticipant = () => Effect.succeed({ ok: true });\n\n/**\n * What every {@link FlowEngine} must guarantee, whatever runs it: a start is\n * idempotent on its key, a failure before the commit point compensates and one\n * after it suspends, a wait takes the signal it waits for and no other, and an\n * unknown flow is a typed `FlowNotFound`.\n *\n * `make` builds a fresh engine over the contract's catalog and the participant\n * a case supplies.\n */\nexport const describeFlowEngineContract = (\n name: string,\n make: (\n catalog: FragmentCatalog,\n participant: FakeParticipant,\n ) => FlowEngine | Promise<FlowEngine>,\n): void => {\n const run = <A, E>(effect: Effect.Effect<A, E>) => Effect.runPromise(effect);\n /**\n * How long a case watches a flow move: every 10 ms, for up to 10 s. A durable\n * engine on a cold runner over a busy database took more than 2 s to finish\n * a three-step flow on CI, and a budget tighter than the engine is a case\n * that fails on a slow machine rather than on a wrong state. An engine that\n * settles at once costs nothing for it.\n */\n const polled = Schedule.spaced('10 millis').pipe(\n Schedule.upTo({ duration: '10 seconds' }),\n );\n /**\n * The flow's status once it has stopped moving. A start answers the flow id,\n * never the outcome — a durable engine runs the slip detached — so a case\n * reads the state the flow comes to rest in, a wait included.\n */\n const settled = (engine: FlowEngine, flowId: string) =>\n run(\n engine.status(flowId).pipe(\n Effect.repeat({\n until: status => status.state !== 'running',\n schedule: polled,\n }),\n ),\n );\n const state = async (engine: FlowEngine, flowId: string) =>\n (await settled(engine, flowId)).state;\n\n // Above the watch, with room for the case's own setup: a fresh database.\n describe(`FlowEngine contract: ${name}`, { timeout: 20_000 }, () => {\n it('answers the slip’s flow id, and the same one for a repeated key', async () => {\n const engine = await make(flowEngineContractCatalog, succeeding);\n const slip = slipOf('flow-1', [hold, take, settle]);\n\n const first = await run(engine.start(slip, 'key-1'));\n const again = await run(engine.start(slipOf('flow-2', [hold]), 'key-1'));\n\n expect(first).toEqual({ flowId: 'flow-1' });\n expect(again).toEqual({ flowId: 'flow-1' });\n });\n\n it('completes a flow whose every step succeeds', async () => {\n const engine = await make(flowEngineContractCatalog, succeeding);\n await run(engine.start(slipOf('flow-1', [hold, take, settle]), 'k'));\n\n expect(await state(engine, 'flow-1')).toBe('completed');\n });\n\n it('compensates a failure before the commit point', async () => {\n const engine = await make(flowEngineContractCatalog, failing('take'));\n await run(engine.start(slipOf('flow-1', [hold, take, settle]), 'k'));\n\n expect(await state(engine, 'flow-1')).toBe('compensated');\n });\n\n it('suspends a failure after the commit point, at that step', async () => {\n const engine = await make(flowEngineContractCatalog, failing('settle'));\n await run(engine.start(slipOf('flow-1', [hold, take, settle]), 'k'));\n\n expect(await settled(engine, 'flow-1')).toMatchObject({\n state: 'suspended',\n step: 'settle',\n });\n });\n\n it('waits for the signal it waits for, and refuses any other', async () => {\n const engine = await make(flowEngineContractCatalog, succeeding);\n await run(engine.start(slipOf('flow-1', [take, wait, settle]), 'k'));\n\n expect(await state(engine, 'flow-1')).toBe('waiting');\n const wrong = await run(\n Effect.flip(engine.signal('flow-1', 'elsewhere', {})),\n );\n expect(wrong._tag).toBe('FlowSignalRejected');\n\n await run(engine.signal('flow-1', 'await', { delivered: true }));\n expect(await state(engine, 'flow-1')).toBe('completed');\n\n const late = await run(Effect.flip(engine.signal('flow-1', 'await', {})));\n expect(late._tag).toBe('FlowSignalRejected');\n });\n\n it('completes a wait by what it is correlated with', async () => {\n const engine = await make(flowEngineContractCatalog, succeeding);\n const slip = slipOf('flow-1', [take, wait, settle]);\n const correlated: Slip = {\n ...slip,\n stages: slip.stages.map(stage => ({\n ...stage,\n steps: stage.steps.map(step =>\n step.step === 'await'\n ? { ...step, parameters: { correlation: 'order-7' } }\n : step,\n ),\n })),\n };\n await run(engine.start(correlated, 'k'));\n expect(await state(engine, 'flow-1')).toBe('waiting');\n\n const stranger = await run(\n Effect.flip(engine.signalCorrelated('order-8', { outcome: 'any' })),\n );\n expect(stranger._tag).toBe('FlowNotFound');\n\n await run(engine.signalCorrelated('order-7', { outcome: 'delivered' }));\n expect(await state(engine, 'flow-1')).toBe('completed');\n });\n\n it('leaves every flow a signal resumed finished, however many resume at once', async () => {\n // A wait resumed as its last step finishes almost at once, so nothing\n // the signal records may land after the resume: a `running` written\n // behind the flow's own `completed` would pin it there. A burst rather\n // than one flow, because an ordering fault shows up only under load.\n const engine = await make(flowEngineContractCatalog, succeeding);\n const flowIds = Array.from({ length: 20 }, (_, n) => `burst-${n}`);\n for (const flowId of flowIds)\n await run(engine.start(slipOf(flowId, [take, wait]), flowId));\n for (const flowId of flowIds)\n expect(await state(engine, flowId)).toBe('waiting');\n\n await run(\n Effect.forEach(\n flowIds,\n flowId => engine.signal(flowId, 'await', { delivered: true }),\n { concurrency: 'unbounded' },\n ),\n );\n\n const states = await Promise.all(\n flowIds.map(flowId => state(engine, flowId)),\n );\n expect(states.filter(next => next !== 'completed')).toEqual([]);\n });\n\n it('runs only the steps guarded on the outcome a wait was answered with', async () => {\n const { called, participant } = recording();\n const engine = await make(flowEngineContractCatalog, participant);\n await run(engine.start(branchingSlip('flow-1'), 'k'));\n expect(await state(engine, 'flow-1')).toBe('waiting');\n\n await run(\n engine.signalCorrelated('parcel-flow-1', { outcome: 'refused' }),\n );\n\n expect(await state(engine, 'flow-1')).toBe('completed');\n expect(called).toEqual(['take', 'restore']);\n });\n\n it('refuses a correlated signal its wait is not answered with', async () => {\n const engine = await make(flowEngineContractCatalog, succeeding);\n await run(engine.start(branchingSlip('flow-1'), 'k'));\n expect(await state(engine, 'flow-1')).toBe('waiting');\n\n const stray = await run(\n Effect.flip(\n engine.signalCorrelated('parcel-flow-1', { outcome: 'returned' }),\n ),\n );\n\n expect(stray._tag).toBe('FlowSignalRejected');\n expect(await state(engine, 'flow-1')).toBe('waiting');\n });\n\n it('answers FlowNotFound to a correlated signal once nothing is parked on it', async () => {\n const engine = await make(flowEngineContractCatalog, succeeding);\n await run(engine.start(branchingSlip('flow-1'), 'k'));\n await settled(engine, 'flow-1');\n await run(\n engine.signalCorrelated('parcel-flow-1', { outcome: 'delivered' }),\n );\n expect(await state(engine, 'flow-1')).toBe('completed');\n\n const again = await run(\n Effect.flip(\n engine.signalCorrelated('parcel-flow-1', { outcome: 'delivered' }),\n ),\n );\n\n expect(again._tag).toBe('FlowNotFound');\n });\n\n it('answers a timed-out wait with the outcome its onTimeout names', async () => {\n const { called, participant } = recording();\n const engine = await make(flowEngineContractCatalog, participant);\n await run(\n engine.start(\n branchingSlip('flow-1', {\n timeoutMs: 20,\n onTimeout: { outcome: 'unanswered' },\n }),\n 'k',\n ),\n );\n\n const status = await run(\n engine.status('flow-1').pipe(\n Effect.repeat({\n until: next => next.state === 'completed',\n schedule: polled,\n }),\n ),\n );\n\n expect(status.state).toBe('completed');\n expect(called).toEqual(['take', 'restore']);\n });\n\n it('strands a flow whose wait runs out and strands on its timeout', async () => {\n const { called, participant } = recording();\n const engine = await make(flowEngineContractCatalog, participant);\n await run(\n engine.start(\n branchingSlip('flow-1', { timeoutMs: 20, onTimeout: 'strand' }),\n 'k',\n ),\n );\n\n const status = await run(\n engine.status('flow-1').pipe(\n Effect.repeat({\n until: next => next.state === 'stranded',\n schedule: polled,\n }),\n ),\n );\n\n expect(status).toMatchObject({ state: 'stranded', step: 'report' });\n expect(called).toEqual(['take']);\n });\n\n it('interrupts a waiting flow', async () => {\n const engine = await make(flowEngineContractCatalog, succeeding);\n await run(engine.start(slipOf('flow-1', [take, wait]), 'k'));\n expect(await state(engine, 'flow-1')).toBe('waiting');\n\n await run(engine.interrupt('flow-1'));\n\n expect(await state(engine, 'flow-1')).toBe('interrupted');\n });\n\n it('answers FlowNotFound for a flow it never started', async () => {\n const engine = await make(flowEngineContractCatalog, succeeding);\n\n for (const effect of [\n engine.status('nope'),\n engine.signal('nope', 'await', {}),\n engine.signalCorrelated('nope', { outcome: 'any' }),\n engine.interrupt('nope'),\n ])\n expect((await run(Effect.flip(effect)))._tag).toBe('FlowNotFound');\n });\n });\n};\n"],"names":["defineCatalog","defineFragment","fragmentRef","Declined","Effect","Schedule","Schema","describe","expect","it","contract","input","Unknown","output","failure","fragment","id","kind","version","module","participant","call","method","path","compensation","cardinality","hold","take","settle","wait","report","outcomes","close","restore","flowEngineContractCatalog","stepOf","descriptor","ref","step","replace","slipOf","flowId","steps","slipVersion","recipe","stages","name","map","resolution","composedAt","branchingSlip","parameters","correlation","guard","recording","called","push","succeed","ok","failing","failAt","fail","reason","succeeding","describeFlowEngineContract","make","run","effect","runPromise","polled","spaced","pipe","upTo","duration","settled","engine","status","repeat","until","state","schedule","timeout","slip","first","start","again","toEqual","toBe","toMatchObject","wrong","flip","signal","_tag","delivered","late","correlated","stage","stranger","signalCorrelated","outcome","flowIds","Array","from","length","_","n","forEach","concurrency","states","Promise","all","filter","next","stray","timeoutMs","onTimeout","interrupt"],"mappings":";AAAA,SACEA,aAAa,EACbC,cAAc,EAGdC,WAAW,QAGN,yBAAyB;AAChC,SAASC,QAAQ,QAAQ,gBAAgB;AAEzC,SAASC,MAAM,EAAEC,QAAQ,EAAEC,MAAM,QAAQ,SAAS;AAClD,SAASC,QAAQ,EAAEC,MAAM,EAAEC,EAAE,QAAQ,SAAS;AAI9C,MAAMC,WAAW;IACfC,OAAOL,OAAOM,OAAO;IACrBC,QAAQP,OAAOM,OAAO;IACtBE,SAASR,OAAOM,OAAO;AACzB;AAEA,MAAMG,WAAW,CACfC,IACAC,OAEAhB,eAAe;QACbe,IAAI,CAAC,SAAS,EAAEA,IAAI;QACpBE,SAAS;QACTC,QAAQ;QACRF;QACAG,aAAa;QACbC,MAAM;YAAEC,QAAQ;YAAQC,MAAM,CAAC,KAAK,EAAEP,IAAI;QAAC;OACvC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WY,IAAI,CAAC;QAC7C;QAEA9E,GAAG,oDAAoD;YACrD,MAAMkE,SAAS,MAAMV,KAAK/B,2BAA2B6B;YAErD,KAAK,MAAMI,UAAU;gBACnBQ,OAAOC,MAAM,CAAC;gBACdD,OAAOgB,MAAM,CAAC,QAAQ,SAAS,CAAC;gBAChChB,OAAOuB,gBAAgB,CAAC,QAAQ;oBAAEC,SAAS;gBAAM;gBACjDxB,OAAOyC,SAAS,CAAC;aAClB,CACC5G,OAAO,AAAC,CAAA,MAAM0D,IAAI9D,OAAOsF,IAAI,CAACvB,QAAO,EAAGyB,IAAI,EAAEL,IAAI,CAAC;QACvD;IACF;AACF,EAAE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@entifix/testing-unit",
|
|
3
|
-
"version": "0.23.
|
|
3
|
+
"version": "0.23.26",
|
|
4
4
|
"description": "Test doubles for entifix: in-memory ports, driver fakes for Mongo, Redis, RabbitMQ and SQL, MSW handlers and port contract suites.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -72,9 +72,9 @@
|
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
74
|
"@swc/helpers": "0.5.23",
|
|
75
|
-
"@entifix/business": "0.23.
|
|
76
|
-
"@entifix/core": "0.23.
|
|
77
|
-
"@entifix/transactions": "0.23.
|
|
75
|
+
"@entifix/business": "0.23.26",
|
|
76
|
+
"@entifix/core": "0.23.26",
|
|
77
|
+
"@entifix/transactions": "0.23.26"
|
|
78
78
|
},
|
|
79
79
|
"peerDependencies": {
|
|
80
80
|
"@testing-library/react": "*",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"msw": ">=3",
|
|
83
83
|
"react": "*",
|
|
84
84
|
"vitest": "*",
|
|
85
|
-
"@entifix/react-controls": "0.23.
|
|
85
|
+
"@entifix/react-controls": "0.23.26"
|
|
86
86
|
},
|
|
87
87
|
"peerDependenciesMeta": {
|
|
88
88
|
"@entifix/react-controls": {
|