@memberjunction/task-graph 6.1.0-edge.1 → 6.1.0-edge.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/LICENSE +180 -4
- package/README.md +214 -0
- package/dist/TaskClaimStore.d.ts +387 -4
- package/dist/TaskClaimStore.d.ts.map +1 -1
- package/dist/TaskClaimStore.js +605 -20
- package/dist/TaskClaimStore.js.map +1 -1
- package/dist/TaskGraphDispatcher.d.ts +668 -5
- package/dist/TaskGraphDispatcher.d.ts.map +1 -1
- package/dist/TaskGraphDispatcher.js +2942 -127
- package/dist/TaskGraphDispatcher.js.map +1 -1
- package/dist/TaskGraphService.d.ts +364 -5
- package/dist/TaskGraphService.d.ts.map +1 -1
- package/dist/TaskGraphService.js +1039 -43
- package/dist/TaskGraphService.js.map +1 -1
- package/dist/TaskGraphSubmitterImpl.d.ts.map +1 -1
- package/dist/TaskGraphSubmitterImpl.js +5 -0
- package/dist/TaskGraphSubmitterImpl.js.map +1 -1
- package/dist/TaskLoopExecutor.d.ts +62 -0
- package/dist/TaskLoopExecutor.d.ts.map +1 -0
- package/dist/TaskLoopExecutor.js +248 -0
- package/dist/TaskLoopExecutor.js.map +1 -0
- package/dist/WorkflowSpecSync.d.ts +28 -2
- package/dist/WorkflowSpecSync.d.ts.map +1 -1
- package/dist/WorkflowSpecSync.js +83 -2
- package/dist/WorkflowSpecSync.js.map +1 -1
- package/dist/condition-gate.d.ts +128 -0
- package/dist/condition-gate.d.ts.map +1 -0
- package/dist/condition-gate.js +257 -0
- package/dist/condition-gate.js.map +1 -0
- package/dist/debug-state.d.ts +102 -0
- package/dist/debug-state.d.ts.map +1 -0
- package/dist/debug-state.js +135 -0
- package/dist/debug-state.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/operations/TaskGraphDebugOperations.d.ts +99 -0
- package/dist/operations/TaskGraphDebugOperations.d.ts.map +1 -0
- package/dist/operations/TaskGraphDebugOperations.js +310 -0
- package/dist/operations/TaskGraphDebugOperations.js.map +1 -0
- package/dist/operations/TaskGraphOperations.d.ts +20 -2
- package/dist/operations/TaskGraphOperations.d.ts.map +1 -1
- package/dist/operations/TaskGraphOperations.js +51 -8
- package/dist/operations/TaskGraphOperations.js.map +1 -1
- package/dist/operations/WorkflowDraftOperation.d.ts +37 -0
- package/dist/operations/WorkflowDraftOperation.d.ts.map +1 -0
- package/dist/operations/WorkflowDraftOperation.js +141 -0
- package/dist/operations/WorkflowDraftOperation.js.map +1 -0
- package/dist/settlement-rescue.d.ts +85 -0
- package/dist/settlement-rescue.d.ts.map +1 -0
- package/dist/settlement-rescue.js +119 -0
- package/dist/settlement-rescue.js.map +1 -0
- package/dist/task-graph-kick.d.ts +3 -0
- package/dist/task-graph-kick.d.ts.map +1 -0
- package/dist/task-graph-kick.js +17 -0
- package/dist/task-graph-kick.js.map +1 -0
- package/dist/task-predicates.d.ts +77 -0
- package/dist/task-predicates.d.ts.map +1 -0
- package/dist/task-predicates.js +75 -0
- package/dist/task-predicates.js.map +1 -0
- package/dist/types.d.ts +224 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +12 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkflowSpecSync.js","sourceRoot":"","sources":["../src/WorkflowSpecSync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAAqB,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAY,MAAM,sBAAsB,CAAC;AACjG,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAWnE,OAAO,EACH,8BAA8B,EAC9B,uBAAuB,EACvB,iBAAiB,EACjB,oBAAoB,GAIvB,MAAM,8BAA8B,CAAC;AAEtC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,OA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C,EAAE,CAAC;QAC1E,CAAC;QAED,GAAG,CAAC,SAAS,GAAG,MAAM,CAAC;QACvB,GAAG,CAAC,IAAI,GAAG,aAAa,IAAI,CAAC,IAAI,EAAE,CAAC;QACpC,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC;QAC3C,GAAG,CAAC,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;QAClC,GAAG,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,IAAI,CAAC;QACxC,GAAG,CAAC,aAAa,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,kBAAkB,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;QACxF,2FAA2F;QAC3F,gGAAgG;QAChG,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC;QAE9D,IAAI,IAAI,CAAC,aAAa,EAAE,CAAC;YACrB,GAAG,CAAC,eAAe,GAAG,IAAI,CAAC;YAC3B,GAAG,CAAC,eAAe,GAAG,IAAI,CAAC,aAAa,CAAC,SAAS,KAAK,QAAQ,CAAC;QACpE,CAAC;QAED,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC;YACtB,MAAM,IAAI,KAAK,CACX,6CAA6C,IAAI,CAAC,IAAI,MAAM,GAAG,CAAC,YAAY,EAAE,eAAe,IAAI,eAAe,EAAE,CACrH,CAAC;QACN,CAAC;QACD,OAAO,GAAG,CAAC,EAAE,CAAC;IAClB,CAAC;CACJ"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a conditional edge means, decided without touching the database.
|
|
3
|
+
*
|
|
4
|
+
* An edge condition is the only place in the engine where a *guess* becomes an irreversible act: a
|
|
5
|
+
* dropped edge blocks or skips its target, and neither is taken back. Two of the three bugs P2 fixed
|
|
6
|
+
* were misreadings here, and both were silent —
|
|
7
|
+
*
|
|
8
|
+
* - a condition evaluated while its origin was still `Pending` read as a definite FALSE, so every
|
|
9
|
+
* conditioned linear chain blocked at wave one, before the origin ever ran;
|
|
10
|
+
* - a condition that FAILED to evaluate (a typo, a TypeError) also read as... satisfied, because
|
|
11
|
+
* the failure path returned 'keep' — and a kept edge from a finished origin is an open gate. A
|
|
12
|
+
* broken guard therefore executed the work it was guarding.
|
|
13
|
+
*
|
|
14
|
+
* Both are decisions, not I/O, which is why they live here: a fake `RunView` and a fake entity would
|
|
15
|
+
* only prove the mocks agree with themselves. The dispatcher keeps the loading and the logging.
|
|
16
|
+
*
|
|
17
|
+
* @module @memberjunction/task-graph
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* What to do with a gating edge whose condition has been considered.
|
|
21
|
+
*
|
|
22
|
+
* Three outcomes, not two, because "false" and "cannot tell" must not share a branch. Dropping on
|
|
23
|
+
* "cannot tell" lets the target be skipped as unreachable — turning *we do not know* into
|
|
24
|
+
* *definitely not taken* — while keeping on "cannot tell" opens the gate. Holding is the only
|
|
25
|
+
* reading that costs nothing but time, and time is recoverable.
|
|
26
|
+
*/
|
|
27
|
+
export type GateOutcome = 'keep' | 'drop' | 'hold';
|
|
28
|
+
/**
|
|
29
|
+
* How a failure propagates in a graph — the spec's `failureSemantics`, restated here so this module
|
|
30
|
+
* stays free of entity imports.
|
|
31
|
+
*
|
|
32
|
+
* `'block'` (the default) means a failure is terminal for everything downstream. `'edges'` means a
|
|
33
|
+
* flow's failure handling IS its outgoing edges, so a failed step's drawn recovery path runs.
|
|
34
|
+
*/
|
|
35
|
+
export type FailureSemantics = 'block' | 'edges';
|
|
36
|
+
/** The evaluator's answer, in the shape `IConditionEvaluator` returns. */
|
|
37
|
+
export type ConditionVerdict = {
|
|
38
|
+
Success: boolean;
|
|
39
|
+
Value?: unknown;
|
|
40
|
+
ErrorMessage?: string;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* The invocation's contribution to the condition envelope — the flow dialect's `data`/`context`.
|
|
44
|
+
*
|
|
45
|
+
* Separate from the origin's output on purpose: `payload`, `output` and `stepResult` describe what
|
|
46
|
+
* the previous STEP produced, while these describe how the workflow was INVOKED. They travel with
|
|
47
|
+
* the graph on its parent's metadata bag because the instance evaluating a condition is routinely
|
|
48
|
+
* not the process that accepted the graph.
|
|
49
|
+
*/
|
|
50
|
+
export type ConditionInvocation = {
|
|
51
|
+
Data?: unknown;
|
|
52
|
+
Context?: unknown;
|
|
53
|
+
};
|
|
54
|
+
/** The origin fields a condition can see. Structural, so `MJTaskEntity` satisfies it as-is. */
|
|
55
|
+
export type ConditionOrigin = {
|
|
56
|
+
ID: string;
|
|
57
|
+
Name: string;
|
|
58
|
+
Status: string;
|
|
59
|
+
ErrorMessage: string | null;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Statuses at which an origin's outgoing conditions may be decided.
|
|
63
|
+
*
|
|
64
|
+
* `Skipped` is included: a branch that was not taken IS settled, and a condition on an edge leaving
|
|
65
|
+
* it should resolve rather than hang the graph forever.
|
|
66
|
+
*/
|
|
67
|
+
export declare const TERMINAL_FOR_CONDITIONS: ReadonlySet<string>;
|
|
68
|
+
/** A malformed `OutputPayload` is not grounds to drop a prerequisite — it reads as no output. */
|
|
69
|
+
export declare function ParseConditionOutput(payload: string | null | undefined): unknown;
|
|
70
|
+
/**
|
|
71
|
+
* Everything an edge condition can see — the SUPERSET of both dialects.
|
|
72
|
+
*
|
|
73
|
+
* A flow condition is written against `payload` / `stepResult` / `flowContext` / `data` / `context`;
|
|
74
|
+
* the dispatcher's own conditions are written against `status` / `succeeded` / `failed` / `output` /
|
|
75
|
+
* `errorMessage`. Compiling flows onto this engine without the flow dialect would make every
|
|
76
|
+
* `payload.x` condition evaluate against nothing — silently, since an undefined property is simply
|
|
77
|
+
* falsy. Both dialects are readable here so a condition means the same thing on either engine.
|
|
78
|
+
*
|
|
79
|
+
* `payload` is the ORIGIN task's post-step snapshot. There is deliberately no "graph-wide payload":
|
|
80
|
+
* each task's output is its own, and inventing a merged one would give conditions a value the flow
|
|
81
|
+
* engine never had.
|
|
82
|
+
*/
|
|
83
|
+
export declare function BuildConditionContext(origin: ConditionOrigin, output: unknown, invocation?: ConditionInvocation): Record<string, unknown>;
|
|
84
|
+
/**
|
|
85
|
+
* Decides a gating edge, given a way to evaluate its condition.
|
|
86
|
+
*
|
|
87
|
+
* `evaluate` is a thunk rather than a value because the terminality guard has to prevent the
|
|
88
|
+
* evaluation from happening at all, not merely discard its answer. Evaluating `succeeded` against a
|
|
89
|
+
* still-`Pending` origin does not fail — it returns a confident, wrong `false`, which is exactly how
|
|
90
|
+
* the original bug produced blocked graphs with no error anywhere. Passing the thunk lets a caller
|
|
91
|
+
* (and a test) observe that an undecided origin is never asked.
|
|
92
|
+
*
|
|
93
|
+
* @param originStatus the origin task's status right now
|
|
94
|
+
* @param evaluate runs the condition; only called once the origin can decide it
|
|
95
|
+
*/
|
|
96
|
+
export declare function DecideGate(originStatus: string, failureSemantics: FailureSemantics, evaluate: () => ConditionVerdict): GateOutcome;
|
|
97
|
+
/**
|
|
98
|
+
* Whether an evaluation failure means the data was absent rather than the guard broken.
|
|
99
|
+
*
|
|
100
|
+
* Exported because the boundary is the fix, and a boundary that cannot be tested directly is a
|
|
101
|
+
* boundary nobody will notice moving.
|
|
102
|
+
*/
|
|
103
|
+
export declare function IsDataAbsence(errorMessage: string | undefined): boolean;
|
|
104
|
+
/**
|
|
105
|
+
* Whether an evaluation failure is a BROKEN GUARD rather than absent data.
|
|
106
|
+
*
|
|
107
|
+
* **This is the structural half of R3-6, and it is the one that matters.** Enumerating V8 message
|
|
108
|
+
* strings closes today's holes and leaves tomorrow's open: `'in'` and `Object` were both blessed at
|
|
109
|
+
* the door while their absence messages went unmatched, and each miss is a permanent silent stall on
|
|
110
|
+
* a terminal origin whose output can never change.
|
|
111
|
+
*
|
|
112
|
+
* Since the null-safe envelope guarantees every declared ROOT resolves, a `ReferenceError` is the
|
|
113
|
+
* only failure that can mean "this guard names something that does not exist" — everything else is
|
|
114
|
+
* the expression tripping over data that is not there, whatever operator it tripped over. So the
|
|
115
|
+
* classification is inverted: name the broken-guard case, and treat the rest as absence. The
|
|
116
|
+
* signature list above is kept as a fast path and as documentation of the shapes seen in the wild.
|
|
117
|
+
*
|
|
118
|
+
* **A POLICY REFUSAL is the second broken-guard shape.** `SafeExpressionEvaluator` refuses a
|
|
119
|
+
* construct outside its allowlist before it ever compiles, so the failure is not the expression
|
|
120
|
+
* meeting absent data — it is a guard this build will never run, on any input. That was nearly
|
|
121
|
+
* unreachable while the screen was a textual denylist that refused almost nothing; an AST allowlist
|
|
122
|
+
* makes it reachable for a graph already stored in the database, and without this signature such a
|
|
123
|
+
* graph would silently REROUTE — `drop`, with `TaskGraphDispatcher` logging a reason only on
|
|
124
|
+
* `hold`. Holding instead is the visible-and-recoverable reading this file argues for everywhere
|
|
125
|
+
* else: an upgrade stalls loudly rather than quietly taking a different path.
|
|
126
|
+
*/
|
|
127
|
+
export declare function IsBrokenGuard(errorMessage: string | undefined): boolean;
|
|
128
|
+
//# sourceMappingURL=condition-gate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"condition-gate.d.ts","sourceRoot":"","sources":["../src/condition-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH;;;;;;;GAOG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAEnD;;;;;;GAMG;AACH,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,OAAO,CAAC;AAEjD,0EAA0E;AAC1E,MAAM,MAAM,gBAAgB,GAAG;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAE5F;;;;;;;GAOG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAC9B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,+FAA+F;AAC/F,MAAM,MAAM,eAAe,GAAG;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,EAAE,WAAW,CAAC,MAAM,CAKtD,CAAC;AAuCH,iGAAiG;AACjG,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAOhF;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,qBAAqB,CACjC,MAAM,EAAE,eAAe,EACvB,MAAM,EAAE,OAAO,EACf,UAAU,GAAE,mBAAwB,GACrC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA8CzB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,UAAU,CACtB,YAAY,EAAE,MAAM,EACpB,gBAAgB,EAAE,gBAAgB,EAClC,QAAQ,EAAE,MAAM,gBAAgB,GACjC,WAAW,CAoEb;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,YAAY,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAGvE;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,aAAa,CAAC,YAAY,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAGvE"}
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a conditional edge means, decided without touching the database.
|
|
3
|
+
*
|
|
4
|
+
* An edge condition is the only place in the engine where a *guess* becomes an irreversible act: a
|
|
5
|
+
* dropped edge blocks or skips its target, and neither is taken back. Two of the three bugs P2 fixed
|
|
6
|
+
* were misreadings here, and both were silent —
|
|
7
|
+
*
|
|
8
|
+
* - a condition evaluated while its origin was still `Pending` read as a definite FALSE, so every
|
|
9
|
+
* conditioned linear chain blocked at wave one, before the origin ever ran;
|
|
10
|
+
* - a condition that FAILED to evaluate (a typo, a TypeError) also read as... satisfied, because
|
|
11
|
+
* the failure path returned 'keep' — and a kept edge from a finished origin is an open gate. A
|
|
12
|
+
* broken guard therefore executed the work it was guarding.
|
|
13
|
+
*
|
|
14
|
+
* Both are decisions, not I/O, which is why they live here: a fake `RunView` and a fake entity would
|
|
15
|
+
* only prove the mocks agree with themselves. The dispatcher keeps the loading and the logging.
|
|
16
|
+
*
|
|
17
|
+
* @module @memberjunction/task-graph
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* Statuses at which an origin's outgoing conditions may be decided.
|
|
21
|
+
*
|
|
22
|
+
* `Skipped` is included: a branch that was not taken IS settled, and a condition on an edge leaving
|
|
23
|
+
* it should resolve rather than hang the graph forever.
|
|
24
|
+
*/
|
|
25
|
+
export const TERMINAL_FOR_CONDITIONS = new Set([
|
|
26
|
+
'Complete',
|
|
27
|
+
'Failed',
|
|
28
|
+
'Cancelled',
|
|
29
|
+
'Skipped',
|
|
30
|
+
]);
|
|
31
|
+
/**
|
|
32
|
+
* Stands in for output a step never produced, so a condition reading through it does not throw.
|
|
33
|
+
*
|
|
34
|
+
* **This is a parity fix, not a convenience.** In the flow engine `payload` is the agent's
|
|
35
|
+
* accumulated payload — an object, always — so `payload.approved` on a step that produced nothing is
|
|
36
|
+
* `undefined`, which is simply falsy, and the flow carries on. The dispatcher mapped a null output
|
|
37
|
+
* to `payload: null`, so the same condition THREW, and every throw became a permanent hold: the
|
|
38
|
+
* origin is terminal, its output is frozen, and the identical evaluation repeats forever.
|
|
39
|
+
*
|
|
40
|
+
* Frozen and shared because it is only ever read. A caller that mutates what a step "returned" is
|
|
41
|
+
* doing something the engine should not quietly permit.
|
|
42
|
+
*/
|
|
43
|
+
const NO_OUTPUT = Object.freeze({});
|
|
44
|
+
/**
|
|
45
|
+
* Error signatures that mean *the data is not there*, as opposed to *the guard is broken*.
|
|
46
|
+
*
|
|
47
|
+
* Matched on message text because `SafeExpressionEvaluator` re-wraps the original error
|
|
48
|
+
* (`'Expression evaluation failed: ' + e.message`), so the class is gone by the time it reaches us
|
|
49
|
+
* and only the sentence survives.
|
|
50
|
+
*
|
|
51
|
+
* The polarity is deliberate: this list decides what is DEMOTED to a false verdict, and everything
|
|
52
|
+
* unmatched stays a hold. An unrecognised failure is then visible and recoverable rather than a
|
|
53
|
+
* silently dropped branch — which is the same reasoning P2 used, applied to a narrower class.
|
|
54
|
+
*/
|
|
55
|
+
const DATA_ABSENCE_SIGNATURES = [
|
|
56
|
+
// Property reads — the original list.
|
|
57
|
+
/cannot read propert(?:y|ies) .* of (?:undefined|null)/i,
|
|
58
|
+
/cannot read propert(?:y|ies) of (?:undefined|null)/i,
|
|
59
|
+
/(?:undefined|null) is not an object/i, // WebKit's phrasing of the same thing
|
|
60
|
+
// R3-6: absence reached through the OTHER operators the door blesses.
|
|
61
|
+
/cannot use '?in'? operator/i, // `'x' in payload.missing`
|
|
62
|
+
/cannot convert undefined or null to object/i, // `Object.keys(payload.missing)`
|
|
63
|
+
/(?:undefined|null) is not iterable/i, // spread / for-of over an absent collection
|
|
64
|
+
/is not a function/i, // `payload.missing.map(...)` — see below
|
|
65
|
+
];
|
|
66
|
+
/** A malformed `OutputPayload` is not grounds to drop a prerequisite — it reads as no output. */
|
|
67
|
+
export function ParseConditionOutput(payload) {
|
|
68
|
+
if (!payload)
|
|
69
|
+
return null;
|
|
70
|
+
try {
|
|
71
|
+
return JSON.parse(payload);
|
|
72
|
+
}
|
|
73
|
+
catch {
|
|
74
|
+
return null;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Everything an edge condition can see — the SUPERSET of both dialects.
|
|
79
|
+
*
|
|
80
|
+
* A flow condition is written against `payload` / `stepResult` / `flowContext` / `data` / `context`;
|
|
81
|
+
* the dispatcher's own conditions are written against `status` / `succeeded` / `failed` / `output` /
|
|
82
|
+
* `errorMessage`. Compiling flows onto this engine without the flow dialect would make every
|
|
83
|
+
* `payload.x` condition evaluate against nothing — silently, since an undefined property is simply
|
|
84
|
+
* falsy. Both dialects are readable here so a condition means the same thing on either engine.
|
|
85
|
+
*
|
|
86
|
+
* `payload` is the ORIGIN task's post-step snapshot. There is deliberately no "graph-wide payload":
|
|
87
|
+
* each task's output is its own, and inventing a merged one would give conditions a value the flow
|
|
88
|
+
* engine never had.
|
|
89
|
+
*/
|
|
90
|
+
export function BuildConditionContext(origin, output, invocation = {}) {
|
|
91
|
+
// The envelope and the spec's declared roots (`CONDITION_ROOTS`, in ai-core-plus) are one
|
|
92
|
+
// contract split across two packages, and the validator refuses conditions on the strength of
|
|
93
|
+
// that list. A key here with no entry there is a root nobody may reference; an entry there with
|
|
94
|
+
// no key here is a root that resolves to nothing at run time. Both are silent, so the two are
|
|
95
|
+
// pinned to each other by test rather than by hope.
|
|
96
|
+
const envelope = (output && typeof output === 'object' ? output : {});
|
|
97
|
+
const succeeded = origin.Status === 'Complete';
|
|
98
|
+
// Every object-shaped root is null-safe; the STATUS roots stay exactly as real as they were.
|
|
99
|
+
// Absence of output is not absence of outcome — a recovery edge reading `failed` or
|
|
100
|
+
// `stepResult.Success` has to keep working on a step that died before producing anything.
|
|
101
|
+
const readable = (value) => value ?? NO_OUTPUT;
|
|
102
|
+
return {
|
|
103
|
+
// dispatcher dialect
|
|
104
|
+
status: origin.Status,
|
|
105
|
+
succeeded,
|
|
106
|
+
failed: origin.Status === 'Failed',
|
|
107
|
+
output: readable(output),
|
|
108
|
+
errorMessage: origin.ErrorMessage ?? null,
|
|
109
|
+
// flow dialect
|
|
110
|
+
payload: readable(envelope.payload ?? output),
|
|
111
|
+
// `step` IS A STATUS WORD, NOT THE STEP'S NAME (R3-3, decided against the walker's actual
|
|
112
|
+
// exposure rather than against the spec's prose). `FlowAgentType` stores
|
|
113
|
+
// `{ Success: true, step: 'Success', result, rawResult }`, and the documented condition
|
|
114
|
+
// `stepResult.step === 'Success'` only means anything under that reading. Putting the
|
|
115
|
+
// origin's name here made that condition false for every step whose name was not literally
|
|
116
|
+
// "Success" — which is all of them. The name is deliberately NOT exposed under another key:
|
|
117
|
+
// the walker did not expose it, and inventing a root is how the two engines drift.
|
|
118
|
+
stepResult: {
|
|
119
|
+
Success: succeeded,
|
|
120
|
+
step: succeeded ? 'Success' : 'Failed',
|
|
121
|
+
result: readable(envelope.result ?? output),
|
|
122
|
+
},
|
|
123
|
+
flowContext: { currentStepId: origin.ID, completedSteps: [], executionPath: [], stepCount: 0 },
|
|
124
|
+
// FROM THE INVOCATION, NOT THE ORIGIN'S OUTPUT (R3-3).
|
|
125
|
+
//
|
|
126
|
+
// These were `envelope.data`/`envelope.context` — keys of the origin STEP's parsed output —
|
|
127
|
+
// which is a different thing entirely from what the dialect documents and what the walker
|
|
128
|
+
// provided. `FlowAgentType.buildConditionContext` sets these from `ExecuteAgentParams`, and
|
|
129
|
+
// `data.userApproval === true` is that class's own documented pattern. A step's output
|
|
130
|
+
// essentially never carries a `data` key, so every such condition resolved `undefined`, read
|
|
131
|
+
// a clean `false`, and silently took the branch the walker would not have — with no throw,
|
|
132
|
+
// no hold, and the validator blessing the condition at the door.
|
|
133
|
+
data: invocation.Data ?? NO_OUTPUT,
|
|
134
|
+
context: invocation.Context ?? NO_OUTPUT,
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Decides a gating edge, given a way to evaluate its condition.
|
|
139
|
+
*
|
|
140
|
+
* `evaluate` is a thunk rather than a value because the terminality guard has to prevent the
|
|
141
|
+
* evaluation from happening at all, not merely discard its answer. Evaluating `succeeded` against a
|
|
142
|
+
* still-`Pending` origin does not fail — it returns a confident, wrong `false`, which is exactly how
|
|
143
|
+
* the original bug produced blocked graphs with no error anywhere. Passing the thunk lets a caller
|
|
144
|
+
* (and a test) observe that an undecided origin is never asked.
|
|
145
|
+
*
|
|
146
|
+
* @param originStatus the origin task's status right now
|
|
147
|
+
* @param evaluate runs the condition; only called once the origin can decide it
|
|
148
|
+
*/
|
|
149
|
+
export function DecideGate(originStatus, failureSemantics, evaluate) {
|
|
150
|
+
// A FAILURE DECIDES AN ORDINARY EDGE ONLY WHERE THE DIALECT SAYS FAILURES DECIDE (R3-2).
|
|
151
|
+
//
|
|
152
|
+
// R2-4 threaded semantics into the EXCLUSIVE dialect and left this one blind, which reproduced
|
|
153
|
+
// R2-4's own catastrophe through the other door. Under `'block'` — the spec's default — a Failed
|
|
154
|
+
// origin's conditional edge that evaluated false was DROPPED, its target landed in
|
|
155
|
+
// `unreachableTaskIDs`, it seeded the skip cascade, and the dropped edge simultaneously severed
|
|
156
|
+
// `ComputeTasksToBlock`'s forward walk: `Skipped` satisfies prerequisites, so a join fed by an
|
|
157
|
+
// independent healthy route executed downstream of an unhandled failure while the parent still
|
|
158
|
+
// rolled up Failed.
|
|
159
|
+
//
|
|
160
|
+
// R2-3 made it far more reachable, not less: a failed step almost never has output, so the
|
|
161
|
+
// null-safe envelope answers nearly every positive condition with a confident false→drop where
|
|
162
|
+
// it previously threw→held visibly.
|
|
163
|
+
//
|
|
164
|
+
// Keeping the edge is what hands the graph back to the block cascade — the edge stays in
|
|
165
|
+
// `liveEdges`, the walk traverses it, and everything downstream blocks, which is what `'block'`
|
|
166
|
+
// means. Under `'edges'`, a flow's failure handling IS its outgoing edges, so it still decides.
|
|
167
|
+
if (originStatus === 'Failed' && failureSemantics !== 'edges')
|
|
168
|
+
return 'keep';
|
|
169
|
+
// A CANCELLED ORIGIN NEVER DECIDES, under either dialect. A cancelled step's guards were never
|
|
170
|
+
// meant to route anything — the step did not run, so there is no outcome for them to describe —
|
|
171
|
+
// and after R2-9's partial cancel deliberately leaves a graph active, letting a Cancelled
|
|
172
|
+
// child's false edge skip-release downstream work would run steps in a workflow the user
|
|
173
|
+
// stopped. Keeping the edge leaves it to the block cascade, which treats Cancelled as
|
|
174
|
+
// unsatisfiable.
|
|
175
|
+
if (originStatus === 'Cancelled')
|
|
176
|
+
return 'keep';
|
|
177
|
+
// A BRANCH THAT WAS NOT TAKEN DOES NOT GET A VOTE.
|
|
178
|
+
//
|
|
179
|
+
// The walker never stood at a skipped step, so it never read that step's outgoing guards. This
|
|
180
|
+
// dropped the edge without asking, and asking is not equivalent: against an empty envelope a
|
|
181
|
+
// NEGATED condition — `!payload.error`, `payload.count === 0`, the common shapes — comes out
|
|
182
|
+
// TRUE, the edge is kept, and because `Skipped` satisfies prerequisites the target then runs on
|
|
183
|
+
// a path nobody took. Evaluating here would trade a permanent stall for wrong execution.
|
|
184
|
+
//
|
|
185
|
+
// Dropping is also right for the target: it loses only THIS route. One reached by a live branch
|
|
186
|
+
// still runs; one reached by nothing else is unreachable, which is precisely what the walker
|
|
187
|
+
// concluded by never arriving.
|
|
188
|
+
if (originStatus === 'Skipped')
|
|
189
|
+
return 'drop';
|
|
190
|
+
// A non-terminal origin is UNDECIDED, and 'keep' is the safe reading of undecided: the
|
|
191
|
+
// prerequisite gate already stops the target starting early, so keeping costs nothing while
|
|
192
|
+
// dropping is irreversible.
|
|
193
|
+
if (!TERMINAL_FOR_CONDITIONS.has(originStatus))
|
|
194
|
+
return 'keep';
|
|
195
|
+
const result = evaluate();
|
|
196
|
+
if (result.Success)
|
|
197
|
+
return result.Value ? 'keep' : 'drop';
|
|
198
|
+
// FAILED TO EVALUATE — but there are two of those, and they are not the same thing.
|
|
199
|
+
//
|
|
200
|
+
// "The guard is broken" (an unknown root: a typo, a name outside the envelope) does NOT open the
|
|
201
|
+
// gate. That is P2's contract, the layer's own spec, and what the legacy walker did.
|
|
202
|
+
//
|
|
203
|
+
// "The data is not there" (a property reached through something absent) is the data answering
|
|
204
|
+
// no. Holding it is a permanent stall on a terminal origin whose output can never change — and
|
|
205
|
+
// since Q1 now refuses syntax errors at the door, this became almost the only way the hold
|
|
206
|
+
// mechanism fired in production, on conditions their authors meant as false.
|
|
207
|
+
// A verdict that failed without saying WHY is not evidence of absence — it is evidence of
|
|
208
|
+
// nothing, and the conservative reading of nothing is the visible one.
|
|
209
|
+
if (!result.ErrorMessage)
|
|
210
|
+
return 'hold';
|
|
211
|
+
// Inverted from "is this a known absence shape?" to "is this a broken guard?" (R3-6). The
|
|
212
|
+
// envelope guarantees declared roots resolve, so a ReferenceError is the only failure that can
|
|
213
|
+
// mean the guard names something that does not exist; every other throw is the expression
|
|
214
|
+
// meeting data that is not there. Enumerating absence messages closed the shapes we had seen
|
|
215
|
+
// and left the next operator's shape open.
|
|
216
|
+
return IsBrokenGuard(result.ErrorMessage) ? 'hold' : 'drop';
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Whether an evaluation failure means the data was absent rather than the guard broken.
|
|
220
|
+
*
|
|
221
|
+
* Exported because the boundary is the fix, and a boundary that cannot be tested directly is a
|
|
222
|
+
* boundary nobody will notice moving.
|
|
223
|
+
*/
|
|
224
|
+
export function IsDataAbsence(errorMessage) {
|
|
225
|
+
if (!errorMessage)
|
|
226
|
+
return false;
|
|
227
|
+
return DATA_ABSENCE_SIGNATURES.some((pattern) => pattern.test(errorMessage));
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Whether an evaluation failure is a BROKEN GUARD rather than absent data.
|
|
231
|
+
*
|
|
232
|
+
* **This is the structural half of R3-6, and it is the one that matters.** Enumerating V8 message
|
|
233
|
+
* strings closes today's holes and leaves tomorrow's open: `'in'` and `Object` were both blessed at
|
|
234
|
+
* the door while their absence messages went unmatched, and each miss is a permanent silent stall on
|
|
235
|
+
* a terminal origin whose output can never change.
|
|
236
|
+
*
|
|
237
|
+
* Since the null-safe envelope guarantees every declared ROOT resolves, a `ReferenceError` is the
|
|
238
|
+
* only failure that can mean "this guard names something that does not exist" — everything else is
|
|
239
|
+
* the expression tripping over data that is not there, whatever operator it tripped over. So the
|
|
240
|
+
* classification is inverted: name the broken-guard case, and treat the rest as absence. The
|
|
241
|
+
* signature list above is kept as a fast path and as documentation of the shapes seen in the wild.
|
|
242
|
+
*
|
|
243
|
+
* **A POLICY REFUSAL is the second broken-guard shape.** `SafeExpressionEvaluator` refuses a
|
|
244
|
+
* construct outside its allowlist before it ever compiles, so the failure is not the expression
|
|
245
|
+
* meeting absent data — it is a guard this build will never run, on any input. That was nearly
|
|
246
|
+
* unreachable while the screen was a textual denylist that refused almost nothing; an AST allowlist
|
|
247
|
+
* makes it reachable for a graph already stored in the database, and without this signature such a
|
|
248
|
+
* graph would silently REROUTE — `drop`, with `TaskGraphDispatcher` logging a reason only on
|
|
249
|
+
* `hold`. Holding instead is the visible-and-recoverable reading this file argues for everywhere
|
|
250
|
+
* else: an upgrade stalls loudly rather than quietly taking a different path.
|
|
251
|
+
*/
|
|
252
|
+
export function IsBrokenGuard(errorMessage) {
|
|
253
|
+
if (!errorMessage)
|
|
254
|
+
return false;
|
|
255
|
+
return /is not defined|reference ?error|can't find variable|forbidden construct/i.test(errorMessage);
|
|
256
|
+
}
|
|
257
|
+
//# sourceMappingURL=condition-gate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"condition-gate.js","sourceRoot":"","sources":["../src/condition-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AA6CH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAwB,IAAI,GAAG,CAAC;IAChE,UAAU;IACV,QAAQ;IACR,WAAW;IACX,SAAS;CACZ,CAAC,CAAC;AAEH;;;;;;;;;;;GAWG;AACH,MAAM,SAAS,GAAsC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAEvE;;;;;;;;;;GAUG;AACH,MAAM,uBAAuB,GAAsB;IAC/C,sCAAsC;IACtC,wDAAwD;IACxD,qDAAqD;IACrD,sCAAsC,EAAa,sCAAsC;IACzF,sEAAsE;IACtE,6BAA6B,EAAsB,2BAA2B;IAC9E,6CAA6C,EAAM,iCAAiC;I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
|
|
|
1
|
+
/** What a step allowance permits: one task, the current frontier, or one named task. */
|
|
2
|
+
export type StepTarget = 'one' | 'wave' | string;
|
|
3
|
+
/** A user's answer for an edge whose condition they have overridden. */
|
|
4
|
+
export type EdgeOverrideVerdict = 'true' | 'false';
|
|
5
|
+
/**
|
|
6
|
+
* The durable debug state of one graph.
|
|
7
|
+
*
|
|
8
|
+
* Everything optional: the empty object is "no debugging", and a graph submitted before this existed
|
|
9
|
+
* parses to exactly that.
|
|
10
|
+
*/
|
|
11
|
+
export type TaskGraphDebugState = {
|
|
12
|
+
/** Nothing new is claimed while true. In-flight tasks finish naturally. */
|
|
13
|
+
paused?: boolean;
|
|
14
|
+
/** Who paused it — informational, for the console and the frame. */
|
|
15
|
+
pausedBy?: string | null;
|
|
16
|
+
/** Whether a person paused it or a breakpoint did. */
|
|
17
|
+
pausedReason?: 'user' | 'breakpoint';
|
|
18
|
+
/** The task whose breakpoint fired, when `pausedReason` is `'breakpoint'`. */
|
|
19
|
+
pausedAtTaskID?: string | null;
|
|
20
|
+
/** Task IDs the dispatcher pauses the graph on, before claiming them. */
|
|
21
|
+
breakpoints?: string[];
|
|
22
|
+
/**
|
|
23
|
+
* One-shot claim allowance while paused. Consumed atomically (CAS) by the instance that honors
|
|
24
|
+
* it, so two dispatchers polling the same paused graph release work exactly once.
|
|
25
|
+
*/
|
|
26
|
+
step?: StepTarget;
|
|
27
|
+
/**
|
|
28
|
+
* Continue from a breakpoint: this task's breakpoint is ignored for one claim so the stopped
|
|
29
|
+
* step actually runs. Without this, Resume clears `paused` and the next poll re-hits the same
|
|
30
|
+
* still-eligible breakpoint without claiming anything — a ForEach on the last step never starts.
|
|
31
|
+
*/
|
|
32
|
+
skipBreakpointTaskID?: string | null;
|
|
33
|
+
/**
|
|
34
|
+
* Authored verdicts for edges whose conditions the user has overridden, keyed by
|
|
35
|
+
* `MJ: Task Dependencies` row ID. `'false'` drops the edge (branch not taken → skip cascade);
|
|
36
|
+
* `'true'` satisfies it. The operator-grade escape hatch for a held graph — durable, so it
|
|
37
|
+
* survives restarts and is honored by every instance.
|
|
38
|
+
*/
|
|
39
|
+
edgeOverrides?: Record<string, EdgeOverrideVerdict>;
|
|
40
|
+
};
|
|
41
|
+
/** What the claim gate decided for one graph on one pass. */
|
|
42
|
+
export type ClaimGateDecision =
|
|
43
|
+
/** Not paused, no breakpoint in the eligible set — claim normally. */
|
|
44
|
+
{
|
|
45
|
+
mode: 'open';
|
|
46
|
+
}
|
|
47
|
+
/** Paused with no step allowance — claim nothing, notify nobody. */
|
|
48
|
+
| {
|
|
49
|
+
mode: 'closed';
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Paused with a step allowance — the caller may claim `taskIDs` this pass (after consuming the
|
|
53
|
+
* marker CAS-style; a lost consume means another instance is stepping).
|
|
54
|
+
*/
|
|
55
|
+
| {
|
|
56
|
+
mode: 'step';
|
|
57
|
+
taskIDs: string[];
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* An eligible task has a breakpoint — the caller should pause the graph (CAS), announce
|
|
61
|
+
* `BreakpointHit`, and claim nothing this pass.
|
|
62
|
+
*/
|
|
63
|
+
| {
|
|
64
|
+
mode: 'breakpoint';
|
|
65
|
+
taskID: string;
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Parses a parent Task's debug state from its `InputPayload` bag.
|
|
69
|
+
*
|
|
70
|
+
* Mirrors `ParseTaskGraphParentMetadata`'s posture exactly: unparseable input is a legitimate state
|
|
71
|
+
* (a row predating this, a hand edit), and the right reading of "I don't know" is "not being
|
|
72
|
+
* debugged" — never a throw, and never a guess that could gate real work on garbage.
|
|
73
|
+
*/
|
|
74
|
+
export declare function ParseTaskGraphDebugState(raw: string | null | undefined): TaskGraphDebugState;
|
|
75
|
+
/**
|
|
76
|
+
* Decides what the claim filter may do for one graph this pass, given its debug state and the tasks
|
|
77
|
+
* that are otherwise eligible.
|
|
78
|
+
*
|
|
79
|
+
* Pure by design — the CAS writes (consuming the step marker, pausing at the breakpoint) stay with
|
|
80
|
+
* the dispatcher, and this function only says which of them to attempt. Precedence:
|
|
81
|
+
*
|
|
82
|
+
* 1. **Paused** wins over everything, including breakpoints — a paused graph claims nothing unless
|
|
83
|
+
* a step allowance releases work, and a breakpoint inside a paused graph is moot.
|
|
84
|
+
* 2. **Breakpoints** fire before any claim: the FIRST eligible task carrying one pauses the whole
|
|
85
|
+
* graph, so no sibling of the breakpointed task starts either. That is what "pause here" means
|
|
86
|
+
* on a parallel graph — the alternative (claim the siblings, hold only the one task) turns a
|
|
87
|
+
* breakpoint into a per-task hold, which `holdTaskIDs` already is.
|
|
88
|
+
* 3. Otherwise the gate is open.
|
|
89
|
+
*
|
|
90
|
+
* A named-step target that is not currently eligible releases nothing — the allowance stays for the
|
|
91
|
+
* caller to keep or clear; stepping a task that cannot run must not release an arbitrary other one.
|
|
92
|
+
*/
|
|
93
|
+
export declare function DecideClaimGate(debug: TaskGraphDebugState, eligibleTaskIDs: readonly string[]): ClaimGateDecision;
|
|
94
|
+
/**
|
|
95
|
+
* The verdict an edge override dictates, if one exists for this edge.
|
|
96
|
+
*
|
|
97
|
+
* Consulted BEFORE the condition is evaluated: an override exists precisely because the condition
|
|
98
|
+
* cannot be answered (or answered wrongly), so evaluating first would re-produce the hold the
|
|
99
|
+
* override exists to end.
|
|
100
|
+
*/
|
|
101
|
+
export declare function OverrideVerdictFor(debug: TaskGraphDebugState, edgeID: string): EdgeOverrideVerdict | undefined;
|
|
102
|
+
//# sourceMappingURL=debug-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug-state.d.ts","sourceRoot":"","sources":["../src/debug-state.ts"],"names":[],"mappings":"AA0BA,wFAAwF;AACxF,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;AAEjD,wEAAwE;AACxE,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,OAAO,CAAC;AAEnD;;;;;GAKG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