@workflow/core 5.0.0-beta.40 → 5.0.0-beta.42

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.
Files changed (82) hide show
  1. package/dist/events-consumer.d.ts +224 -6
  2. package/dist/events-consumer.d.ts.map +1 -1
  3. package/dist/events-consumer.js +497 -50
  4. package/dist/private.d.ts +87 -18
  5. package/dist/private.d.ts.map +1 -1
  6. package/dist/private.js +118 -47
  7. package/dist/runtime/constants.d.ts +50 -1
  8. package/dist/runtime/constants.d.ts.map +1 -1
  9. package/dist/runtime/constants.js +59 -3
  10. package/dist/runtime/helpers.d.ts +212 -70
  11. package/dist/runtime/helpers.d.ts.map +1 -1
  12. package/dist/runtime/helpers.js +275 -86
  13. package/dist/runtime/quickjs-assets.generated.d.ts.map +1 -1
  14. package/dist/runtime/quickjs-assets.generated.js +2 -2
  15. package/dist/runtime/quickjs-entrypoint.d.ts +8 -9
  16. package/dist/runtime/quickjs-entrypoint.d.ts.map +1 -1
  17. package/dist/runtime/quickjs-entrypoint.js +172 -41
  18. package/dist/runtime/quickjs-runtime.d.ts +36 -1
  19. package/dist/runtime/quickjs-runtime.d.ts.map +1 -1
  20. package/dist/runtime/quickjs-runtime.js +613 -185
  21. package/dist/runtime/quickjs-serde.d.ts +107 -0
  22. package/dist/runtime/quickjs-serde.d.ts.map +1 -0
  23. package/dist/runtime/quickjs-serde.js +2098 -0
  24. package/dist/runtime/replay-budget.d.ts +13 -14
  25. package/dist/runtime/replay-budget.d.ts.map +1 -1
  26. package/dist/runtime/replay-budget.js +20 -73
  27. package/dist/runtime/resume-hook.d.ts.map +1 -1
  28. package/dist/runtime/resume-hook.js +57 -13
  29. package/dist/runtime/resume-latency.d.ts +143 -0
  30. package/dist/runtime/resume-latency.d.ts.map +1 -0
  31. package/dist/runtime/resume-latency.js +153 -0
  32. package/dist/runtime/runs.d.ts.map +1 -1
  33. package/dist/runtime/runs.js +3 -4
  34. package/dist/runtime/start.js +2 -7
  35. package/dist/runtime/step-executor.d.ts +27 -12
  36. package/dist/runtime/step-executor.d.ts.map +1 -1
  37. package/dist/runtime/step-executor.js +105 -15
  38. package/dist/runtime/suspension-handler.d.ts +46 -8
  39. package/dist/runtime/suspension-handler.d.ts.map +1 -1
  40. package/dist/runtime/suspension-handler.js +173 -15
  41. package/dist/runtime/world-compatibility.d.ts +16 -0
  42. package/dist/runtime/world-compatibility.d.ts.map +1 -1
  43. package/dist/runtime/world-compatibility.js +26 -5
  44. package/dist/runtime.d.ts.map +1 -1
  45. package/dist/runtime.js +911 -524
  46. package/dist/serialization/codec-devalue-vm.d.ts +7 -0
  47. package/dist/serialization/codec-devalue-vm.d.ts.map +1 -1
  48. package/dist/serialization/codec-devalue-vm.js +12 -1
  49. package/dist/serialization/codec-devalue.d.ts.map +1 -1
  50. package/dist/serialization/codec-devalue.js +15 -4
  51. package/dist/serialization/workflow-vm.d.ts +8 -3
  52. package/dist/serialization/workflow-vm.d.ts.map +1 -1
  53. package/dist/serialization/workflow-vm.js +9 -4
  54. package/dist/serialization.d.ts.map +1 -1
  55. package/dist/serialization.js +8 -3
  56. package/dist/step.js +2 -2
  57. package/dist/telemetry/semantic-conventions.d.ts +104 -0
  58. package/dist/telemetry/semantic-conventions.d.ts.map +1 -1
  59. package/dist/telemetry/semantic-conventions.js +84 -1
  60. package/dist/test-support/orchestrator-context.d.ts +25 -0
  61. package/dist/test-support/orchestrator-context.d.ts.map +1 -0
  62. package/dist/test-support/orchestrator-context.js +91 -0
  63. package/dist/version.d.ts +1 -1
  64. package/dist/version.js +2 -2
  65. package/dist/vm/index.d.ts.map +1 -1
  66. package/dist/vm/index.js +9 -6
  67. package/dist/workflow/abort-controller.d.ts.map +1 -1
  68. package/dist/workflow/abort-controller.js +4 -6
  69. package/dist/workflow/attribute-dispatcher.js +2 -2
  70. package/dist/workflow/hook.js +2 -2
  71. package/dist/workflow/sleep.js +2 -2
  72. package/dist/workflow.d.ts +10 -0
  73. package/dist/workflow.d.ts.map +1 -1
  74. package/dist/workflow.js +94 -20
  75. package/docs/how-it-works/event-sourcing.mdx +11 -3
  76. package/package.json +7 -7
  77. package/dist/correlation-id.d.ts +0 -109
  78. package/dist/correlation-id.d.ts.map +0 -1
  79. package/dist/correlation-id.js +0 -139
  80. package/dist/serialization/vm-bundle-entry.d.ts +0 -12
  81. package/dist/serialization/vm-bundle-entry.d.ts.map +0 -1
  82. package/dist/serialization/vm-bundle-entry.js +0 -58
@@ -90,13 +90,11 @@ export declare function healthCheck(world: World, options?: HealthCheckOptions):
90
90
  * same array. The set is updated alongside `target`.
91
91
  *
92
92
  * Events are appended in the order the World returned them, and are not
93
- * re-sorted: a World's canonical order is its own, and the runtime cannot
94
- * reproduce it from event ids alone. `world-vercel` orders by event id, while
95
- * `world-local` orders by `(createdAt, eventId)` and deliberately re-mints keys
96
- * so that the two diverge. Every append source is already in canonical order
97
- * relative to the tail (a cursor-delimited page, or a write-response delta), so
98
- * receipt order is the order to keep. Nothing downstream may assume the tail is
99
- * the newest event — see {@link latestEventStateUpdatedAt}.
93
+ * re-sorted. Every append source is already in canonical order relative to the
94
+ * tail (a cursor-delimited page, or a write-response delta), so receipt order is
95
+ * the order to keep, and re-sorting here would only cost a pass over the log.
96
+ * Nothing downstream may assume the tail is the newest event see
97
+ * {@link maxEventSlot}.
100
98
  */
101
99
  export declare function appendUniqueEvents(target: Event[], events: readonly Event[], targetIds?: Set<string>): void;
102
100
  /**
@@ -107,8 +105,12 @@ export declare function appendUniqueEvents(target: Event[], events: readonly Eve
107
105
  * `preloadedEvents` is loaded `sortOrder: 'asc'` and is never re-sorted
108
106
  * client-side, so a `hook_received` spliced in by the lazy-resume consumer must
109
107
  * land in `eventId` order — a plain `push` would place a late-committing
110
- * earlier event after events that sort before it, corrupting replay. Event IDs
111
- * are ULIDs, so lexicographic string order matches commit order.
108
+ * earlier event after events that sort before it, corrupting replay.
109
+ *
110
+ * Lexicographic string order is the log's order: a slot id is a fixed-width
111
+ * zero-padded position, so comparing the strings compares the positions. This
112
+ * needs no parse of its own for that reason, and the comparison is exact rather
113
+ * than a reconstruction.
112
114
  */
113
115
  export declare function insertEventByEventId(target: Event[], event: Event): void;
114
116
  /**
@@ -122,10 +124,7 @@ export declare function insertEventByEventId(target: Event[], event: Event): voi
122
124
  * The returned cursor can be passed back in on a subsequent call for
123
125
  * incremental loading.
124
126
  */
125
- export declare function loadWorkflowRunEvents(runId: string, afterCursor?: string): Promise<{
126
- events: Event[];
127
- cursor: string | null;
128
- }>;
127
+ export declare function loadWorkflowRunEvents(runId: string, afterCursor?: string): Promise<LoadedEventLog>;
129
128
  /**
130
129
  * The runtime's loaded event-log snapshot: the events replayed so far and the
131
130
  * cursor positioned after them. Handed to helpers that derive the precondition
@@ -136,72 +135,193 @@ export interface LoadedEventLog {
136
135
  cursor: string | null;
137
136
  }
138
137
  /**
139
- * Whether the optimistic-concurrency guard for event creation is enabled.
140
- * **On by default** where the runtime executes: replay-context creates send a
141
- * `stateUpdatedAt` snapshot (and can be rejected with 412 by a supporting
142
- * backend) unless `WORKFLOW_PRECONDITION_GUARD` is set to `0`. Backends without
143
- * guard support ignore the snapshot, so enabling by default is
144
- * backward-compatible.
138
+ * Whether a replay refuses to run over a log with a hole in it (see
139
+ * {@link findEventSlotGap}). **On by default**; set
140
+ * `WORKFLOW_SLOT_GAP_CHECK=0` to replay across holes instead.
141
+ *
142
+ * A World that allocates a position at the moment it commits leaves no hole
143
+ * behind when a write fails, so density is a property the log has by
144
+ * construction rather than one this check maintains. What the check is for is
145
+ * the reads and the Worlds where that does not hold, and by the time it runs
146
+ * the benign explanations are spent: a position missing because a concurrent
147
+ * commit is not visible yet clears on a re-read, which is what
148
+ * {@link settleEventSlotGap} does first.
149
+ *
150
+ * What is left is a hole that persists, and its two causes are
151
+ * indistinguishable from the log. Either a World allocated the position outside
152
+ * the commit and lost the write, in which case nothing happened there and
153
+ * replaying past it is correct, or an event that did happen is missing, in
154
+ * which case replaying past it decides a branch on absence and produces a wrong
155
+ * result with nothing to show for it. Failing is the recoverable side of that
156
+ * trade, and this is the way back out if a fleet turns out to carry holes of
157
+ * the first kind.
158
+ */
159
+ export declare function isSlotGapCheckEnabled(): boolean;
160
+ /**
161
+ * Merge the events a bump-and-report write handed back into the log it was
162
+ * derived from, and answer how many of them were new.
163
+ *
164
+ * Unlike {@link appendUniqueEvents}, this re-sorts. The reported events occupy
165
+ * slots *below* the write that reported them, so appending them would put them
166
+ * after events they precede. Sorting by id restores the World's canonical order
167
+ * rather than guessing at it: a slot id is that order, written down.
168
+ */
169
+ export declare function mergeReportedEvents(target: Event[], events: readonly Event[]): number;
170
+ /** What {@link absorbSkippedSlotReport} did with a write's report. */
171
+ export interface SkippedSlotReport {
172
+ /** How many of the reported events were new to the log. Zero if dropped. */
173
+ added: number;
174
+ /** How many events the report offered, whether or not they were taken. */
175
+ offered: number;
176
+ /** The report was truncated, so it was dropped whole instead of merged. */
177
+ truncated: boolean;
178
+ }
179
+ /**
180
+ * Apply a write's skipped-slot report to the log it was derived from, deciding
181
+ * whether the report may be taken at all.
182
+ *
183
+ * Every replay-context write can come back carrying the events on the slots it
184
+ * skipped over, and every caller wants the same thing from them: fold them in
185
+ * so the writes that follow name a position above them, and so the replay
186
+ * resuming from this log sees them without a reload.
187
+ *
188
+ * The one policy is that a **truncated report is dropped whole**. It covers a
189
+ * span of positions but carries only some of the events on them, so merging it
190
+ * would raise the log's highest position past a position whose event is
191
+ * missing. Later writes read that maximum to say what they have seen, so each
192
+ * would claim a position it never saw, and the World only reports the span a
193
+ * write skips — it would never send the missing one. Dropping costs one more
194
+ * round of the same events on the next write and keeps the log a prefix of the
195
+ * truth, which the note above {@link mergeReportedEvents} explains is always an
196
+ * available answer.
197
+ *
198
+ * Callers that log do so from the returned counts; the decision is not theirs
199
+ * to re-derive.
200
+ */
201
+ export declare function absorbSkippedSlotReport(target: Event[], result: {
202
+ events?: readonly Event[];
203
+ hasMore?: boolean;
204
+ }): SkippedSlotReport;
205
+ /**
206
+ * The highest slot the loaded log occupies, or `undefined` for an empty log.
207
+ *
208
+ * The maximum, not the count, and the two are not interchangeable even though
209
+ * a healthy log makes them equal. A World hands a position to the insert that
210
+ * occupies it, so a write that never lands leaves no hole behind and the log
211
+ * stays dense. What the count cannot survive is a *partial* read: a log
212
+ * assembled from a truncated report, or read while a concurrent write is
213
+ * committing, holds fewer events than its highest position. Counting those
214
+ * would make the next write claim to have seen less than it has, so the World
215
+ * would report the same events back to it on every attempt.
216
+ *
217
+ * A hole below the maximum is therefore a property of the read, not of the log,
218
+ * which is what lets {@link settleEventSlotGap} re-read instead of giving up.
219
+ *
220
+ * @throws if any event id carries no slot. Every World the runtime replays
221
+ * against numbers events by slot, so an id that does not is a broken log rather
222
+ * than an older one, and a maximum derived by skipping it would understate the
223
+ * log to every write that reads it.
224
+ */
225
+ export declare function maxEventSlot(events: readonly Event[]): number | undefined;
226
+ /** A position the log skips over, described well enough to name in an error. */
227
+ export interface EventSlotGap {
228
+ /** The lowest slot below the log's maximum that no event occupies. */
229
+ firstMissingSlot: number;
230
+ /** How many slots below the maximum no event occupies. */
231
+ missingCount: number;
232
+ /** The highest slot the log occupies. */
233
+ maxSlot: number;
234
+ }
235
+ /**
236
+ * The hole in a loaded log, or `undefined` when there is none to find.
237
+ *
238
+ * The World allocates every position, so a log that holds `n` events below slot
239
+ * `n` is missing one. That matters before a replay
240
+ * and nowhere else: the replay reads the log as the complete record of what has
241
+ * happened, and an absent position is indistinguishable from an event that
242
+ * never occurred. The branch it would have decided gets decided the other way,
243
+ * and the run diverges quietly rather than failing.
244
+ *
245
+ * Order-independent, unlike the equivalent audit the World runs over a page it
246
+ * just read. A loaded log is assembled from listed pages plus whatever a
247
+ * bump-and-report write handed back, and while {@link mergeReportedEvents}
248
+ * restores id order, a check that can fail a healthy run should not depend on
249
+ * that having happened.
250
+ *
251
+ * The first slot is never counted. It belongs to `run_created`, which `start()`
252
+ * posts concurrently with the queue send, so a log read in that window
253
+ * legitimately begins at the second slot and fills in on its own. Every replay
254
+ * that races a run's own start would otherwise report a hole.
255
+ *
256
+ * Returns `undefined` for an empty log, which has no density to check.
257
+ *
258
+ * @throws if any event id carries no slot, for the reason {@link maxEventSlot}
259
+ * gives.
145
260
  */
146
- export declare function isPreconditionGuardEnabled(): boolean;
261
+ export declare function findEventSlotGap(events: readonly Event[]): EventSlotGap | undefined;
147
262
  /**
148
- * The `stateUpdatedAt` value to send with a replay-context event creation: the
149
- * *maximum* ULID time (epoch ms) over the events the runtime has loaded. Returns
150
- * `undefined` when there are no events or that id is not a decodable ULID.
151
- *
152
- * It is the maximum rather than the tail's because the loaded log is in the
153
- * World's canonical order, which is not necessarily event-id order (see
154
- * {@link appendUniqueEvents}). The maximum is what lets the count sent alongside
155
- * it be read as "events at or below this watermark": every loaded event is at or
156
- * below it, so the count is exactly `events.length`. Reading the tail instead
157
- * would understate the watermark on a World whose order is not id-ordered, which
158
- * is safe (it can only weaken detection) but needlessly imprecise.
159
- *
160
- * The maximum is found by lexicographic id comparison, decoding only once: the
161
- * 26-character Crockford ULID encodes its timestamp in the leading 10
162
- * characters, so the greatest id also carries the greatest time.
163
- *
164
- * Granularity: snapshots are epoch-milliseconds, and the backend allows an
165
- * equal-timestamp snapshot (an up-to-date client must not be rejected). Two
166
- * out-of-band events landing in the same millisecond where only the first was
167
- * loaded therefore pass this half of the guard undetected — that is exactly
168
- * the hole `stateEventCount` closes, since the count of events at or below the
169
- * watermark differs even when the watermarks are equal.
263
+ * How many times a detected hole is re-read before the log is taken at its
264
+ * word, and the backoff before each re-read (doubling per attempt).
265
+ *
266
+ * A hole can be transient. The World allocates a slot inside the insert that
267
+ * occupies it, so two concurrent writers can collide, one retry past the other,
268
+ * and the higher slot commit first leaving a window in which the lower one is
269
+ * genuinely absent from a strongly-consistent read and fills in a moment later.
270
+ * The window is one commit wide, so a short backoff clears it; anything that
271
+ * survives all three re-reads is a position no write will ever occupy.
170
272
  */
171
- export declare function latestEventStateUpdatedAt(events: Event[]): number | undefined;
273
+ export declare const SLOT_GAP_RECHECK_ATTEMPTS = 3;
172
274
  /**
173
- * The precondition snapshot a replay-context event creation sends, describing
174
- * the event log the replay derived the event from.
275
+ * Re-read a log that looks holey until the hole fills in or the re-reads run
276
+ * out, and return the settled log alongside the hole that survived.
277
+ *
278
+ * Reads are strongly consistent, so a hole is not an artifact of *when* the log
279
+ * was read — but it can be an artifact of a write that had not committed yet
280
+ * (see {@link SLOT_GAP_RECHECK_ATTEMPTS}). Distinguishing the two costs a
281
+ * re-read, which is only ever paid by a replay that already found a hole.
175
282
  *
176
- * The three fields are one indivisible unit: the backend reads the count only
177
- * relative to the watermark, and returns its inline delta only relative to the
178
- * cursor. Passing them as a single object is what keeps them from drifting
179
- * apart at a call site.
283
+ * The reload is full rather than incremental: the missing position is below the
284
+ * log's maximum, so a cursor-anchored read starts past it and can never see it
285
+ * arrive.
180
286
  */
181
- export interface PreconditionSnapshotParams {
182
- stateUpdatedAt?: number;
183
- stateEventCount?: number;
184
- stateCursor?: string;
287
+ export declare function settleEventSlotGap(runId: string, loaded: LoadedEventLog): Promise<{
288
+ log: LoadedEventLog;
289
+ gap: EventSlotGap | undefined;
290
+ }>;
291
+ /**
292
+ * How much of its run's log a replay-context event creation had loaded when it
293
+ * decided to write, as the highest slot that log occupies.
294
+ *
295
+ * One integer says it because the World keeps its positions dense: a writer
296
+ * that names slot N is claiming to hold every event from 1 to N and nothing
297
+ * above. The World answers by numbering the write above whatever the log has
298
+ * actually reached and handing back the events on the slots in between — the
299
+ * ones this writer decided without.
300
+ *
301
+ * Density is the World's invariant, not a claim about this particular read. A
302
+ * reader that is short of a position it holds no event for names a lower N,
303
+ * which understates what it has seen and only costs it a wider report. Naming
304
+ * a position it cannot account for is the direction that is unsafe, which is
305
+ * why {@link slotSnapshotParams} takes the maximum rather than the count.
306
+ *
307
+ * Its own object rather than a bare number so a call site cannot half-send it,
308
+ * and so the empty case spreads to nothing.
309
+ */
310
+ export interface SlotSnapshotParams {
311
+ eventCount?: number;
185
312
  }
186
313
  /**
187
- * Build the precondition snapshot to attach to a replay-context event creation.
188
- *
189
- * Returns an empty object no guard, backend behaves as before when the
190
- * guard is disabled or the watermark is not derivable. All three fields fail
191
- * open together: a count without a watermark is meaningless to the backend, and
192
- * a cursor without either would invite a delta nobody asked for.
193
- *
194
- * `stateEventCount` is `events.length` because the watermark is the log's
195
- * *maximum* ULID time, so every loaded event is at or below it regardless of the
196
- * order the World returned them in.
197
- *
198
- * Both fields are therefore invariant under permutation of the log: a maximum is
199
- * order-independent, and the length is set cardinality once `appendUniqueEvents`
200
- * has deduped by event id. Two replays that consume the same events in different
201
- * orders send an identical snapshot, so this guard detects that a log is missing
202
- * an event and can never detect that a replay consumed one in a different order.
314
+ * Build the slot snapshot to attach to a replay-context event creation.
315
+ *
316
+ * Empty for an empty log, which is the state a `run_created` write is issued
317
+ * from: there is no position held yet to name.
318
+ *
319
+ * The maximum rather than the length, for the reason {@link maxEventSlot}
320
+ * gives: a partially-read log holds fewer events than its highest position, and
321
+ * counting those would make the write claim to have seen less than it has, so
322
+ * the World would report the same events back on every attempt.
203
323
  */
204
- export declare function preconditionSnapshotParams(events: Event[], cursor?: string | null): PreconditionSnapshotParams;
324
+ export declare function slotSnapshotParams(events: readonly Event[]): SlotSnapshotParams;
205
325
  /**
206
326
  * The events a rejecting World attached to a `PreconditionFailedError`, when it
207
327
  * returned the ones the client's snapshot was missing inline.
@@ -227,6 +347,28 @@ export type EventCreator = (data: CreateEventRequest, params?: CreateEventParams
227
347
  * based on the presence of a `__health` query parameter.
228
348
  */
229
349
  export declare function withHealthCheck(handler: (req: Request) => Promise<Response>, worldSpecVersion?: number): (req: Request) => Promise<Response>;
350
+ /**
351
+ * Idempotency key for a step's background-dispatch queue message, scoped to
352
+ * the step's IDENTITY — correlation id plus (hashed) step name — rather than
353
+ * the bare correlation id.
354
+ *
355
+ * The scoping matters for resilient step dispatch under the precondition
356
+ * guard: a guard-rejected `step_created` leaves its (revoked) step message in
357
+ * flight, and the corrected replay may re-derive the same correlation id for
358
+ * a DIFFERENT step. Under a bare-correlationId key the corrected replay's
359
+ * dispatch would silently dedupe against the revoked in-flight message —
360
+ * which then resolves `skipped` against the re-created entity (the server's
361
+ * stepName fence rejects its bare start) — and the legitimate step would
362
+ * never be executed. Scoping by step name keeps every dedup property that
363
+ * matters (crash recovery re-dispatch, concurrent handlers, the delayed
364
+ * retry sharing the suspension re-dispatch's key — all name the same step)
365
+ * while letting the corrected schedule's dispatch through.
366
+ *
367
+ * Every producer of a step-dispatch (or step-retry) message must use this
368
+ * key. Cross-version mixing is not a concern: queue messages are pinned to
369
+ * the deployment that produced them, so one run never sees two key schemes.
370
+ */
371
+ export declare function stepDispatchIdempotencyKey(correlationId: string, stepName: string): string;
230
372
  /**
231
373
  * Queues a message to the specified queue with tracing.
232
374
  */
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/runtime/helpers.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,iBAAiB,EACjB,kBAAkB,EAClB,KAAK,EACL,WAAW,EACX,kBAAkB,EAClB,cAAc,EACd,WAAW,EACX,KAAK,EACN,MAAM,iBAAiB,CAAC;AAazB,OAAO,EAEL,KAAK,UAAU,EAChB,MAAM,gCAAgC,CAAC;AAgBxC;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,YAAY,EAAE,MAAM,EACpB,SAAS,CAAC,EAAE,MAAM,GACjB,cAAc,CAWhB;AAWD;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,2CAA2C;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gDAAgD;IAChD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;;OAMG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;;;;;OAOG;IACH,mBAAmB,CAAC,EAAE,MAAM,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