@ewhauser/world-celld 0.3.2 → 0.4.1

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/CHANGELOG.md CHANGED
@@ -2,6 +2,29 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## 0.4.1 (2026-08-24)
6
+
7
+ ## What's Changed
8
+ * fix: harden remote transport failure handling by @ewhauser in https://github.com/ewhauser/world-celld/pull/34
9
+ * test: enforce real celld restart recovery by @ewhauser in https://github.com/ewhauser/world-celld/pull/36
10
+ * test: cover index compaction alarm recovery by @ewhauser in https://github.com/ewhauser/world-celld/pull/37
11
+ * test: harden index compaction rollback coverage by @ewhauser in https://github.com/ewhauser/world-celld/pull/38
12
+ * test: harden StreamDO corruption handling by @ewhauser in https://github.com/ewhauser/world-celld/pull/39
13
+ * test: harden configuration and malformed input handling by @ewhauser in https://github.com/ewhauser/world-celld/pull/40
14
+ * fix: enforce negative apply-event contracts by @ewhauser in https://github.com/ewhauser/world-celld/pull/41
15
+
16
+
17
+ **Full Changelog**: https://github.com/ewhauser/world-celld/compare/v0.4.0...v0.4.1
18
+
19
+ ## 0.4.0 (2026-08-22)
20
+
21
+ ## What's Changed
22
+ * chore: test against celld v0.3.0 by @ewhauser in https://github.com/ewhauser/world-celld/pull/31
23
+ * feat: add configurable workflow retention by @ewhauser in https://github.com/ewhauser/world-celld/pull/33
24
+
25
+
26
+ **Full Changelog**: https://github.com/ewhauser/world-celld/compare/v0.3.2...v0.4.0
27
+
5
28
  ## 0.3.2 (2026-08-19)
6
29
 
7
30
  ## What's Changed
package/README.md CHANGED
@@ -75,8 +75,9 @@ requests. It must be reachable from every celld node.
75
75
 
76
76
  ## Deploy the worker
77
77
 
78
- Before deploying, you need a celld fleet, `esbuild` on `PATH`, and an object
79
- store that meets celld's conditional-write requirements. Refer to the
78
+ Before deploying, you need a celld v0.3.0 fleet, `esbuild` on `PATH`, and an
79
+ object store that meets celld's conditional-write requirements. v0.3.0 is the
80
+ currently tested runtime baseline. Refer to the
80
81
  [celld documentation](https://github.com/denoland/celld) for fleet and storage
81
82
  setup.
82
83
 
@@ -98,6 +99,7 @@ the same secret to the fleet and the application:
98
99
 
99
100
  ```sh
100
101
  CELLD_VAR_WORLD_SECRET="$CELLD_WORLD_SECRET" \
102
+ CELLD_VAR_WORKFLOW_RETENTION_MS=7776000000 \
101
103
  celld --bucket s3://my-cells-bucket \
102
104
  --listen 0.0.0.0:8080 \
103
105
  --internal-listen 10.0.0.12:8081 \
@@ -108,6 +110,9 @@ Use a secret manager rather than putting the value in `wrangler.jsonc`. Keep
108
110
  celld's internal listener on a trusted network; the World bearer token protects
109
111
  the worker RPC routes, not celld's administrative endpoints.
110
112
 
113
+ The example sets a fleet-wide maximum workflow age of 90 days. Leave
114
+ `WORKFLOW_RETENTION_MS` at `0` to disable that policy.
115
+
111
116
  More deployment detail is in [`celld-worker/README.md`](./celld-worker/README.md).
112
117
 
113
118
  ## How it works
@@ -118,6 +123,7 @@ Workflow application
118
123
  | authenticated HTTP RPC + binary stream batches
119
124
  v
120
125
  celld worker router
126
+ |-- scheduled hourly maximum-age retention discovery
121
127
  |-- WorkflowRunDO one cell per workflow run
122
128
  |-- RunCatalogDO 16 stable run-id shards; merged ordered listing
123
129
  |-- HookTokenDO 32 stable token-ownership shards
@@ -174,18 +180,59 @@ variable is shown below.
174
180
 
175
181
  The deployed worker also accepts these celld variables:
176
182
 
177
- | Variable | Default | Purpose |
178
- | --------------------------- | -------- | ---------------------------------------------------- |
179
- | `WORLD_SECRET` | none | Required bearer secret for RPC routes |
180
- | `WORKFLOW_CALLBACK_SECRET` | none | Sent with deliveries as `x-workflow-callback-secret` |
181
- | `QUEUE_MAX_ATTEMPTS` | `5` | Attempts before a message is dead-lettered |
182
- | `QUEUE_MAX_INFLIGHT` | `5` | Concurrent deliveries per queue cell (maximum `128`) |
183
- | `QUEUE_DELIVERY_TIMEOUT_MS` | `300000` | Callback timeout (maximum `300000`) |
183
+ | Variable | Default | Purpose |
184
+ | --------------------------------- | -------- | ---------------------------------------------------- |
185
+ | `WORLD_SECRET` | none | Required bearer secret for RPC routes |
186
+ | `WORKFLOW_CALLBACK_SECRET` | none | Sent with deliveries as `x-workflow-callback-secret` |
187
+ | `QUEUE_MAX_ATTEMPTS` | `5` | Attempts before a message is dead-lettered |
188
+ | `QUEUE_MAX_INFLIGHT` | `5` | Concurrent deliveries per queue cell (maximum `128`) |
189
+ | `QUEUE_DELIVERY_TIMEOUT_MS` | `300000` | Callback timeout (maximum `300000`) |
190
+ | `WORKFLOW_RETENTION_MS` | `0` | Maximum run age from creation; includes active runs |
191
+ | `WORKFLOW_RETENTION_BATCH_SIZE` | `128` | Runs admitted by each cron sweep (maximum `1000`) |
192
+ | `WORKFLOW_RETENTION_QUEUE_SHARDS` | `1` | Queue-shard fallback for older runs |
184
193
 
185
194
  `queueShards` is part of queue placement and is pinned when a queue cell is
186
- first used. Drain pending work before changing it.
187
-
188
- ## Terminal run retention
195
+ first used. It may be any positive safe integer; the `128` storage-operation
196
+ batch limit does not cap the fleet's total shard count. Drain pending work
197
+ before changing it.
198
+
199
+ Queue deadlines use fixed-width 13-digit epoch-millisecond keys. A requested
200
+ `delaySeconds` or handler redelivery timeout is accepted only when its deadline
201
+ is at most `9999999669998`, leaving 330,001 ms for a fresh alarm edge and the
202
+ maximum delivery lease. Every derived due, retry, inflight, and GC deadline is
203
+ checked against the absolute `9999999999999` limit. A production retry which
204
+ cannot preserve that headroom is dead-lettered instead of clamped or rescheduled;
205
+ the test pump terminates the equivalent in-memory message. Long test-mode waits
206
+ are chunked at the host timer limit without changing this deadline contract.
207
+
208
+ ## Workflow retention
209
+
210
+ ### Fleet-wide maximum age
211
+
212
+ Set the deployed worker's `WORKFLOW_RETENTION_MS` variable to expire every
213
+ workflow after a maximum age measured from `createdAt`. For example,
214
+ `7776000000` is 90 days. This policy applies to pending, running, completed,
215
+ failed, and cancelled runs.
216
+
217
+ The packaged worker declares an hourly UTC celld cron trigger. Each occurrence
218
+ scans one bounded creation-time catalog page and asks the authoritative run
219
+ cells to enforce the cutoff. A run cell immediately fences reads, writes, stream
220
+ activity, and queue work, removes its catalog entry, then finishes the existing
221
+ bounded stream, queue, and payload cleanup phases through its durable alarm.
222
+ Repeated cron invocations and alarm retries are idempotent.
223
+
224
+ One occurrence admits at most `WORKFLOW_RETENTION_BATCH_SIZE` runs (default
225
+ `128`, maximum `1000`). If the fleet was down or a shorter policy creates a
226
+ backlog, later occurrences continue with the next oldest entries. Edit
227
+ `triggers.crons` in the copied `celld-worker/wrangler.jsonc` if hourly discovery
228
+ does not provide the desired expiration resolution or catch-up rate.
229
+
230
+ New runs persist the application's `queueShards` value for complete queue
231
+ cleanup. `WORKFLOW_RETENTION_QUEUE_SHARDS` is the fallback for runs created
232
+ before that metadata existed and must match the placement used by those runs.
233
+ Both values may be any positive safe integer.
234
+
235
+ ### Terminal payload retention
189
236
 
190
237
  When `runRetentionMs` is greater than zero, a terminal transition atomically
191
238
  records the run's `expiredAt` and arms its cell alarm. The complete run, event,
@@ -219,7 +266,8 @@ await world.retention.rearm(runId); // recover a missed or abandoned alarm
219
266
 
220
267
  The retention deadline is pinned when the run becomes terminal. Changing the
221
268
  configuration affects newly terminal runs; call `schedule()` explicitly for
222
- an existing terminal run that has no cleanup record.
269
+ an existing terminal run that has no cleanup record. If terminal retention and
270
+ fleet-wide maximum age are both enabled, the earlier deadline wins.
223
271
 
224
272
  ## Operational notes
225
273
 
@@ -257,6 +305,33 @@ CELLD_WORLD_SECRET=replace-with-a-secret \
257
305
  pnpm test:integration
258
306
  ```
259
307
 
308
+ ### Real celld restart smoke
309
+
310
+ The required CI smoke owns native celld v0.3.0 and MinIO processes on loopback,
311
+ uses fresh temporary bucket and runtime state, and kills celld with `SIGKILL`
312
+ before deleting its local working state and starting a new process against the
313
+ bucket-backed state. It checks that:
314
+
315
+ - acknowledged run and stream state survives the process restart;
316
+ - an accepted delayed queue message that becomes due while celld is down is
317
+ delivered once after the alarm is restored;
318
+ - multi-page retention cleanup continues from a persisted nonterminal phase;
319
+ - cancelling an in-flight HTTP long poll leaves the stream writable and
320
+ readable.
321
+
322
+ Run the same bounded smoke locally on Linux x86-64 or macOS arm64:
323
+
324
+ ```sh
325
+ pnpm test:integration:celld-smoke
326
+ ```
327
+
328
+ The runner downloads celld and MinIO artifacts at pinned versions and verifies
329
+ their SHA-256 digests before use. MinIO does not implement the conditional-write
330
+ contract celld requires for production ownership fencing, so the smoke disables
331
+ the storage probe and runs exactly one celld process at a time. It proves the
332
+ single-process restart boundaries above, not multi-node ownership, handoff, or
333
+ failover correctness.
334
+
260
335
  ### Local MinIO performance and loss test
261
336
 
262
337
  The opt-in performance harness starts a fresh MinIO bucket and a single celld
@@ -265,7 +340,7 @@ message reaches a successful callback, including forced `503` redeliveries. A
265
340
  second workload creates terminal runs with streams and delayed queue messages,
266
341
  then verifies complete payload cleanup without resurrection. Results include
267
342
  queue and cleanup throughput plus p50, p95, p99, and maximum latency and are
268
- saved under `.perf-results/`.
343
+ saved under `.perf-results/`. The harness currently pins celld v0.3.0.
269
344
 
270
345
  > MinIO Community is **not a supported celld production store**. It does not
271
346
  > implement the conditional writes celld needs for ownership fencing. This
@@ -284,7 +359,7 @@ and force every twentieth message through one `503` redelivery.
284
359
 
285
360
  #### Reference result
286
361
 
287
- The following directional baseline was recorded on August 15, 2026. MinIO and
362
+ The following directional baseline was recorded on August 21, 2026. MinIO and
288
363
  celld ran as native arm64 processes because Docker was unavailable on the test
289
364
  machine; container results will differ.
290
365
 
@@ -292,21 +367,25 @@ machine; container results will differ.
292
367
  | ----------- | -------------------------------------------------------------------------------------------------------- |
293
368
  | Machine | MacBook Pro (Mac15,8), Apple M3 Max, 16 cores (12 performance, 4 efficiency), 64 GB RAM |
294
369
  | OS | macOS 26.5.2 (25F84), arm64 |
295
- | Services | celld v0.2.1; MinIO RELEASE.2025-09-07T16-13-09Z |
370
+ | Services | celld v0.3.0; MinIO RELEASE.2025-09-07T16-13-09Z |
296
371
  | Workload | 1,000 messages; concurrency 32; 2 queue shards; 256-byte target payload; every 20th message retried once |
297
372
 
298
373
  | Metric | Result |
299
374
  | ----------------------- | --------------------------------------------------------------------------------: |
300
375
  | Delivery integrity | 1,000 accepted, 1,000 delivered, 0 missing, 0 duplicate successes, 0 dead letters |
301
376
  | Callback attempts | 1,050, including 50 forced redeliveries |
302
- | Enqueue throughput | 882.55 messages/s |
303
- | Delivery throughput | 808.81 messages/s |
304
- | Enqueue latency | p50 24.37 ms; p95 75.60 ms; p99 176.67 ms; max 200.36 ms |
305
- | All delivery latency | p50 53.95 ms; p95 167.86 ms; p99 210.84 ms; max 312.03 ms |
306
- | First-attempt latency | p50 52.55 ms; p95 166.35 ms; p99 209.80 ms; max 212.01 ms |
307
- | Retried-message latency | p50 82.52 ms; p95 262.63 ms; p99 312.03 ms; max 312.03 ms |
377
+ | Enqueue throughput | 865.66 messages/s |
378
+ | Delivery throughput | 794.60 messages/s |
379
+ | Enqueue latency | p50 26.06 ms; p95 70.72 ms; p99 146.59 ms; max 157.70 ms |
380
+ | All delivery latency | p50 65.05 ms; p95 184.47 ms; p99 225.10 ms; max 328.75 ms |
381
+ | First-attempt latency | p50 63.65 ms; p95 177.93 ms; p99 209.38 ms; max 226.86 ms |
382
+ | Retried-message latency | p50 114.81 ms; p95 286.35 ms; p99 328.75 ms; max 328.75 ms |
308
383
  | Final queue state | 0 pending, 0 in flight, 0 dead letters across both shards |
309
384
 
385
+ The retention workload in the same run tombstoned 100 of 100 terminal runs,
386
+ expired all 100 reads, deleted 400 payload keys, 100 streams, and 100 delayed
387
+ queue messages, and left both queue shards empty.
388
+
310
389
  Use these numbers as a smoke-test reference, not a portable performance
311
390
  guarantee. For regression tracking, compare repeated runs on the same machine
312
391
  and runtime configuration. Two shards gave the best latency balance for this
@@ -19,11 +19,35 @@ celld deploy ./workflow-world --bucket s3://my-cells-bucket
19
19
 
20
20
  Requirements:
21
21
 
22
+ - celld v0.3.0 (the currently tested runtime baseline).
22
23
  - `esbuild` on PATH (celld shells out to it).
23
24
  - A bucket with conditional-write support (celld's fencing requirement).
24
25
  - `WORLD_SECRET` injected at the node level (`CELLD_VAR_WORLD_SECRET=...`) —
25
26
  the router fails closed with 503 while it is empty.
26
27
 
28
+ ## Fleet-wide retention
29
+
30
+ The bundled `wrangler.jsonc` declares an hourly UTC cron trigger. It does no
31
+ catalog work by default. Set `CELLD_VAR_WORKFLOW_RETENTION_MS` on every node to
32
+ enable a maximum workflow age measured from run creation:
33
+
34
+ ```sh
35
+ CELLD_VAR_WORKFLOW_RETENTION_MS=7776000000 \
36
+ celld --bucket s3://my-cells-bucket
37
+ ```
38
+
39
+ `7776000000` is 90 days. The policy includes pending and running workflows as
40
+ well as terminal ones. Each cron occurrence admits at most
41
+ `WORKFLOW_RETENTION_BATCH_SIZE` runs (default `128`); the existing per-run alarm
42
+ state machine finishes bounded index, stream, queue, and payload cleanup.
43
+
44
+ New runs persist the application's `queueShards` placement. Set
45
+ `WORKFLOW_RETENTION_QUEUE_SHARDS` to the historical positive-safe-integer
46
+ queue-shard count when cleaning runs created before this worker version. The
47
+ `128` multikey storage-operation limit is not a total-shard ceiling. Edit
48
+ `triggers.crons` in the copied config if hourly discovery is not the desired
49
+ resolution.
50
+
27
51
  Point the app at any node's public listener:
28
52
 
29
53
  ```ts
@@ -28,6 +28,10 @@
28
28
  ],
29
29
  },
30
30
  ],
31
+ // Fleet-wide maximum-age retention is discovered hourly. The handler is a
32
+ // no-op while WORKFLOW_RETENTION_MS is "0". Change this expression if a
33
+ // different sweep cadence is required; celld cron schedules are UTC.
34
+ "triggers": { "crons": ["0 * * * *"] },
31
35
  "vars": {
32
36
  // REQUIRED: bearer secret for the world's RPC and binary stream surface.
33
37
  // Authenticated routes fail closed with 503 while this is empty. Inject the real value
@@ -35,6 +39,14 @@
35
39
  "WORLD_SECRET": "",
36
40
  // Optional: forwarded as x-workflow-callback-secret on queue deliveries.
37
41
  "WORKFLOW_CALLBACK_SECRET": "",
42
+ // Optional fleet-wide maximum workflow age, measured from run creation.
43
+ // Applies to pending, running, and terminal runs. "0" disables it.
44
+ "WORKFLOW_RETENTION_MS": "0",
45
+ // Maximum runs admitted to cleanup by one hourly sweep (1..1000).
46
+ "WORKFLOW_RETENTION_BATCH_SIZE": "128",
47
+ // Must match createCelldWorld({ queueShards }) so every queue shard is
48
+ // included in cleanup for active runs discovered by the sweep.
49
+ "WORKFLOW_RETENTION_QUEUE_SHARDS": "1",
38
50
  // Optional queue tuning (strings): QUEUE_MAX_ATTEMPTS, QUEUE_MAX_INFLIGHT,
39
51
  // QUEUE_DELIVERY_TIMEOUT_MS.
40
52
  },
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { CreateEventParams, CreateEventRequest, Event, GetChunksOptions, Hook, RunCreatedEventRequest, Step, StreamChunksResponse, StreamInfoResponse, Streamer, TerminalWorkflowRunStatus, ValidQueueName, Wait, WorkflowRun, World } from "@workflow/world";
1
+ import { CreateEventParams, CreateEventRequest, Event, GetChunksOptions, Hook, RunCreatedEventRequest, Step, StreamChunksResponse, StreamInfoResponse, Streamer, TerminalWorkflowRunStatus, ValidQueueName, Wait, WorkflowRun, WorkflowRunStatus, World } from "@workflow/world";
2
2
  //#region src/retention.d.ts
3
3
  type CleanupPhase = 'retained' | 'index' | 'streams' | 'queues' | 'payload' | 'tombstoned';
4
4
  interface CleanupRecord {
@@ -6,8 +6,13 @@ interface CleanupRecord {
6
6
  runId: string;
7
7
  workflowName: string;
8
8
  createdAt: Date;
9
- completedAt: Date;
10
- terminalStatus: TerminalWorkflowRunStatus;
9
+ /** Last status observed when cleanup was scheduled. */
10
+ status?: WorkflowRunStatus;
11
+ /** Present when cleanup was scheduled for a terminal run. */
12
+ completedAt?: Date;
13
+ /** Retained for persisted terminal-retention records created before max-age cleanup. */
14
+ terminalStatus?: TerminalWorkflowRunStatus;
15
+ reason?: 'terminal-retention' | 'maximum-age' | 'manual';
11
16
  dueAt: Date;
12
17
  queueShards: number;
13
18
  phase: CleanupPhase;
@@ -24,8 +29,10 @@ interface CleanupRecord {
24
29
  interface RunTombstone {
25
30
  version: 1;
26
31
  runId: string;
27
- terminalStatus: TerminalWorkflowRunStatus;
28
- completedAt: Date;
32
+ /** Last status observed before the run expired. */
33
+ status?: WorkflowRunStatus;
34
+ completedAt?: Date;
35
+ terminalStatus?: TerminalWorkflowRunStatus;
29
36
  expiredAt: Date;
30
37
  tombstonedAt: Date;
31
38
  /** Final cleanup accounting retained inside the single authoritative record. */
@@ -54,7 +61,6 @@ interface ReleaseHookIndexesResult {
54
61
  }
55
62
  interface ExpireRunIndexesRequest {
56
63
  runId: string;
57
- keys: string[];
58
64
  hooks: HookIndexReference[];
59
65
  expiredAt: number;
60
66
  }
@@ -357,13 +363,17 @@ interface QueueCellNamespace {
357
363
  interface IndexListOptions {
358
364
  prefix?: string;
359
365
  cursor?: string;
366
+ /** Exclusive upper bound for creation-time retention scans. */
367
+ end?: string;
360
368
  limit?: number;
361
369
  reverse?: boolean;
362
370
  }
363
371
  interface IndexListPage {
372
+ /** sourceShard is populated by the merged fleet index for exact follow-up mutation. */
364
373
  keys: Array<{
365
374
  name: string;
366
375
  value: string;
376
+ sourceShard?: string;
367
377
  }>;
368
378
  list_complete: boolean;
369
379
  cursor?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../src/retention.ts","../src/apply-event.ts","../src/storage.ts","../src/stream-protocol.ts","../src/streamer.ts","../src/queue.ts","../src/indexes.ts","../src/config.ts","../src/index.ts"],"mappings":";;KAOY;UAEK;EACf;EACA;EACA;EACA,WAAW;EACX,aAAa;EACb,gBAAgB;EAChB,OAAO;EACP;EACA,OAAO;;EAEP;EACA;EACA;EACA,gBAAgB;EAChB,eAAe;EACf;EACA;EACA;;UAGe;EACf;EACA;EACA,gBAAgB;EAChB,aAAa;EACb,WAAW;EACX,cAAc;;EAEd,SAAS;;KAGC;KAEA,eAAe;EACrB;EAAU,OAAO;;E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,IAAI;IAAM;MAAuB;;;;UCnGlB;EACf;EACA;EACA;EACA;;UAGe;EACf,MAAM;IAAQ;IAAc;;EAC5B;EACA;;UAkBe;EACf;EACA;EACA;;KAGU;EACN;EAAgB,aAAa;;EAC7B;EAAiB,QAAQ;;;UAgDd;EACf,UACE,KAAK,aACL,4BACA,+BACC;IAAU;;EACb,SAAS,UAAU,mBAAmB,QAAQ;EAC9C,eAAe,gBAAgB;EAC/B,YAAY,iBAAiB;EAC7B,YAAY,eAAe,OAAO,iBAAiB,QAAQ;EAC3D,oBACE,eACA,gBACA,wBACA,OAAO,gBACP,cAAc,kBACb;EACH,uBACE,eACA,OAAO,gBACP,aAAa,kBACZ;EACH,mBAAmB,SAAS,4BAA4B,QAAQ;EAChE,UAAU,SAAS,0BAA0B,QAAQ;;;;;KCnH3C,iBAAiB;UAEZ;EACf;EACA;;UAGe;EACf,aAAa;EACb,gBAAgB;EAChB,gBAAgB;EAChB,kBAAkB;;UAGH;;;;;;;EAOf;;;;;EAKA;;;;;EAKA,MAAM;;EAEN;;;;;;EAMA;;EAEA;;;;;;EAMA;;EAEA;;EAEA;;EAEA;;;;UCpBe;EACf,UAAU,gBAAgB,QAAQ;EAClC,SAAS,gBAAgB,QAAQ;EACjC,WAAW,gBAAgB,QAAQ;EACnC,MAAM,gBAAgB,QAAQ;;KAGpB,aAAa,QAAQ;EAAkB,WAAW;;iBAE9C,iBAAiB,SAAS,mBAAmB"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/retention.ts","../src/apply-event.ts","../src/storage.ts","../src/stream-protocol.ts","../src/streamer.ts","../src/queue.ts","../src/indexes.ts","../src/config.ts","../src/index.ts"],"mappings":";;KAOY;UAEK;EACf;EACA;EACA;EACA,WAAW;;EAEX,SAAS;;EAET,cAAc;;EAEd,iBAAiB;EACjB;EACA,OAAO;EACP;EACA,OAAO;;EAEP;EACA;EACA;EACA,gBAAgB;EAChB,eAAe;EACf;EACA;EACA;;UAGe;EACf;EACA;;EA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