callman-core 1.31.0 → 1.33.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ai-packs/db-queries.md +1 -1
- package/ai-packs/scenario-nodes.md +89 -15
- package/dist/ai/prompts/scenario.d.ts +1 -1
- package/dist/ai/prompts/scenario.d.ts.map +1 -1
- package/dist/ai/prompts/scenario.js +6 -3
- package/dist/ai/prompts/scenario.js.map +1 -1
- package/dist/ai/prompts/scenarioNodeDefaults.d.ts.map +1 -1
- package/dist/ai/prompts/scenarioNodeDefaults.js +9 -0
- package/dist/ai/prompts/scenarioNodeDefaults.js.map +1 -1
- package/dist/ai/prompts/scenarioNodeReference.d.ts.map +1 -1
- package/dist/ai/prompts/scenarioNodeReference.js +136 -17
- package/dist/ai/prompts/scenarioNodeReference.js.map +1 -1
- package/dist/host/db/db-query-reference.js +1 -1
- package/dist/host/db/db-query-reference.js.map +1 -1
- package/dist/host/db/mongoAdapter.d.ts +1 -0
- package/dist/host/db/mongoAdapter.d.ts.map +1 -1
- package/dist/host/db/mongoAdapter.js +21 -0
- package/dist/host/db/mongoAdapter.js.map +1 -1
- package/dist/host/db/queryExecutor.js +2 -2
- package/dist/host/db/queryExecutor.js.map +1 -1
- package/dist/host/index.d.ts +3 -1
- package/dist/host/index.d.ts.map +1 -1
- package/dist/host/index.js +4 -1
- package/dist/host/index.js.map +1 -1
- package/dist/host/temporal/temporalService.d.ts +67 -0
- package/dist/host/temporal/temporalService.d.ts.map +1 -0
- package/dist/host/temporal/temporalService.js +1182 -0
- package/dist/host/temporal/temporalService.js.map +1 -0
- package/dist/host/temporal/types.d.ts +13 -0
- package/dist/host/temporal/types.d.ts.map +1 -0
- package/dist/host/temporal/types.js +5 -0
- package/dist/host/temporal/types.js.map +1 -0
- package/dist/scenario-runner/adapters/connection-config.d.ts +17 -1
- package/dist/scenario-runner/adapters/connection-config.d.ts.map +1 -1
- package/dist/scenario-runner/adapters/index.d.ts +4 -2
- package/dist/scenario-runner/adapters/index.d.ts.map +1 -1
- package/dist/scenario-runner/adapters/index.js +8 -0
- package/dist/scenario-runner/adapters/index.js.map +1 -1
- package/dist/scenario-runner/adapters/kafka-executor.d.ts +5 -0
- package/dist/scenario-runner/adapters/kafka-executor.d.ts.map +1 -1
- package/dist/scenario-runner/adapters/kafka-executor.js +12 -3
- package/dist/scenario-runner/adapters/kafka-executor.js.map +1 -1
- package/dist/scenario-runner/adapters/temporal-executor.d.ts +10 -0
- package/dist/scenario-runner/adapters/temporal-executor.d.ts.map +1 -0
- package/dist/scenario-runner/adapters/temporal-executor.js +186 -0
- package/dist/scenario-runner/adapters/temporal-executor.js.map +1 -0
- package/dist/scenario-runner/adapters/types.d.ts +17 -5
- package/dist/scenario-runner/adapters/types.d.ts.map +1 -1
- package/dist/scenario-runner/condition.d.ts.map +1 -1
- package/dist/scenario-runner/condition.js +73 -0
- package/dist/scenario-runner/condition.js.map +1 -1
- package/dist/scenario-runner/graphTraversal.d.ts +6 -0
- package/dist/scenario-runner/graphTraversal.d.ts.map +1 -1
- package/dist/scenario-runner/graphTraversal.js +9 -0
- package/dist/scenario-runner/graphTraversal.js.map +1 -1
- package/dist/scenario-runner/index.d.ts +4 -0
- package/dist/scenario-runner/index.d.ts.map +1 -1
- package/dist/scenario-runner/index.js +8 -0
- package/dist/scenario-runner/index.js.map +1 -1
- package/dist/scenario-runner/kafkaEvent.d.ts +3 -0
- package/dist/scenario-runner/kafkaEvent.d.ts.map +1 -0
- package/dist/scenario-runner/kafkaEvent.js +18 -0
- package/dist/scenario-runner/kafkaEvent.js.map +1 -0
- package/dist/scenario-runner/nodePolicy.d.ts +9 -2
- package/dist/scenario-runner/nodePolicy.d.ts.map +1 -1
- package/dist/scenario-runner/nodePolicy.js +53 -0
- package/dist/scenario-runner/nodePolicy.js.map +1 -1
- package/dist/scenario-runner/runScenario.d.ts.map +1 -1
- package/dist/scenario-runner/runScenario.js +115 -22
- package/dist/scenario-runner/runScenario.js.map +1 -1
- package/dist/scenario-runner/scenarioReference.d.ts +45 -0
- package/dist/scenario-runner/scenarioReference.d.ts.map +1 -0
- package/dist/scenario-runner/scenarioReference.js +151 -0
- package/dist/scenario-runner/scenarioReference.js.map +1 -0
- package/dist/scenario-runner/temporal.d.ts +73 -0
- package/dist/scenario-runner/temporal.d.ts.map +1 -0
- package/dist/scenario-runner/temporal.js +377 -0
- package/dist/scenario-runner/temporal.js.map +1 -0
- package/dist/scenario-runner/types.d.ts +211 -4
- package/dist/scenario-runner/types.d.ts.map +1 -1
- package/dist/ui-test/commands.d.ts.map +1 -1
- package/dist/ui-test/commands.js +71 -0
- package/dist/ui-test/commands.js.map +1 -1
- package/dist-cjs/ai/prompts/scenario.js +6 -3
- package/dist-cjs/ai/prompts/scenario.js.map +1 -1
- package/dist-cjs/ai/prompts/scenarioNodeDefaults.js +9 -0
- package/dist-cjs/ai/prompts/scenarioNodeDefaults.js.map +1 -1
- package/dist-cjs/ai/prompts/scenarioNodeReference.js +135 -16
- package/dist-cjs/ai/prompts/scenarioNodeReference.js.map +1 -1
- package/dist-cjs/host/db/db-query-reference.js +1 -1
- package/dist-cjs/host/db/db-query-reference.js.map +1 -1
- package/dist-cjs/host/db/mongoAdapter.js +23 -1
- package/dist-cjs/host/db/mongoAdapter.js.map +1 -1
- package/dist-cjs/host/db/queryExecutor.js +1 -1
- package/dist-cjs/host/db/queryExecutor.js.map +1 -1
- package/dist-cjs/host/index.js +21 -2
- package/dist-cjs/host/index.js.map +1 -1
- package/dist-cjs/host/temporal/temporalService.js +1200 -0
- package/dist-cjs/host/temporal/temporalService.js.map +1 -0
- package/dist-cjs/host/temporal/types.js +6 -0
- package/dist-cjs/host/temporal/types.js.map +1 -0
- package/dist-cjs/scenario-runner/adapters/index.js +17 -3
- package/dist-cjs/scenario-runner/adapters/index.js.map +1 -1
- package/dist-cjs/scenario-runner/adapters/kafka-executor.js +15 -4
- package/dist-cjs/scenario-runner/adapters/kafka-executor.js.map +1 -1
- package/dist-cjs/scenario-runner/adapters/temporal-executor.js +190 -0
- package/dist-cjs/scenario-runner/adapters/temporal-executor.js.map +1 -0
- package/dist-cjs/scenario-runner/condition.js +73 -0
- package/dist-cjs/scenario-runner/condition.js.map +1 -1
- package/dist-cjs/scenario-runner/graphTraversal.js +10 -1
- package/dist-cjs/scenario-runner/graphTraversal.js.map +1 -1
- package/dist-cjs/scenario-runner/index.js +24 -1
- package/dist-cjs/scenario-runner/index.js.map +1 -1
- package/dist-cjs/scenario-runner/kafkaEvent.js +22 -0
- package/dist-cjs/scenario-runner/kafkaEvent.js.map +1 -0
- package/dist-cjs/scenario-runner/nodePolicy.js +56 -1
- package/dist-cjs/scenario-runner/nodePolicy.js.map +1 -1
- package/dist-cjs/scenario-runner/runScenario.js +114 -21
- package/dist-cjs/scenario-runner/runScenario.js.map +1 -1
- package/dist-cjs/scenario-runner/scenarioReference.js +159 -0
- package/dist-cjs/scenario-runner/scenarioReference.js.map +1 -0
- package/dist-cjs/scenario-runner/temporal.js +386 -0
- package/dist-cjs/scenario-runner/temporal.js.map +1 -0
- package/dist-cjs/ui-test/commands.js +71 -0
- package/dist-cjs/ui-test/commands.js.map +1 -1
- package/package.json +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nodePolicy.js","sourceRoot":"","sources":["../../src/scenario-runner/nodePolicy.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"nodePolicy.js","sourceRoot":"","sources":["../../src/scenario-runner/nodePolicy.ts"],"names":[],"mappings":";;;AAuBa,QAAA,qCAAqC,GAAgC;IAChF,SAAS,EAAE,MAAM;IACjB,KAAK,EAAE;QACL,OAAO,EAAE,KAAK;QACd,WAAW,EAAE,CAAC;QACd,OAAO,EAAE,CAAC;KACX;CACF,CAAC;AAEF,MAAM,mCAAmC,GAGrC;IACF,OAAO,EAAE,6CAAqC;IAC9C,EAAE,EAAE,6CAAqC;IACzC,IAAI,EAAE,6CAAqC;IAC3C,MAAM,EAAE,6CAAqC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;AAChB,CAAC,CAAC;AArBW,QAAA,2BAA2B,+BAqBtC;AAEK,MAAM,gCAAgC,GAAG,CAiB9C,IAAW,EACX,eAA4C,EACrC,EAAE,CAAC,CAAC;IACX,GAAG,IAAI;IACP,IAAI,EAAE;QACJ,GAAG,IAAI,CAAC,IAAI;QACZ,MAAM,EAAE;YACN,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM;YACnB,eAAe,EAAE,IAAA,4CAAoC,EAAC,eAAe,CAAC;SACvE;KACF;CACF,CAAC,CAAC;AA5BU,QAAA,gCAAgC,oCA4B1C"}
|
|
@@ -9,6 +9,7 @@ const graphTraversal_js_1 = require("./graphTraversal.js");
|
|
|
9
9
|
const websocket_js_1 = require("./websocket.js");
|
|
10
10
|
const executionPolicyRunner_js_1 = require("./executionPolicyRunner.js");
|
|
11
11
|
const boundSnapshot_js_1 = require("./boundSnapshot.js");
|
|
12
|
+
const kafkaEvent_js_1 = require("./kafkaEvent.js");
|
|
12
13
|
const nodePolicy_js_1 = require("./nodePolicy.js");
|
|
13
14
|
const templateResolver_js_1 = require("./templateResolver.js");
|
|
14
15
|
const waitNodeExecutor_js_1 = require("./waitNodeExecutor.js");
|
|
@@ -25,6 +26,11 @@ class ScenarioNodeFailureError extends Error {
|
|
|
25
26
|
this.name = "ScenarioNodeFailureError";
|
|
26
27
|
}
|
|
27
28
|
}
|
|
29
|
+
// An attempt that succeeded although the node's policy expects a failure.
|
|
30
|
+
// Kept apart from ordinary failures so it is never mistaken for the
|
|
31
|
+
// expected one.
|
|
32
|
+
class ScenarioExpectedFailureNotMetError extends ScenarioNodeFailureError {
|
|
33
|
+
}
|
|
28
34
|
const DEFAULT_MIN_NODE_VISUAL_STATE_MS = 180;
|
|
29
35
|
const createId = (prefix) => {
|
|
30
36
|
const randomUuid = globalThis.crypto?.randomUUID?.();
|
|
@@ -125,24 +131,6 @@ const createContextSnapshot = (context, mode = "full") => {
|
|
|
125
131
|
redisResult: bound(context.redisResult),
|
|
126
132
|
};
|
|
127
133
|
};
|
|
128
|
-
const buildKafkaEventValue = (message) => {
|
|
129
|
-
const fallbackValue = {
|
|
130
|
-
value: message.valueJson ?? message.valueText,
|
|
131
|
-
text: message.valueText,
|
|
132
|
-
key: message.key,
|
|
133
|
-
partition: message.partition,
|
|
134
|
-
offset: message.offset,
|
|
135
|
-
timestamp: message.timestamp,
|
|
136
|
-
headers: Object.fromEntries(message.headers.map((header) => [header.key, header.value])),
|
|
137
|
-
};
|
|
138
|
-
if (isRecord(message.valueJson)) {
|
|
139
|
-
return {
|
|
140
|
-
...message.valueJson,
|
|
141
|
-
meta: fallbackValue,
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
return fallbackValue;
|
|
145
|
-
};
|
|
146
134
|
const buildKafkaFailureMessage = (result, usedMatch) => {
|
|
147
135
|
if (result.errorMessage?.trim()) {
|
|
148
136
|
return result.errorMessage;
|
|
@@ -334,6 +322,7 @@ const createStepExecutionRecord = ({ stepId, stepType, title, }) => ({
|
|
|
334
322
|
conditionDebug: null,
|
|
335
323
|
activeBranch: null,
|
|
336
324
|
ai: null,
|
|
325
|
+
temporal: null,
|
|
337
326
|
inputData: null,
|
|
338
327
|
resolvedInput: null,
|
|
339
328
|
outputData: null,
|
|
@@ -514,6 +503,7 @@ const updateRecordFromEvent = (records, event) => {
|
|
|
514
503
|
conditionDebug: event.conditionDebug ?? current.conditionDebug,
|
|
515
504
|
activeBranch: event.activeBranch ?? current.activeBranch,
|
|
516
505
|
ai: event.ai ?? current.ai,
|
|
506
|
+
temporal: event.temporal ?? current.temporal,
|
|
517
507
|
inputData: event.inputData ?? current.inputData,
|
|
518
508
|
resolvedInput: event.resolvedInput ?? current.resolvedInput ?? null,
|
|
519
509
|
outputData: event.outputData ?? current.outputData,
|
|
@@ -867,6 +857,16 @@ const runScenario = async ({ scenario, environment = {}, globals = {}, runtimeAd
|
|
|
867
857
|
retry: { enabled: false, maxAttempts: 0, delayMs: 0 },
|
|
868
858
|
};
|
|
869
859
|
}
|
|
860
|
+
// Negative test: this node must fail. On a db node a non-empty
|
|
861
|
+
// expectError is the more precise expectation and wins.
|
|
862
|
+
const dbExpectsError = node.type === "db" &&
|
|
863
|
+
Boolean(node.data.config.expectError?.sqlState?.trim() ||
|
|
864
|
+
node.data.config.expectError?.messagePattern?.trim());
|
|
865
|
+
const expectedFailure = executionPolicy.expectFailure &&
|
|
866
|
+
(0, nodePolicy_js_1.supportsScenarioNodeExpectedFailure)(node.type) &&
|
|
867
|
+
!dbExpectsError
|
|
868
|
+
? executionPolicy.expectFailure
|
|
869
|
+
: undefined;
|
|
870
870
|
const executionStartedAtMs = Date.now();
|
|
871
871
|
let inputData = createInputSnapshot(runtimeContext);
|
|
872
872
|
// The node's OWN resolved input (query + params, topic + payload, the
|
|
@@ -900,6 +900,7 @@ const runScenario = async ({ scenario, environment = {}, globals = {}, runtimeAd
|
|
|
900
900
|
let shouldMarkPartialSuccess = false;
|
|
901
901
|
let workflowOutput = undefined;
|
|
902
902
|
let aiDetails = null;
|
|
903
|
+
let temporalDetails = null;
|
|
903
904
|
const resetAttemptArtifacts = () => {
|
|
904
905
|
statusCode = null;
|
|
905
906
|
response = null;
|
|
@@ -927,6 +928,7 @@ const runScenario = async ({ scenario, environment = {}, globals = {}, runtimeAd
|
|
|
927
928
|
shouldMarkPartialSuccess = false;
|
|
928
929
|
workflowOutput = undefined;
|
|
929
930
|
aiDetails = null;
|
|
931
|
+
temporalDetails = null;
|
|
930
932
|
};
|
|
931
933
|
const executeNodeAttempt = async (attempt, maxAttempts) => {
|
|
932
934
|
throwIfStopped(signal);
|
|
@@ -1143,6 +1145,10 @@ const runScenario = async ({ scenario, environment = {}, globals = {}, runtimeAd
|
|
|
1143
1145
|
: null;
|
|
1144
1146
|
// Thinned emission keeps stored events bounded (~100 tick events).
|
|
1145
1147
|
const pollEmitStride = Math.max(1, Math.ceil(pollMaxAttempts / 100));
|
|
1148
|
+
// Temporal ticks have no runtime-context slot (unlike response /
|
|
1149
|
+
// db / redis), so the last tick's output rides along on the poll
|
|
1150
|
+
// output as `<Label>.temporal`.
|
|
1151
|
+
let lastTemporalTickOutput = null;
|
|
1146
1152
|
resolvedInput = {
|
|
1147
1153
|
actionType: pollConfig.actionType,
|
|
1148
1154
|
intervalMs: pollBaseIntervalMs,
|
|
@@ -1248,6 +1254,39 @@ const runScenario = async ({ scenario, environment = {}, globals = {}, runtimeAd
|
|
|
1248
1254
|
runtimeContext.redisResult = tickResult.redisResult;
|
|
1249
1255
|
return tickResult.failureMessage ?? null;
|
|
1250
1256
|
}
|
|
1257
|
+
if (pollConfig.actionType === "temporal") {
|
|
1258
|
+
if (!pollConfig.temporal) {
|
|
1259
|
+
throw new ScenarioNodeFailureError("Poll node has no Temporal configuration.");
|
|
1260
|
+
}
|
|
1261
|
+
if (!runtimeAdapters.temporalExecutor) {
|
|
1262
|
+
throw new ScenarioNodeFailureError("This host does not support Temporal nodes yet.");
|
|
1263
|
+
}
|
|
1264
|
+
const tickResult = await runtimeAdapters.temporalExecutor({
|
|
1265
|
+
runId,
|
|
1266
|
+
stepId,
|
|
1267
|
+
node: {
|
|
1268
|
+
id: node.id,
|
|
1269
|
+
type: "temporal",
|
|
1270
|
+
position: node.position,
|
|
1271
|
+
data: { label: node.data.label, config: pollConfig.temporal },
|
|
1272
|
+
},
|
|
1273
|
+
context: snapshotContext(),
|
|
1274
|
+
signal,
|
|
1275
|
+
});
|
|
1276
|
+
temporalDetails = tickResult.details;
|
|
1277
|
+
assertionResults = tickResult.assertionResults;
|
|
1278
|
+
assertionSummary = tickResult.assertionSummary;
|
|
1279
|
+
lastTemporalTickOutput = tickResult.outputData;
|
|
1280
|
+
// Publish the tick's output under the label so the success
|
|
1281
|
+
// condition reads `<Label>.status` / `<Label>.result.x` exactly
|
|
1282
|
+
// like it would after a standalone temporal node.
|
|
1283
|
+
if (tickResult.outputData &&
|
|
1284
|
+
nodeLabel &&
|
|
1285
|
+
!RESERVED_WORKFLOW_ROOT_LABELS.has(nodeLabel)) {
|
|
1286
|
+
runtimeContext.workflowContext[nodeLabel] = tickResult.outputData;
|
|
1287
|
+
}
|
|
1288
|
+
return tickResult.failureMessage ?? null;
|
|
1289
|
+
}
|
|
1251
1290
|
if (!pollConfig.script) {
|
|
1252
1291
|
throw new ScenarioNodeFailureError("Poll node has no script configuration.");
|
|
1253
1292
|
}
|
|
@@ -1344,6 +1383,9 @@ const runScenario = async ({ scenario, environment = {}, globals = {}, runtimeAd
|
|
|
1344
1383
|
timedOut: !pollPassed,
|
|
1345
1384
|
conditionResult: pollPassed,
|
|
1346
1385
|
...(lastTickError ? { lastTickError } : {}),
|
|
1386
|
+
...(pollConfig.actionType === "temporal" && lastTemporalTickOutput
|
|
1387
|
+
? { temporal: lastTemporalTickOutput }
|
|
1388
|
+
: {}),
|
|
1347
1389
|
};
|
|
1348
1390
|
if (!pollPassed) {
|
|
1349
1391
|
if ((pollConfig.onTimeout ?? "fail") === "continue") {
|
|
@@ -1515,7 +1557,7 @@ const runScenario = async ({ scenario, environment = {}, globals = {}, runtimeAd
|
|
|
1515
1557
|
if (resolvedMatchMode === "rules" && rules.length > 0) {
|
|
1516
1558
|
matchedMessage =
|
|
1517
1559
|
captureResult.messages.find((message) => {
|
|
1518
|
-
const kafkaEventValue =
|
|
1560
|
+
const kafkaEventValue = (0, kafkaEvent_js_1.buildScenarioKafkaEventValue)(message, captureResult.topic);
|
|
1519
1561
|
const scopedValues = (0, templateResolver_js_1.buildScenarioTemplateValues)({
|
|
1520
1562
|
environment: runtimeContext.environment,
|
|
1521
1563
|
globals: runtimeContext.globals,
|
|
@@ -1534,7 +1576,7 @@ const runScenario = async ({ scenario, environment = {}, globals = {}, runtimeAd
|
|
|
1534
1576
|
throw new ScenarioNodeFailureError(buildKafkaFailureMessage(captureResult, Boolean(rules.length)));
|
|
1535
1577
|
}
|
|
1536
1578
|
runtimeContext.kafkaCapture = captureResult;
|
|
1537
|
-
runtimeContext.kafkaEvent =
|
|
1579
|
+
runtimeContext.kafkaEvent = (0, kafkaEvent_js_1.buildScenarioKafkaEventValue)(matchedMessage, captureResult.topic);
|
|
1538
1580
|
outputData = runtimeContext.kafkaEvent;
|
|
1539
1581
|
}
|
|
1540
1582
|
}
|
|
@@ -1730,6 +1772,35 @@ const runScenario = async ({ scenario, environment = {}, globals = {}, runtimeAd
|
|
|
1730
1772
|
throw new ScenarioNodeFailureError(aiResult.failureMessage);
|
|
1731
1773
|
}
|
|
1732
1774
|
}
|
|
1775
|
+
if (node.type === "temporal") {
|
|
1776
|
+
// Thin dispatch (ai pattern): the adapter resolves templates,
|
|
1777
|
+
// validates the operation, calls the host driver and evaluates the
|
|
1778
|
+
// node's own `expect` rules. A FAILED workflow is data (status +
|
|
1779
|
+
// failure in the output); only infrastructure errors and failed
|
|
1780
|
+
// expectations fail the node.
|
|
1781
|
+
if (!runtimeAdapters.temporalExecutor) {
|
|
1782
|
+
throw new ScenarioNodeFailureError("This host does not support Temporal nodes yet.");
|
|
1783
|
+
}
|
|
1784
|
+
const temporalResult = await runtimeAdapters.temporalExecutor({
|
|
1785
|
+
runId,
|
|
1786
|
+
stepId,
|
|
1787
|
+
node,
|
|
1788
|
+
context: snapshotContext(),
|
|
1789
|
+
signal,
|
|
1790
|
+
});
|
|
1791
|
+
throwIfStopped(signal);
|
|
1792
|
+
temporalDetails = temporalResult.details;
|
|
1793
|
+
outputData = temporalResult.outputData;
|
|
1794
|
+
resolvedInput = temporalResult.resolvedInput;
|
|
1795
|
+
assertionResults = temporalResult.assertionResults;
|
|
1796
|
+
assertionSummary = temporalResult.assertionSummary;
|
|
1797
|
+
if (temporalResult.degraded) {
|
|
1798
|
+
shouldMarkPartialSuccess = true;
|
|
1799
|
+
}
|
|
1800
|
+
if (temporalResult.failureMessage) {
|
|
1801
|
+
throw new ScenarioNodeFailureError(temporalResult.failureMessage);
|
|
1802
|
+
}
|
|
1803
|
+
}
|
|
1733
1804
|
if (node.type === "condition") {
|
|
1734
1805
|
const conditionIssues = (0, condition_js_1.validateConditionConfig)(node.data.config);
|
|
1735
1806
|
const blockingConditionIssue = conditionIssues.find((issue) => issue.severity === "error");
|
|
@@ -2228,15 +2299,34 @@ const runScenario = async ({ scenario, environment = {}, globals = {}, runtimeAd
|
|
|
2228
2299
|
runtimeContext.workflowContext[nodeLabel] = workflowOutput;
|
|
2229
2300
|
}
|
|
2230
2301
|
await ensureMinimumVisualDuration(attemptStartedAtMs);
|
|
2302
|
+
if (expectedFailure) {
|
|
2303
|
+
throw new ScenarioExpectedFailureNotMetError(`Expected this node to fail${expectedFailure.messagePattern
|
|
2304
|
+
? ` with an error matching /${expectedFailure.messagePattern}/`
|
|
2305
|
+
: ""}, but it succeeded.`);
|
|
2306
|
+
}
|
|
2231
2307
|
}
|
|
2232
2308
|
catch (error) {
|
|
2233
2309
|
if (error instanceof ScenarioStopError) {
|
|
2234
2310
|
throw error;
|
|
2235
2311
|
}
|
|
2236
2312
|
await ensureMinimumVisualDuration(attemptStartedAtMs);
|
|
2237
|
-
|
|
2313
|
+
const failure = error instanceof ScenarioNodeFailureError
|
|
2238
2314
|
? error
|
|
2239
2315
|
: new ScenarioNodeFailureError(error instanceof Error ? error.message : "Scenario node failed");
|
|
2316
|
+
if (expectedFailure && !(failure instanceof ScenarioExpectedFailureNotMetError)) {
|
|
2317
|
+
const match = (0, nodePolicy_js_1.matchScenarioExpectedFailure)(expectedFailure, failure.message);
|
|
2318
|
+
if (!match.matched) {
|
|
2319
|
+
throw new ScenarioNodeFailureError(`The node failed, but not as expected (${match.mismatchReason}): ${failure.message}`);
|
|
2320
|
+
}
|
|
2321
|
+
// The failure IS the result: the node succeeds and exposes it.
|
|
2322
|
+
outputData = { expectedFailure: { message: failure.message } };
|
|
2323
|
+
workflowOutput = outputData;
|
|
2324
|
+
if (nodeLabel && !RESERVED_WORKFLOW_ROOT_LABELS.has(nodeLabel)) {
|
|
2325
|
+
runtimeContext.workflowContext[nodeLabel] = workflowOutput;
|
|
2326
|
+
}
|
|
2327
|
+
return;
|
|
2328
|
+
}
|
|
2329
|
+
throw failure;
|
|
2240
2330
|
}
|
|
2241
2331
|
};
|
|
2242
2332
|
try {
|
|
@@ -2351,6 +2441,7 @@ const runScenario = async ({ scenario, environment = {}, globals = {}, runtimeAd
|
|
|
2351
2441
|
conditionDebug,
|
|
2352
2442
|
activeBranch,
|
|
2353
2443
|
ai: aiDetails,
|
|
2444
|
+
temporal: temporalDetails,
|
|
2354
2445
|
inputData,
|
|
2355
2446
|
resolvedInput: resolvedInputForEvent(),
|
|
2356
2447
|
outputData,
|
|
@@ -2435,6 +2526,7 @@ const runScenario = async ({ scenario, environment = {}, globals = {}, runtimeAd
|
|
|
2435
2526
|
conditionDebug,
|
|
2436
2527
|
activeBranch,
|
|
2437
2528
|
ai: aiDetails,
|
|
2529
|
+
temporal: temporalDetails,
|
|
2438
2530
|
inputData,
|
|
2439
2531
|
resolvedInput: resolvedInputForEvent(),
|
|
2440
2532
|
outputData,
|
|
@@ -2514,6 +2606,7 @@ const runScenario = async ({ scenario, environment = {}, globals = {}, runtimeAd
|
|
|
2514
2606
|
conditionDebug,
|
|
2515
2607
|
activeBranch,
|
|
2516
2608
|
ai: aiDetails,
|
|
2609
|
+
temporal: temporalDetails,
|
|
2517
2610
|
inputData,
|
|
2518
2611
|
resolvedInput: resolvedInputForEvent(),
|
|
2519
2612
|
outputData,
|