@jive-sh/workflow-platform 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/README.md +184 -2
  2. package/dist/budget-states.js +30 -0
  3. package/dist/budget-states.js.map +1 -0
  4. package/dist/cpu-limit/limiter.js +795 -0
  5. package/dist/cpu-limit/limiter.js.map +1 -0
  6. package/dist/cpu-limit/use.js +139 -0
  7. package/dist/cpu-limit/use.js.map +1 -0
  8. package/dist/failure.js +35 -0
  9. package/dist/failure.js.map +1 -0
  10. package/dist/graph.js +10 -0
  11. package/dist/graph.js.map +1 -0
  12. package/dist/index.js +129 -0
  13. package/dist/index.js.map +1 -0
  14. package/dist/keep-running.js +67 -0
  15. package/dist/keep-running.js.map +1 -0
  16. package/dist/pick-wakes.js +118 -0
  17. package/dist/pick-wakes.js.map +1 -0
  18. package/dist/project.js +6 -0
  19. package/dist/project.js.map +1 -0
  20. package/dist/reasons.js +33 -0
  21. package/dist/reasons.js.map +1 -0
  22. package/dist/step-files.js +200 -0
  23. package/dist/step-files.js.map +1 -0
  24. package/dist/step-meter.js +97 -0
  25. package/dist/step-meter.js.map +1 -0
  26. package/dist/step-usage.js +19 -0
  27. package/dist/step-usage.js.map +1 -0
  28. package/dist/steps.js +599 -0
  29. package/dist/steps.js.map +1 -0
  30. package/dist/storage/budgets.js +46 -0
  31. package/dist/storage/budgets.js.map +1 -0
  32. package/dist/storage/engine-records.js +75 -0
  33. package/dist/storage/engine-records.js.map +1 -0
  34. package/dist/storage/engine-storage.js +67 -0
  35. package/dist/storage/engine-storage.js.map +1 -0
  36. package/dist/storage/input-records.js +12 -0
  37. package/dist/storage/input-records.js.map +1 -0
  38. package/dist/storage/move-store.js +251 -0
  39. package/dist/storage/move-store.js.map +1 -0
  40. package/dist/storage/sqlite-store.js +605 -0
  41. package/dist/storage/sqlite-store.js.map +1 -0
  42. package/dist/storage/step-records.js +11 -0
  43. package/dist/storage/step-records.js.map +1 -0
  44. package/dist/storage/storage-error.js +19 -0
  45. package/dist/storage/storage-error.js.map +1 -0
  46. package/dist/storage/task-store.js +2 -0
  47. package/dist/storage/task-store.js.map +1 -0
  48. package/dist/tasks.js +459 -0
  49. package/dist/tasks.js.map +1 -0
  50. package/dist/views/format.js +35 -0
  51. package/dist/views/format.js.map +1 -0
  52. package/dist/views/runs-now.js +46 -0
  53. package/dist/views/runs-now.js.map +1 -0
  54. package/dist/views/step-funnel.js +98 -0
  55. package/dist/views/step-funnel.js.map +1 -0
  56. package/dist/views/step-graph.js +34 -0
  57. package/dist/views/step-graph.js.map +1 -0
  58. package/dist/views/workflow-flows.js +53 -0
  59. package/dist/views/workflow-flows.js.map +1 -0
  60. package/dist/views/workflows-view.js +140 -0
  61. package/dist/views/workflows-view.js.map +1 -0
  62. package/package.json +26 -4
  63. package/src/budget-states.ts +55 -0
  64. package/src/cpu-limit/limiter.ts +882 -0
  65. package/src/cpu-limit/use.ts +166 -0
  66. package/src/failure.ts +36 -0
  67. package/src/graph.ts +25 -0
  68. package/src/index.ts +161 -0
  69. package/src/keep-running.ts +74 -0
  70. package/src/pick-wakes.ts +167 -0
  71. package/src/project.ts +80 -0
  72. package/src/reasons.ts +30 -0
  73. package/src/step-files.ts +208 -0
  74. package/src/step-meter.ts +120 -0
  75. package/src/step-usage.ts +23 -0
  76. package/src/steps.ts +864 -0
  77. package/src/storage/budgets.ts +68 -0
  78. package/src/storage/engine-records.ts +102 -0
  79. package/src/storage/engine-storage.ts +82 -0
  80. package/src/storage/input-records.ts +43 -0
  81. package/src/storage/move-store.ts +265 -0
  82. package/src/storage/sqlite-store.ts +700 -0
  83. package/src/storage/step-records.ts +292 -0
  84. package/src/storage/storage-error.ts +35 -0
  85. package/src/storage/task-store.ts +137 -0
  86. package/src/tasks.ts +556 -0
  87. package/src/views/format.ts +37 -0
  88. package/src/views/runs-now.ts +101 -0
  89. package/src/views/step-funnel.ts +163 -0
  90. package/src/views/step-graph.ts +68 -0
  91. package/src/views/workflow-flows.ts +97 -0
  92. package/src/views/workflows-view.ts +303 -0
package/README.md CHANGED
@@ -1,3 +1,185 @@
1
- # Temporary Holding Version
1
+ # @jive-sh/workflow-platform
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Durable workflows on Effect's workflow engine (`effect/workflow`), where every step of every run is measured and every
4
+ item a workflow works on is a task in a queue.
5
+
6
+ A project defines its workflows here and supplies only what it alone knows: its files, its process runner, its words for
7
+ items. The platform does the rest the same way for every workflow:
8
+
9
+ - **One way to define a workflow and its steps.** Each step says whether it uses an agent, what it may write, and which
10
+ step can follow it. Nothing else defines a step.
11
+ - **Every step is measured, never self-reported.** Time, tokens, CPU (its own and its child processes'), peak memory,
12
+ files written and compiles go on one record per step run, per item.
13
+ - **Every item is a task**, with an append-only log of notes and a bucket the platform derives: queued, running, waiting,
14
+ stuck, held or done. A workflow declares its items and each run's outcome; the queue order, the stuck rule (over 10 runs
15
+ with no success) and the waits are the platform's.
16
+ - **Waiting is event-driven.** A Pick with nothing to claim waits for an event that can change that (a note, a new item,
17
+ a run ending, a budget change) and never polls.
18
+ - **A run limit on every workflow, and an agents' limit where it has agent steps.** Every start of every workflow, however it
19
+ starts (a timer, its inputs changing, its queue, a request), passes its run limit (`steps.ts` `gatedExecute`): a new run
20
+ starts only while fewer are going, 0 starts none, and none set is no limit, or for a workflow with an agent step and a list
21
+ of work its agents' limit. That kind of workflow also keeps its run limit's number of runs going, and at most its agents'
22
+ limit of them are in an agent step at once: a run at an agent step with no agent free waits there, its task kept and its
23
+ record saying so, until a limit is set. At 0 agents nothing gets past a first agent step. Setting either limit or a pause
24
+ (`runPlanChanged`) has the run planner plan again at once.
25
+ - **Where work flows between workflows, from declarations and records.** A workflow names the ones whose results it works
26
+ on (`fedBy`); new input one gives another (`giveNewInput`) and the waits its list names are recorded. The view turns them
27
+ into a DAG's edges (`views/workflow-flows.ts`): feeds, sends back (to one upstream), gives input, waits on.
28
+ - **Each queue's history.** As the view is built, each workflow's counts per bucket are stored where they changed
29
+ (`queue_counts`), and the dashboard draws them.
30
+ Nothing else decides how many run, and a page can set both (`WorkflowsDashboard`'s `setLimit`).
31
+ - **Runs only when their inputs change.** A workflow declares what it runs on (`inputs`); its trigger starts a run only
32
+ when their fingerprint differs from its last successful run's, whose result stands meanwhile. A timer is only the fallback
33
+ that checks. A workflow with a list of work can declare what each task runs on (`taskInputs`): each outcome records the
34
+ task's fingerprint as its run left it, and a task whose inputs and notes have not changed since waits for them to.
35
+ - **A reason with every outcome.** Each step record says why it ended as it did; the dashboard counts endings per step,
36
+ where runs stopped and why, what each workflow yields per run, per million tokens and per compile against the window
37
+ before, and what a run costs, its child processes included.
38
+ - **A declared step graph.** Each workflow names which step can follow which and when; a run that takes another edge fails
39
+ in tests.
40
+ - **One CPU limit.** Every heavy process of the project holds a slot of one pool from before it starts until it exits, and
41
+ running work is paused while what the project uses is over the limit (`makeCpuLimiter`). The project says only what it
42
+ alone knows: where its pool lives, which commands are light, which processes are its own. The dashboard shows where the
43
+ project stands against it.
44
+ - **Storage is behind interfaces, in one database.** Step records, tasks, input runs, both limits and the engine's own
45
+ records each have an interface and a SQLite implementation. Every call is an effect that fails with `StorageError`, so
46
+ another database (Convex) can stand behind any of them; a step whose record cannot be written goes on and says so. The
47
+ platform's tables, the CPU limit's pool and the engine's records live in the project's own database, beside the schema
48
+ the project declares (`STORAGE.md`); a held lock is tried again while yielding, never waited on inside SQLite. The
49
+ engine gets that from `lockRetryingSingleRunner`, effect/cluster's single runner on SQL storage whose every call is
50
+ retried this way, with a client set to wait 0 ms (`busyTimeout: Duration.zero`).
51
+
52
+ It runs today inside the aoe2-in-browser decompilation service, its first project
53
+ (`aoe2-in-browser/decomp-service/src/workflows/platform.ts`).
54
+
55
+ ## A first workflow
56
+
57
+ ```ts
58
+ import { createWorkflowPlatform, sqliteStorage, RUN_STARTS, RUN_ENDS } from '@jive-sh/workflow-platform';
59
+ import { Effect, Schema } from 'effect';
60
+
61
+ const platform = createWorkflowPlatform<'main', never>({
62
+ project: {
63
+ sourceRoot: ROOT,
64
+ tree: { root: ROOT, snapshots: `${ROOT}/local/step-files`, notTree: ['local'] },
65
+ texts: { write: storeText, read: readText },
66
+ runLightNow,
67
+ processes: { thisProcess, isAlive },
68
+ stepRecordVariable: 'MY_STEP_RECORD',
69
+ isTransientFailure: (e) => String(e).includes('database is locked'),
70
+ },
71
+ storage: sqliteStorage({ stepRecordsFile: () => `${ROOT}/local/app.db`, engineFile: () => `${ROOT}/local/app.db`, budgetsFile: () => `${ROOT}/local/app.db`, processes: { thisProcess, isAlive } }),
72
+ rules: { urgent: () => false },
73
+ });
74
+ const { defineStep, defineWorkflow } = platform.steps;
75
+
76
+ const COUNT = defineStep({ name: 'Count', agent: false, shared: true, description: 'Counts the files.', at: import.meta.path, success: Schema.Number });
77
+
78
+ export const CountFiles = defineWorkflow({
79
+ phase: 'main', item: null, description: 'Counts the files.', at: import.meta.path, steps: () => [COUNT],
80
+ graph: () => [{ from: RUN_STARTS, to: COUNT.name, when: 'each run' }, { from: COUNT.name, to: RUN_ENDS, when: 'always' }],
81
+ })('Count files', { payload: { turn: Schema.Number }, idempotencyKey: ({ turn }) => String(turn), success: Schema.Number, error: Schema.String });
82
+
83
+ export const CountFilesLive = CountFiles.toLayer(() => COUNT.run(Effect.succeed(42)));
84
+ ```
85
+
86
+ The step's record (start, end, outcome, CPU) is written by `COUNT.run`; the workflow body has no measuring code.
87
+
88
+ ## Installing it
89
+
90
+ ```sh
91
+ bun add @jive-sh/workflow-platform effect
92
+ ```
93
+
94
+ It runs on Bun (its stores are `bun:sqlite`) and shares its consumer's `effect` 4, a peer dependency. Each push to `main`
95
+ with a new version publishes it to npm through Jive's pipeline (`.github/workflows/pipeline.yml`, the six `jive:cicd:*`
96
+ scripts of `jive-abstract-library`); a push without a version bump publishes nothing.
97
+
98
+ ## Using it from a checkout
99
+
100
+ The package runs inside its consumer's processes and must share their one copy of `effect`, so a checkout beside its
101
+ consumer has no packages of its own: `node_modules` here is a link to the consumer's (`aoe2-in-browser/install/setup.ts`
102
+ makes it). Never run `bun install` in such a checkout: it would write through the link into the consumer's packages. The
103
+ pipeline installs the package's own devDependencies from `bun.lock`, on a clean runner. The consumer imports
104
+ it by path, through its tsconfig (`"@jive-sh/workflow-platform": ["../../workflow-platform/src/index.ts"]`).
105
+
106
+ ```sh
107
+ bun test # the package's own tests
108
+ node_modules/.bin/tsc --noEmit # its typecheck
109
+ ```
110
+
111
+ ## Modules
112
+
113
+ Each module's inputs come from `createWorkflowPlatform` (`src/index.ts`), which builds them in this order.
114
+
115
+ | Module | What it does | Takes | Gives |
116
+ |---|---|---|---|
117
+ | `project.ts` | What a project tells the platform about itself | n/a | `WorkflowProject`, `ProcessIdentity`, `UsageSink`, `TextStore`, `ProjectTree` |
118
+ | `storage/storage-error.ts` | What every store call fails with, and a synchronous store's calls as effects | a store's calls | `StorageError`, `storeCall`, `storeCalls` |
119
+ | `storage/step-records.ts` | The step records' interface: one record per step run, and every read of them | n/a | `StepRecords`, its row types, `noSpend`, `StepScope` |
120
+ | `storage/task-store.ts` | The task store's interface: tasks, their append-only notes, their listing | n/a | `TaskStore`, `TaskNote`, `TaskRef`, `Listed` |
121
+ | `storage/engine-records.ts` | Which runs the engine has not finished, from its `cluster_*` tables | the engine's file | `EngineRecords`, `sqliteEngineRecords`, `ensureEngineIndexes` |
122
+ | `storage/budgets.ts` | Each workflow's two limits: runs going and agents in an agent step | the file with `workflow_budgets` | `LimitStore`, `runLimit`, the limit SQL |
123
+ | `storage/input-records.ts` | What each run ran on and how it ended; the check of re-runs on unchanged inputs | runs a trigger started | `InputRecords`, `rerunsOnUnchangedInputs` |
124
+ | `reasons.ts` | Why a step ended as it did, in a line, read from its result | a step's result | `standardReason`, `oneLine` |
125
+ | `storage/sqlite-store.ts` | Step records, tasks and input runs in the project's database | its file, the project's processes, the file they moved from | `sqliteStore`, `applyStepRecordsSchema` |
126
+ | `storage/move-store.ts` | The live move of the step records and tasks, and of the engine's records, from files of their own into the project's database | both files | `moveRecordsInto`, `catchUpMove`, `engineFileFree`, `moveEngineInto`, `movedInto` |
127
+ | `storage/engine-storage.ts` | The engine's message and runner storage in the project's database, every call tried again while yielding on a held lock | a SQL client that waits 0 ms | `lockRetryingSingleRunner`, `lockRetryingMessageStorage`, `lockRetryingRunnerStorage`, `retryHeldLock`, `isHeldLock` |
128
+ | `pick-wakes.ts` | What wakes a waiting Pick, and a minute's count of wakes by source | n/a | `PickWakes` |
129
+ | `step-meter.ts` | Measures what a step uses: CPU, memory, compiles, files | process usage, files written | `StepMeter` |
130
+ | `step-usage.ts` | Which step a piece of code works for, so its processes' usage reaches it | the step-record variable | `CurrentStepUsage` |
131
+ | `step-files.ts` | What an agent step changed in the tree, and taking it back | the project's tree | `StepFiles`, `filesChanged` |
132
+ | `tasks.ts` | The queue's rules (buckets, order, list view) and the task writes | task store, engine records, step records, wakes, texts, rules | `Tasks`, `queueOrder`, `bucketView`, `PendingWork` |
133
+ | `steps.ts` | `defineWorkflow`, `defineStep`, `defineItemTest`: running and recording every step | every store above | `Steps` |
134
+ | `keep-running.ts` | The trigger's plan: how many runs of each budgeted workflow to start | declarations, budgets, pauses, runs going | `planRunStarts`, `oneTurnAtATime` |
135
+ | `budget-states.ts` | Each budget against the runs it has, for a page | budgets, runs | `workflowBudgetStates` |
136
+ | `failure.ts` | A failure as one line of text | any failure | `describeFailure`, `startAndEnd` |
137
+ | `cpu-limit/use.ts` | The CPU limit's arithmetic: room to start, what project work uses, what to pause | `ps` output, the pool's counts | `roomInThreads`, `readUse`, `pauseOrResume` |
138
+ | `cpu-limit/limiter.ts` | The CPU limit: the slot pool, the line, readings of use, holding work to the limit, the one way to start a process | the project's facts (`CpuLimiterFacts`) | `makeCpuLimiter`, `CpuLimiter` |
139
+ | `graph.ts` | A workflow's declared step graph and the check of a move against it; no dependencies, so a page can import it | declared edges, a run's last step | `StepEdge`, `edgeDeclared`, `RUN_STARTS`, `RUN_ENDS` |
140
+ | `views/runs-now.ts` | Where each unfinished run is now: the step it is in or waits after, and what a waiting step waits on | unfinished runs, their newest step records, the phase order | `runsNow`, `PhaseRunsNow` |
141
+ | `views/step-funnel.ts` | For each step, the window's runs that reached it, stopped or finished there, and why most stopped | the window's step records and item outcomes | `stepFunnel` |
142
+ | `views/step-graph.ts` | The declared graph with the window's runs on each edge, and the moves it does not declare | declarations, the window's moves | `workflowGraphs` |
143
+ | `views/workflows-view.ts` | Every workflow as the dashboard shows it: steps with their cost, graph, funnel, queue, budget | every store | `buildWorkflowsView`, `WorkflowsView` (also `platform.view`) |
144
+ | `dashboard/` | React components for a project's page: `WorkflowsDashboard`, which a project gives its own header, panels and phase names; `dashboard.css` | the view and runs now, as JSON | `@jive-sh/workflow-platform/dashboard`, from a linked checkout |
145
+
146
+ `src/imports.test.ts` fails on any import from outside this package other than effect, Bun and Node (and, in a test, the
147
+ SQL client it runs the engine on), and on a dashboard file importing anything but React, its own folder, `graph.ts`,
148
+ `views/format.ts` and other modules' types.
149
+
150
+ ## Limits
151
+
152
+ - The CPU limit's pool (`cpu-limit/limiter.ts`) is not behind a store interface: it is this machine's, read every 250 ms,
153
+ and opened by a project's setup before anything is installed, `effect` included.
154
+ - A project still writes each workflow's limits with its own statements (`storage/budgets.ts`) and keeps its pauses itself,
155
+ and the engine's own writes are effect/cluster's `MessageStorage`: a store elsewhere needs its own of each.
156
+ - Some stored names keep the first project's words: the per-item part table is `step_functions`, and a step with per-item
157
+ parts has scope `'functions'`.
158
+ - Wakes reach only the Picks of the process that raised them, and another process's only through the project's relay
159
+ (`relayTo`, then `wake` there).
160
+ - A task's inputs changed by anything but a note, a listing or one of its workflow's runs ending (another workflow's write,
161
+ say) wake no waiting Pick: the next of those events reads them.
162
+ - A run waiting at an agent step keeps its task for as long as it waits; a lease the project keeps on the item itself can
163
+ run out meanwhile.
164
+ - The scheduler's job ledger (which job turn is due) is still the first project's own.
165
+
166
+ ## The dashboard
167
+
168
+ A project serves `{ view, runsNow, cpu, limitsNow }` as JSON (`platform.view(...)`, stored on a schedule since it reads a day of records,
169
+ and `runsNow` read at each request) and renders `WorkflowsDashboard` on a page of its own, which brings React. It draws:
170
+
171
+ - each queue over time, small, the lines the reader chooses kept in the browser (`dashboard/queue-chart.tsx`);
172
+ - the workflows as a DAG, a node per workflow in its stage's row, its queue's progress, what starts it, its runs and limits,
173
+ and its steps when opened (`dashboard/workflow-dag.tsx`).
174
+
175
+ ```tsx
176
+ import { usePolledJson, WorkflowsDashboard, type WorkflowsPageData } from '@jive-sh/workflow-platform/dashboard';
177
+
178
+ const { data, error } = usePolledJson<WorkflowsPageData>('/api/platform/workflows', 10_000);
179
+ <WorkflowsDashboard data={data} error={error} sourceHref={(s) => `/source?path=${s.path}#L${s.line}`} panels={<MyPanels />} setLimit={storeLimit} />
180
+ ```
181
+
182
+ The dashboard has no React of its own: in a Next.js page, link this package's checkout into the app's `node_modules`, add
183
+ it to `turbopackAdditionalRoots`, and alias `react` to the app's copy (`aoe2-in-browser/decomp-dashboard/next.config.ts`).
184
+ It is not in the npm release: it lives in `dashboard/`, beside `src/`, because the release ships `src/` alone and its build
185
+ (`jive-abstract-library`) compiles `src/` with no JSX and exports the main entry only.
@@ -0,0 +1,30 @@
1
+ /** WHAT EACH BUDGETED WORKFLOW'S LIMITS ASK FOR AGAINST WHAT IT HAS, for a dashboard and the route that sets a limit. Pure. */
2
+ import { runLimit } from './storage/budgets';
3
+ export const workflowBudgetStates = (workflows, budgets, work, assigned) => workflows.map((w) => {
4
+ const row = budgets.find((b) => b.workflow === w.name);
5
+ const runs = assigned.filter((a) => a.workflow === w.name);
6
+ const limits = { agents: row?.budget ?? 0, runs: row?.runs ?? null };
7
+ return {
8
+ workflow: w.name, phase: w.phase, budget: limits.agents, runs: runLimit(limits),
9
+ changedAt: row?.changed_at ?? 0, running: runs.length,
10
+ items: work.find((x) => x.workflow === w.name)?.items ?? 0,
11
+ newestStart: runs.length === 0 ? null : Math.max(...runs.map((r) => r.started)),
12
+ };
13
+ });
14
+ /** Fewer runs going than its run limit: a run with nothing to pick waits for an item, so work or none, it is a fault. */
15
+ export const belowBudget = (w) => w.running < w.runs;
16
+ /**
17
+ * Whether the trigger started a run above the run limit. Every run going now had started by the newest one's start, so that
18
+ * many were going then; if the limit was already this one, that start went over it. Runs above a limit lowered after they
19
+ * started are finishing their call, and end before the next.
20
+ */
21
+ export const startedAboveBudget = (w) => w.running > w.runs && w.newestStart !== null && w.newestStart > w.changedAt;
22
+ /** Why the route refuses a limit, with its status; null when it takes it. `budgeted` is every workflow with limits. */
23
+ export const budgetRefusal = (workflow, asked, budget, budgeted) => {
24
+ if (workflow === null)
25
+ return { status: 404, error: `no workflow ${asked}` };
26
+ if (!budgeted.includes(workflow))
27
+ return { status: 409, error: `${workflow} has no agent step and no list of work, so it has no budget` };
28
+ return typeof budget === 'number' && Number.isInteger(budget) && budget >= 0 ? null : { status: 400, error: 'budget must be a whole number, 0 or more' };
29
+ };
30
+ //# sourceMappingURL=budget-states.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"budget-states.js","sourceRoot":"","sources":["../../../src/budget-states.ts"],"names":[],"mappings":"AAAA,+HAA+H;AAC/H,OAAO,EAAE,QAAQ,EAA0B,MAAM,mBAAmB,CAAC;AAmBrE,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAClC,SAA2E,EAC3E,OAAyC,EACzC,IAA0E,EAC1E,QAAgF,EAC5C,EAAE,CACtC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;IAClB,MAAM,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC;IACvD,MAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC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