@workflow/core 5.0.0-beta.43 → 5.0.0-beta.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/capabilities.d.ts +4 -4
- package/dist/capabilities.js +5 -5
- package/dist/capture-stack.d.ts +1 -1
- package/dist/capture-stack.js +2 -2
- package/dist/class-serialization.d.ts +8 -8
- package/dist/class-serialization.js +9 -9
- package/dist/classify-error.js +5 -5
- package/dist/context-violation-error.d.ts +5 -5
- package/dist/context-violation-error.d.ts.map +1 -1
- package/dist/context-violation-error.js +5 -5
- package/dist/create-hook.d.ts +2 -2
- package/dist/create-hook.js +1 -1
- package/dist/define-hook.js +2 -2
- package/dist/describe-error.d.ts +7 -7
- package/dist/describe-error.js +8 -8
- package/dist/encryption.d.ts +5 -5
- package/dist/encryption.js +7 -7
- package/dist/events-consumer.d.ts +19 -7
- package/dist/events-consumer.d.ts.map +1 -1
- package/dist/events-consumer.js +33 -12
- package/dist/flushable-stream.d.ts +4 -4
- package/dist/flushable-stream.js +12 -12
- package/dist/global.d.ts +1 -1
- package/dist/global.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/log-format.d.ts +2 -2
- package/dist/log-format.js +5 -5
- package/dist/logger.js +4 -4
- package/dist/private.d.ts +21 -65
- package/dist/private.d.ts.map +1 -1
- package/dist/private.js +160 -38
- package/dist/replay-payload-cache.d.ts +1 -1
- package/dist/replay-payload-cache.js +4 -4
- package/dist/runtime/compute-instance.d.ts +4 -3
- package/dist/runtime/compute-instance.d.ts.map +1 -1
- package/dist/runtime/compute-instance.js +5 -4
- package/dist/runtime/constants.d.ts +24 -24
- package/dist/runtime/constants.d.ts.map +1 -1
- package/dist/runtime/constants.js +49 -43
- package/dist/runtime/count-step-started-events.d.ts +7 -7
- package/dist/runtime/count-step-started-events.js +4 -4
- package/dist/runtime/deployment-guard.d.ts +7 -7
- package/dist/runtime/deployment-guard.js +8 -8
- package/dist/runtime/get-port-lazy.d.ts +2 -2
- package/dist/runtime/get-port-lazy.d.ts.map +1 -1
- package/dist/runtime/get-port-lazy.js +37 -30
- package/dist/runtime/get-world-lazy.d.ts +2 -2
- package/dist/runtime/get-world-lazy.js +3 -3
- package/dist/runtime/helpers.d.ts +18 -18
- package/dist/runtime/helpers.js +27 -27
- package/dist/runtime/quickjs-entrypoint.d.ts +21 -10
- package/dist/runtime/quickjs-entrypoint.d.ts.map +1 -1
- package/dist/runtime/quickjs-entrypoint.js +199 -81
- package/dist/runtime/quickjs-runtime.d.ts +31 -15
- package/dist/runtime/quickjs-runtime.d.ts.map +1 -1
- package/dist/runtime/quickjs-runtime.js +126 -77
- package/dist/runtime/quickjs-serde.d.ts +10 -10
- package/dist/runtime/quickjs-serde.js +20 -20
- package/dist/runtime/replay-budget.d.ts +4 -4
- package/dist/runtime/replay-budget.js +5 -5
- package/dist/runtime/replay-recovery-reporter.d.ts +1 -1
- package/dist/runtime/replay-recovery-reporter.js +2 -2
- package/dist/runtime/resume-hook.d.ts +2 -2
- package/dist/runtime/resume-hook.js +27 -27
- package/dist/runtime/resume-latency.d.ts +25 -25
- package/dist/runtime/resume-latency.d.ts.map +1 -1
- package/dist/runtime/resume-latency.js +4 -4
- package/dist/runtime/run-id-time.d.ts +2 -2
- package/dist/runtime/run-id-time.js +5 -5
- package/dist/runtime/run.d.ts +21 -4
- package/dist/runtime/run.d.ts.map +1 -1
- package/dist/runtime/run.js +104 -10
- package/dist/runtime/runs.d.ts +4 -4
- package/dist/runtime/runs.js +2 -2
- package/dist/runtime/start.d.ts +3 -3
- package/dist/runtime/start.d.ts.map +1 -1
- package/dist/runtime/start.js +27 -23
- package/dist/runtime/step-executor.d.ts +14 -14
- package/dist/runtime/step-executor.d.ts.map +1 -1
- package/dist/runtime/step-executor.js +54 -39
- package/dist/runtime/step-latency.d.ts +14 -14
- package/dist/runtime/step-latency.js +11 -11
- package/dist/runtime/step-ownership.d.ts +6 -6
- package/dist/runtime/step-ownership.js +8 -8
- package/dist/runtime/step-single-flight.d.ts +1 -1
- package/dist/runtime/step-single-flight.d.ts.map +1 -1
- package/dist/runtime/step-single-flight.js +17 -11
- package/dist/runtime/suspension-handler.d.ts +29 -17
- package/dist/runtime/suspension-handler.d.ts.map +1 -1
- package/dist/runtime/suspension-handler.js +206 -71
- package/dist/runtime/unserializable-step.d.ts +34 -0
- package/dist/runtime/unserializable-step.d.ts.map +1 -0
- package/dist/runtime/unserializable-step.js +52 -0
- package/dist/runtime/vm-mode.d.ts +1 -1
- package/dist/runtime/vm-mode.js +2 -2
- package/dist/runtime/wait-continuation.d.ts +31 -9
- package/dist/runtime/wait-continuation.d.ts.map +1 -1
- package/dist/runtime/wait-continuation.js +44 -13
- package/dist/runtime/wait-until.d.ts +1 -1
- package/dist/runtime/wait-until.js +2 -2
- package/dist/runtime/world-compatibility.d.ts +20 -9
- package/dist/runtime/world-compatibility.d.ts.map +1 -1
- package/dist/runtime/world-compatibility.js +24 -13
- package/dist/runtime/world-init.d.ts +5 -5
- package/dist/runtime/world-init.js +6 -6
- package/dist/runtime/world.d.ts.map +1 -1
- package/dist/runtime/world.js +13 -3
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +300 -206
- package/dist/sealed-box.d.ts +7 -7
- package/dist/sealed-box.js +15 -15
- package/dist/serialization/client.js +2 -2
- package/dist/serialization/codec-devalue-vm.d.ts +1 -1
- package/dist/serialization/codec-devalue-vm.js +4 -4
- package/dist/serialization/codec-devalue.d.ts +1 -1
- package/dist/serialization/codec-devalue.js +2 -2
- package/dist/serialization/codec.d.ts +4 -4
- package/dist/serialization/codec.js +2 -2
- package/dist/serialization/compression.d.ts +12 -11
- package/dist/serialization/compression.d.ts.map +1 -1
- package/dist/serialization/compression.js +16 -15
- package/dist/serialization/encryption.d.ts +7 -7
- package/dist/serialization/encryption.d.ts.map +1 -1
- package/dist/serialization/encryption.js +8 -8
- package/dist/serialization/errors.js +2 -2
- package/dist/serialization/format.d.ts +6 -6
- package/dist/serialization/format.js +7 -7
- package/dist/serialization/hardened.d.ts +18 -18
- package/dist/serialization/hardened.d.ts.map +1 -1
- package/dist/serialization/hardened.js +41 -32
- package/dist/serialization/index.d.ts +1 -1
- package/dist/serialization/index.js +2 -2
- package/dist/serialization/reducers/class-vm.d.ts +1 -1
- package/dist/serialization/reducers/class-vm.js +2 -2
- package/dist/serialization/reducers/class.js +2 -2
- package/dist/serialization/reducers/common-vm.js +12 -12
- package/dist/serialization/reducers/common.js +12 -12
- package/dist/serialization/reducers/step-function-vm.d.ts +1 -1
- package/dist/serialization/reducers/step-function-vm.js +2 -2
- package/dist/serialization/reducers/step-function.js +2 -2
- package/dist/serialization/step.js +2 -2
- package/dist/serialization/types.d.ts +5 -5
- package/dist/serialization/types.js +2 -2
- package/dist/serialization/workflow-vm.d.ts +1 -1
- package/dist/serialization/workflow-vm.d.ts.map +1 -1
- package/dist/serialization/workflow-vm.js +13 -10
- package/dist/serialization-format.d.ts +11 -11
- package/dist/serialization-format.d.ts.map +1 -1
- package/dist/serialization-format.js +29 -23
- package/dist/serialization.d.ts +10 -10
- package/dist/serialization.js +98 -98
- package/dist/set-attributes.js +2 -2
- package/dist/source-map.d.ts +1 -1
- package/dist/source-map.d.ts.map +1 -1
- package/dist/source-map.js +18 -12
- package/dist/step/context-storage.d.ts +5 -5
- package/dist/step/context-storage.js +1 -1
- package/dist/step/writable-stream.d.ts +3 -3
- package/dist/step/writable-stream.js +7 -7
- package/dist/step.js +12 -12
- package/dist/symbols.d.ts +2 -2
- package/dist/symbols.js +3 -3
- package/dist/telemetry/semantic-conventions.d.ts +21 -13
- package/dist/telemetry/semantic-conventions.d.ts.map +1 -1
- package/dist/telemetry/semantic-conventions.js +21 -15
- package/dist/telemetry.d.ts +3 -3
- package/dist/telemetry.d.ts.map +1 -1
- package/dist/telemetry.js +19 -10
- package/dist/test-support/orchestrator-context.d.ts.map +1 -1
- package/dist/test-support/orchestrator-context.js +12 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +2 -2
- package/dist/vm/index.js +4 -4
- package/dist/vm/script-cache.d.ts.map +1 -1
- package/dist/vm/script-cache.js +23 -17
- package/dist/vm/uint8array-base64.js +1 -1
- package/dist/workflow/abort-controller.d.ts +1 -1
- package/dist/workflow/abort-controller.js +12 -12
- package/dist/workflow/create-hook.js +2 -2
- package/dist/workflow/get-workflow-metadata.js +2 -2
- package/dist/workflow/hook.js +16 -16
- package/dist/workflow/set-attributes.d.ts +1 -1
- package/dist/workflow/set-attributes.js +2 -2
- package/dist/workflow/sleep.js +2 -2
- package/dist/workflow/world-init-stub.d.ts +1 -1
- package/dist/workflow/world-init-stub.js +2 -2
- package/dist/workflow.d.ts +2 -2
- package/dist/workflow.js +21 -7
- package/docs/api-reference/create-hook.mdx +15 -15
- package/docs/api-reference/create-webhook.mdx +15 -15
- package/docs/api-reference/define-hook.mdx +10 -10
- package/docs/api-reference/fatal-error.mdx +2 -2
- package/docs/api-reference/fetch.mdx +7 -7
- package/docs/api-reference/get-step-metadata.mdx +2 -2
- package/docs/api-reference/get-workflow-metadata.mdx +3 -3
- package/docs/api-reference/get-writable.mdx +7 -7
- package/docs/api-reference/index.mdx +1 -1
- package/docs/api-reference/retryable-error.mdx +1 -1
- package/docs/api-reference/set-attributes.mdx +2 -2
- package/docs/api-reference/sleep.mdx +3 -3
- package/docs/foundations/cancellation.mdx +31 -31
- package/docs/foundations/errors-and-retries.mdx +42 -11
- package/docs/foundations/hooks.mdx +35 -35
- package/docs/foundations/idempotency.mdx +9 -9
- package/docs/foundations/serialization.mdx +21 -22
- package/docs/foundations/starting-workflows.mdx +36 -37
- package/docs/foundations/streaming.mdx +46 -41
- package/docs/foundations/versioning.mdx +3 -3
- package/docs/foundations/workflows-and-steps.mdx +9 -9
- package/docs/how-it-works/cancellation.mdx +62 -62
- package/docs/how-it-works/code-transform.mdx +66 -54
- package/docs/how-it-works/encryption.mdx +25 -21
- package/docs/how-it-works/event-sourcing.mdx +53 -35
- package/docs/how-it-works/framework-integrations.mdx +12 -12
- package/docs/how-it-works/understanding-directives.mdx +21 -21
- package/package.json +7 -7
package/dist/private.d.ts
CHANGED
|
@@ -33,7 +33,7 @@ export interface WorkflowOrchestratorContext {
|
|
|
33
33
|
/**
|
|
34
34
|
* Increments when a suspension is accepted and on every retained-session
|
|
35
35
|
* resume. STEP suspension signals capture it when scheduled and no-op if
|
|
36
|
-
* it moved (see step.ts)
|
|
36
|
+
* it moved (see step.ts), which drops same-boundary sibling signals and
|
|
37
37
|
* timers queued at boundary N that would fire after the session resumed
|
|
38
38
|
* into boundary N+1. Sleep/hook/attribute signals are intentionally
|
|
39
39
|
* unguarded: their presence makes the boundary unretainable, so a late
|
|
@@ -53,6 +53,14 @@ export interface WorkflowOrchestratorContext {
|
|
|
53
53
|
* whole run and both replays of a run must draw in the same order.
|
|
54
54
|
*/
|
|
55
55
|
generateUlid: () => string;
|
|
56
|
+
/**
|
|
57
|
+
* Monotone count of correlation-id draws this replay has made. Progress
|
|
58
|
+
* metric for {@link quiesceEarlierCascades}: a macrotask turn in which it
|
|
59
|
+
* does not move (and no hydration is in flight) means every woken branch has
|
|
60
|
+
* run as far as it can without another delivery. Optional so lightweight
|
|
61
|
+
* test contexts degrade to the single-yield behavior.
|
|
62
|
+
*/
|
|
63
|
+
readonly mintCount?: number;
|
|
56
64
|
generateNanoid: () => string;
|
|
57
65
|
/**
|
|
58
66
|
* Sequential promise queue that ensures all event-driven promise resolutions
|
|
@@ -66,12 +74,12 @@ export interface WorkflowOrchestratorContext {
|
|
|
66
74
|
* Counter of in-flight async data delivery operations (step result
|
|
67
75
|
* hydration, hook payload hydration, abort signal hydration). Suspensions
|
|
68
76
|
* must wait for this to reach 0 before firing, to avoid preempting data
|
|
69
|
-
* delivery
|
|
77
|
+
* delivery, e.g. dehydrating a step's arguments while an abort that should
|
|
70
78
|
* be reflected in those arguments is still hydrating its reason.
|
|
71
79
|
*/
|
|
72
80
|
pendingDeliveries: number;
|
|
73
81
|
/**
|
|
74
|
-
* Ordered registry of in-flight "branch-deciding" deliveries
|
|
82
|
+
* Ordered registry of in-flight "branch-deciding" deliveries: the
|
|
75
83
|
* resolutions a workflow typically `Promise.race`s on, or awaits from
|
|
76
84
|
* independent concurrent branches: hook payloads (`hook_received`), wait
|
|
77
85
|
* completions (`wait_completed`), and step results (`step_completed` /
|
|
@@ -84,7 +92,7 @@ export interface WorkflowOrchestratorContext {
|
|
|
84
92
|
* costing extra hops; a `wait_completed` resolves with fewer, and a reused
|
|
85
93
|
* sleep can resolve in an entirely earlier loop iteration; a step result is
|
|
86
94
|
* gated on hydration whose cost varies between replays of the SAME
|
|
87
|
-
* invocation
|
|
95
|
+
* invocation: the first replay pays the full decrypt/decompress/revive,
|
|
88
96
|
* while later replays sharing the invocation's `ReplayPayloadCache`
|
|
89
97
|
* memo-hit small primitive results and resolve in one or two hops. Either
|
|
90
98
|
* way, the resolution that the committed event log ordered first can lose a
|
|
@@ -127,7 +135,7 @@ interface DeliveryBarrierEntry {
|
|
|
127
135
|
* that already had a waiting consumer when it was consumed.
|
|
128
136
|
*
|
|
129
137
|
* False for a BUFFERED hook payload no consumer has claimed yet: it is
|
|
130
|
-
* delivered by `claim()`, i.e. whenever the workflow next reads the hook
|
|
138
|
+
* delivered by `claim()`, i.e. whenever the workflow next reads the hook,
|
|
131
139
|
* which may be causally *after* a later-in-log delivery. `arm()` flips it
|
|
132
140
|
* once a consumer takes the payload.
|
|
133
141
|
*/
|
|
@@ -140,58 +148,6 @@ interface DeliveryBarrierEntry {
|
|
|
140
148
|
*/
|
|
141
149
|
retire: () => void;
|
|
142
150
|
}
|
|
143
|
-
/**
|
|
144
|
-
* Awaits, in strict event-log order, every still-registered delivery that is
|
|
145
|
-
* earlier in the log than `eventIndex` and that a delivery of `kind` defers
|
|
146
|
-
* behind (see {@link DEFER_BEHIND}), so that this resolution is handed to the
|
|
147
|
-
* workflow only after all relevant earlier-in-log deliveries have been. This
|
|
148
|
-
* is what keeps a `Promise.race` — or the ULID a follow-up `useStep` draws on
|
|
149
|
-
* a concurrent branch — deterministic and aligned with the committed event
|
|
150
|
-
* log, independent of microtask-hop counts, hydration time, or race-argument
|
|
151
|
-
* order. When this delivery does have to wait, it also yields a macrotask
|
|
152
|
-
* afterwards so the earlier delivery's consumer can run to its own next
|
|
153
|
-
* suspension point first; see the comment at that `await` for why ordering the
|
|
154
|
-
* `resolve()` calls alone is not enough.
|
|
155
|
-
*
|
|
156
|
-
* What counts as "defers behind" is {@link gatesOn}, shared with
|
|
157
|
-
* {@link computeResolvesOnItsOwn} so the two cannot drift.
|
|
158
|
-
*
|
|
159
|
-
* One asymmetry: a STEP result skips any earlier delivery that is UNARMED,
|
|
160
|
-
* i.e. a buffered hook payload no consumer has claimed. Such a payload is
|
|
161
|
-
* delivered only when the workflow next reads the hook, and reaching that read
|
|
162
|
-
* very commonly requires the step result itself (`await stepX()` before the
|
|
163
|
-
* read). Gating the step on it would stall the workflow until the barrier's
|
|
164
|
-
* idle safety net fires, which then releases every delivery queued behind that
|
|
165
|
-
* payload at once — losing exactly the race this ordering exists to protect.
|
|
166
|
-
* Waits and hooks keep gating on unclaimed payloads: for them, waiting for the
|
|
167
|
-
* claim IS the ordering guarantee (a `wait_completed` must not preempt a
|
|
168
|
-
* payload the log ordered first).
|
|
169
|
-
*
|
|
170
|
-
* The skip is direct, never transitive. A step still gates on an earlier ARMED
|
|
171
|
-
* wait or hook, including one that is itself parked behind an unclaimed
|
|
172
|
-
* payload. Skipping those too would invert log order for the commonest shape
|
|
173
|
-
* there is: a workflow that creates a hook it does not read on this branch,
|
|
174
|
-
* races `step` against `sleep`, and has the log say the sleep won. The step
|
|
175
|
-
* would then overtake the wait, both branches would swap the correlation ids
|
|
176
|
-
* they draw next, and replay would diverge — see
|
|
177
|
-
* `step-delivery-ordering.test.ts`. Waiting instead is safe because the
|
|
178
|
-
* payload's own idle safety net retires it and the whole chain then delivers
|
|
179
|
-
* in log order; {@link hasParkedCommittedDelivery} deliberately reports such a
|
|
180
|
-
* step as not self-resolving so that idle stays reachable.
|
|
181
|
-
*
|
|
182
|
-
* "The whole chain then delivers in log order" rests on the PAYLOAD's barrier
|
|
183
|
-
* being retired before that of anything parked behind it. That order is
|
|
184
|
-
* structural: safety-net retirements go through one per-context dispenser that
|
|
185
|
-
* only ever retires the lowest-index entry at delivery idle, and every
|
|
186
|
-
* retirement that wakes a chain flips {@link hasParkedCommittedDelivery} back
|
|
187
|
-
* to true, re-blocking the dispenser until the chain has drained — see
|
|
188
|
-
* {@link ensureBarrierSafetyNet}. (This used to rest on the FIFO of one idle
|
|
189
|
-
* poll per barrier, which held for a single parked segment but decayed to
|
|
190
|
-
* timing noise with several — the release order, and therefore the ULIDs
|
|
191
|
-
* drawn by the woken branches, then depended on how much log the replay had
|
|
192
|
-
* loaded. storm-log-replay.test.ts replays a production log corrupted exactly
|
|
193
|
-
* that way.)
|
|
194
|
-
*/
|
|
195
151
|
export declare function awaitEarlierDeliveries(ctx: WorkflowOrchestratorContext, eventIndex: number | undefined, kind: DeliveryKind): Promise<void>;
|
|
196
152
|
/** Handle for a registered branch-deciding delivery barrier. */
|
|
197
153
|
export interface DeliveryBarrier {
|
|
@@ -222,12 +178,12 @@ export interface DeliveryBarrier {
|
|
|
222
178
|
* suspending and never observes it), the barrier auto-resolves at idle.
|
|
223
179
|
*
|
|
224
180
|
* INVARIANT required of every call site: a barrier that is ever `armed` must
|
|
225
|
-
* be paired with a delivery chain that runs unconditionally
|
|
181
|
+
* be paired with a delivery chain that runs unconditionally, attached when
|
|
226
182
|
* the event is consumed (waits, step results, waiting-consumer hook payloads,
|
|
227
183
|
* aborts), or by the `claim()` whose invocation is what arms it (buffered
|
|
228
184
|
* hook payloads). The idle check ({@link scheduleWhenIdle}) refuses to
|
|
229
185
|
* observe idle while an armed, self-resolving barrier is undelivered, and the
|
|
230
|
-
* safety net below is itself idle-gated
|
|
186
|
+
* safety net below is itself idle-gated, so an armed barrier with no
|
|
231
187
|
* unconditional chain would livelock every idle check in the run, including
|
|
232
188
|
* its own retirement.
|
|
233
189
|
*/
|
|
@@ -237,19 +193,19 @@ export declare function registerDeliveryBarrier(ctx: WorkflowOrchestratorContext
|
|
|
237
193
|
/**
|
|
238
194
|
* Whether some registered branch-deciding delivery is going to reach the
|
|
239
195
|
* workflow without any further help (it is armed and not transitively parked
|
|
240
|
-
* behind an unclaimed buffered payload
|
|
196
|
+
* behind an unclaimed buffered payload, see {@link resolvesOnItsOwn}) but
|
|
241
197
|
* has not been handed over yet.
|
|
242
198
|
*
|
|
243
199
|
* This is the delivery state `pendingDeliveries` cannot see. That counter
|
|
244
200
|
* covers the hydration window inside a serial `promiseQueue` slot and is
|
|
245
201
|
* released there, while the delivery's `resolve()` runs later, from a
|
|
246
|
-
* detached continuation behind {@link awaitEarlierDeliveries}
|
|
202
|
+
* detached continuation behind {@link awaitEarlierDeliveries}, including its
|
|
247
203
|
* macrotask yield whenever the delivery had to defer. Replaying a batch of N
|
|
248
204
|
* parallel step results consumed in one drain window leaves N-1 of them
|
|
249
205
|
* parked on that yield with `pendingDeliveries` already at 0. An idle check
|
|
250
206
|
* armed during the same window (a pending `sleep()` arms one on every replay)
|
|
251
207
|
* could then observe "idle" mid-deferral and raise a `WorkflowSuspension`
|
|
252
|
-
* BEFORE the workflow's own continuations ran
|
|
208
|
+
* BEFORE the workflow's own continuations ran: a suspension carrying none of
|
|
253
209
|
* the follow-up work the batch was about to create, which the runtime
|
|
254
210
|
* dutifully schedules as nothing, leaving the run dormant until an unrelated
|
|
255
211
|
* timer fires (vercel/workflow#3183).
|
|
@@ -258,7 +214,7 @@ export declare function registerDeliveryBarrier(ctx: WorkflowOrchestratorContext
|
|
|
258
214
|
* accuracy but for termination: an unclaimed buffered hook payload is retired
|
|
259
215
|
* BY the idle safety net in {@link registerDeliveryBarrier}, so counting it
|
|
260
216
|
* here would gate its own retirement. That reasoning extends to whatever is
|
|
261
|
-
* parked behind such a payload
|
|
217
|
+
* parked behind such a payload (a wait, and a step gating on that wait) for
|
|
262
218
|
* the same reason: the whole chain moves only once the net fires, and it
|
|
263
219
|
* cannot fire while the chain is counted. Self-resolving deliveries always
|
|
264
220
|
* deliver from their own chains (see the INVARIANT on
|
|
@@ -272,7 +228,7 @@ export declare function hasParkedCommittedDelivery(ctx: WorkflowOrchestratorCont
|
|
|
272
228
|
* "In flight" is two distinct windows, each with its own guard:
|
|
273
229
|
* `pendingDeliveries > 0` covers hydration inside the serial queue slots, and
|
|
274
230
|
* {@link hasParkedCommittedDelivery} covers the detached gap between a slot
|
|
275
|
-
* releasing that counter and the delivery's `resolve()` actually running
|
|
231
|
+
* releasing that counter and the delivery's `resolve()` actually running,
|
|
276
232
|
* deliberately outside `pendingDeliveries` (see step.ts), and invisible to it.
|
|
277
233
|
*
|
|
278
234
|
* Anything that decides a replay is over, or that a replay went wrong, has to
|
|
@@ -285,7 +241,7 @@ export declare function hasParkedCommittedDelivery(ctx: WorkflowOrchestratorCont
|
|
|
285
241
|
* entry is parked behind an unclaimed buffered payload. Those entries only
|
|
286
242
|
* move when the safety-net dispenser retires them (lowest-first, see
|
|
287
243
|
* {@link ensureBarrierSafetyNet}), and the deliveries they release are real
|
|
288
|
-
* workflow reactions
|
|
244
|
+
* workflow reactions: a suspension raised before they run would be computed
|
|
289
245
|
* from a VM that has not seen them, scheduling none of their follow-up work
|
|
290
246
|
* and leaving the run dormant (the vercel/workflow#3183 shape). The dispenser
|
|
291
247
|
* itself is gated on {@link canRetireAbandonedBarriers}, the weaker predicate
|
package/dist/private.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"private.d.ts","sourceRoot":"","sources":["../src/private.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,E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