@substrat-run/kernel 0.148.0 → 0.150.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 (80) hide show
  1. package/dist/attachment-sweep.d.ts +281 -0
  2. package/dist/attachment-sweep.d.ts.map +1 -0
  3. package/dist/attachment-sweep.js +480 -0
  4. package/dist/attachment-sweep.js.map +1 -0
  5. package/dist/index.d.ts +15 -9
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +11 -7
  8. package/dist/index.js.map +1 -1
  9. package/dist/invocation-line.d.ts +85 -0
  10. package/dist/invocation-line.d.ts.map +1 -1
  11. package/dist/invocation-line.js +43 -0
  12. package/dist/invocation-line.js.map +1 -1
  13. package/dist/migration-digest.d.ts +56 -0
  14. package/dist/migration-digest.d.ts.map +1 -1
  15. package/dist/migration-digest.js +92 -0
  16. package/dist/migration-digest.js.map +1 -1
  17. package/dist/migration-fence.d.ts +14 -0
  18. package/dist/migration-fence.d.ts.map +1 -0
  19. package/dist/migration-fence.js +515 -0
  20. package/dist/migration-fence.js.map +1 -0
  21. package/dist/migration-replay.d.ts +52 -0
  22. package/dist/migration-replay.d.ts.map +1 -0
  23. package/dist/migration-replay.js +140 -0
  24. package/dist/migration-replay.js.map +1 -0
  25. package/dist/module-migrations.d.ts +3 -3
  26. package/dist/module-migrations.js +3 -3
  27. package/dist/peer.d.ts +32 -2
  28. package/dist/peer.d.ts.map +1 -1
  29. package/dist/peer.js +99 -3
  30. package/dist/peer.js.map +1 -1
  31. package/dist/permission-eval.d.ts +8 -0
  32. package/dist/permission-eval.d.ts.map +1 -1
  33. package/dist/permission-eval.js +14 -0
  34. package/dist/permission-eval.js.map +1 -1
  35. package/dist/platform-sweep.d.ts +116 -2
  36. package/dist/platform-sweep.d.ts.map +1 -1
  37. package/dist/platform-sweep.js +142 -0
  38. package/dist/platform-sweep.js.map +1 -1
  39. package/dist/promote-review.d.ts +125 -0
  40. package/dist/promote-review.d.ts.map +1 -0
  41. package/dist/promote-review.js +181 -0
  42. package/dist/promote-review.js.map +1 -0
  43. package/dist/scope-host.d.ts +204 -42
  44. package/dist/scope-host.d.ts.map +1 -1
  45. package/dist/scope-host.js.map +1 -1
  46. package/dist/scope-store.d.ts +5 -5
  47. package/dist/scope-store.d.ts.map +1 -1
  48. package/dist/spine-restore.d.ts +2 -0
  49. package/dist/spine-restore.d.ts.map +1 -1
  50. package/dist/spine-restore.js +5 -0
  51. package/dist/spine-restore.js.map +1 -1
  52. package/dist/store-driver-releases.d.ts +306 -0
  53. package/dist/store-driver-releases.d.ts.map +1 -0
  54. package/dist/store-driver-releases.js +581 -0
  55. package/dist/store-driver-releases.js.map +1 -0
  56. package/dist/table-ownership.d.ts +5 -2
  57. package/dist/table-ownership.d.ts.map +1 -1
  58. package/dist/table-ownership.js +19 -10
  59. package/dist/table-ownership.js.map +1 -1
  60. package/dist/testing.d.ts +2 -0
  61. package/dist/testing.d.ts.map +1 -1
  62. package/dist/testing.js +2 -0
  63. package/dist/testing.js.map +1 -1
  64. package/dist/upload-link.d.ts +60 -7
  65. package/dist/upload-link.d.ts.map +1 -1
  66. package/dist/upload-link.js +189 -25
  67. package/dist/upload-link.js.map +1 -1
  68. package/dist/version-migrations.d.ts +63 -1
  69. package/dist/version-migrations.d.ts.map +1 -1
  70. package/dist/version-migrations.js +174 -8
  71. package/dist/version-migrations.js.map +1 -1
  72. package/dist/vertical-scope-stores.d.ts +9 -9
  73. package/dist/vertical-scope-stores.d.ts.map +1 -1
  74. package/dist/vertical-scope-stores.js +29 -29
  75. package/dist/vertical-scope-stores.js.map +1 -1
  76. package/package.json +2 -2
  77. package/dist/store-kind-releases.d.ts +0 -137
  78. package/dist/store-kind-releases.d.ts.map +0 -1
  79. package/dist/store-kind-releases.js +0 -252
  80. package/dist/store-kind-releases.js.map +0 -1
@@ -0,0 +1,281 @@
1
+ import type { ScopedSql, TenantBlobStore } from './scope-host.js';
2
+ /**
3
+ * The orphan-byte sweep (#2314): delete attachment bytes that no `_substrat_attachments` row
4
+ * points at, written ONCE for both adapters.
5
+ *
6
+ * An attachment write puts the bytes first and the row second, so a crash between the two, a
7
+ * transport failure whose commit is unknown (#2311 keeps the bytes on doubt, K-54) and a PITR
8
+ * rewind past a row all leave an object nobody reads. The one thing this sweep must never do is
9
+ * delete bytes whose row committed, or whose row a restore can still bring back. Four guards
10
+ * hold that, each on its own:
11
+ *
12
+ * 1. **A tombstone is the linearization point.** The scope does not delete; it CONDEMNS. In one
13
+ * scope transaction it records each candidate that has no row in `_substrat_attachment_condemned`,
14
+ * and the attachment insert refuses a condemned id in ITS transaction
15
+ * (`refuseCondemnedAttachment`). The scope serializes the two, so either the row commits first
16
+ * and the condemnation sees it and skips the id, or the condemnation commits first and the row
17
+ * is refused: the upload fails and nothing commits without its bytes. Only a condemned id's
18
+ * object is ever deleted. No clock and no timing is involved, so a slow upload, a retried call
19
+ * or a skewed clock cannot turn a committed row into a deleted object.
20
+ * 2. **An age floor.** Only an object whose id (a ULID minted just before its `put`) is older than
21
+ * `graceMs` is a candidate, so an upload still in flight is never condemned in the first place
22
+ * and therefore never refused. The floor is courtesy, guard 1 is safety.
23
+ * 3. **The restore fence.** A row a rewind or a dump restore took away can come back: PITR keeps
24
+ * every state of the last 30 days. Every path that replaces a scope's state writes a fence
25
+ * object into the tenant's blob store BEFORE it does (`fenceAttachmentSweep`), and the sweep
26
+ * deletes nothing of that scope until the fence is `fenceMs` old. The fence lives in the blob
27
+ * store, never in the scope, because the rewind it records would erase it there. It is read
28
+ * before the pass and again after the condemnation, immediately before the first delete, so a
29
+ * rewind that lands mid-pass stops the deletes. A fence that cannot be read is a fence.
30
+ * 4. **The serving copy only, and only while it is live.** The judgement is only as good as the
31
+ * copy that makes it. A host refuses a scope that is not active, a store that holds nothing, a
32
+ * copy a carry wiped or kept, a fork, and a scope not provisioned for the tenant. It also
33
+ * refuses while another script's copy of the scope is unsettled in the copy ledger
34
+ * (any state but `SETTLED_COPY_STATES`), because that copy may hold rows the serving one lacks. Which
35
+ * deployment is asked is the driver's business: the platform asks the one serving the scope.
36
+ *
37
+ * The instant a pass judges age and the fence against is the HOST's clock, never a caller's
38
+ * (`OrphanSweepRequest` carries none), so no caller can step past guard 2 or guard 3.
39
+ *
40
+ * A dry run condemns nothing and deletes nothing: it reports what a pass would condemn, and the
41
+ * scope records that as its licence (#2350). A destructive pass needs one in force, and deletes only
42
+ * what it lists (`ATTACHMENT_SWEEP_LICENCE_DDL`).
43
+ */
44
+ /** The tombstone table, shared by both adapters so the two cannot part company. */
45
+ export declare const ATTACHMENT_CONDEMNED_DDL = "\n CREATE TABLE IF NOT EXISTS _substrat_attachment_condemned (\n -- The attachment id whose object the sweep deleted, or is about to. No row may ever be\n -- inserted for it again: the insert path refuses it (#2314).\n id TEXT PRIMARY KEY,\n condemned_at TEXT NOT NULL\n );\n";
46
+ /** The refusal reason an upload meets when its id was condemned before its row could commit. */
47
+ export declare const ATTACHMENT_CONDEMNED = "attachment_condemned";
48
+ /** How old an object must be before a pass looks at it, by default: seven days. */
49
+ export declare const ORPHAN_SWEEP_GRACE_MS: number;
50
+ /**
51
+ * How long a scope's bytes are left alone after its state was replaced, by default: 35 days. A
52
+ * Durable Object keeps 30 days of point-in-time history, so a row a rewind took away can be
53
+ * restored for that long; five more days absorb the clocks and the time a rewind takes to arm.
54
+ */
55
+ export declare const ORPHAN_SWEEP_FENCE_MS: number;
56
+ /** The most objects one pass deletes, by default. */
57
+ export declare const ORPHAN_SWEEP_LIMIT = 500;
58
+ /** The most ids one condemnation call carries: one JSON parameter, so no SQL limit applies. */
59
+ export declare const ORPHAN_CONDEMN_BATCH = 100;
60
+ /**
61
+ * How long a tombstone is kept. Past this no upload that minted the id can still be in flight
62
+ * (an upload holds its body in memory, and its call to the scope is one request), so the
63
+ * tombstone guards nothing any more.
64
+ */
65
+ export declare const ORPHAN_TOMBSTONE_RETENTION_MS: number;
66
+ /**
67
+ * Refuse an insert of a condemned attachment id. Called by both adapters inside the
68
+ * attachment write's own transaction, before its `INSERT`, so it and the condemnation are
69
+ * serialized by the scope (guard 1). A `conflict` is a refusal the scope ANSWERS, so the host
70
+ * compensates the object away (it is already gone, or about to be) and the caller is told.
71
+ */
72
+ export declare function refuseCondemnedAttachment(sql: ScopedSql, attachmentId: string): void;
73
+ /**
74
+ * Refuse a dump load that would put back a row for an id this store has condemned (#2314). A
75
+ * load is the other way an `_substrat_attachments` row is written, so it meets the same
76
+ * tombstone the insert does: a restore that raced a pass must not land a row whose bytes that
77
+ * pass is deleting. Called inside the load's transaction, BEFORE its first drop, against the
78
+ * store as it is. A store with no tombstone table (from before #2314) has condemned nothing.
79
+ */
80
+ export declare function refuseCondemnedInDump(sql: ScopedSql, tables: readonly {
81
+ name: string;
82
+ columns: readonly string[];
83
+ rows: readonly (readonly unknown[])[];
84
+ }[]): void;
85
+ /** The ids in `ids` that no `_substrat_attachments` row names. Read-only. */
86
+ export declare function rowlessAttachmentIds(sql: ScopedSql, ids: readonly string[]): string[];
87
+ /**
88
+ * Condemn the ids in `ids` that no row names, inside the caller's scope transaction (guard 1),
89
+ * and return every id that is condemned and rowless now: the ones condemned here and the ones an
90
+ * earlier pass condemned but did not get to delete. Only those may be deleted. Idempotent.
91
+ *
92
+ * Each returned id's tombstone is stamped `now`, re-stamped if an earlier pass condemned it, so
93
+ * the prune of tombstones past `ORPHAN_TOMBSTONE_RETENTION_MS` that follows can never take the
94
+ * tombstone of an id this pass is about to delete.
95
+ */
96
+ export declare function condemnOrphanAttachments(sql: ScopedSql, ids: readonly string[], now: string): string[];
97
+ /**
98
+ * The dry-run-first licence (#2350), held by the scope's own storage so the rule holds whoever asks
99
+ * for a pass: one row per attachment id the scope's last dry run listed, stamped with the host's
100
+ * clock at that run. A destructive pass is refused without one in force
101
+ * (`refuseUnlicensedOrphanSweep`), condemns only ids it lists (`condemnLicensedOrphanAttachments`),
102
+ * and takes each id it deleted out of it (`consumeOrphanSweepLicence`).
103
+ *
104
+ * It only ever NARROWS what a pass may delete: every guard of the pass still runs on the ids it
105
+ * lists. So a licence that a rewind brought back, or that outlived the rows it was judged against,
106
+ * can permit nothing the pass would not permit without it. A dump never carries its rows and every
107
+ * load drops them, so a restore, a carry or a fork leaves the next pass a dry run.
108
+ */
109
+ export declare const ATTACHMENT_SWEEP_LICENCE_DDL = "\n CREATE TABLE IF NOT EXISTS _substrat_attachment_sweep_licence (\n -- An attachment id the scope's last orphan-sweep dry run listed, and that no destructive\n -- pass has deleted since (#2350). Store-local: never dumped, and cleared by every load.\n id TEXT PRIMARY KEY,\n licensed_at TEXT NOT NULL\n );\n";
110
+ /** The licence table's name, for the dump export that leaves its rows out and the load that drops them. */
111
+ export declare const ATTACHMENT_SWEEP_LICENCE_TABLE = "_substrat_attachment_sweep_licence";
112
+ /** The refusal reason a destructive pass meets when the scope holds no dry-run licence in force. */
113
+ export declare const ORPHAN_SWEEP_UNLICENSED = "orphan_sweep_unlicensed";
114
+ /** How long a scope's dry-run licence stays in force, judged against the host's clock: seven days. */
115
+ export declare const ORPHAN_SWEEP_DRY_RUN_WINDOW_MS: number;
116
+ /** The most ids one licence holds. A dry run that lists more licenses its first this many. */
117
+ export declare const ORPHAN_SWEEP_LICENCE_CAP = 1000;
118
+ /**
119
+ * When the scope's licence was recorded, if it holds one in force at `now`, else null. A licence
120
+ * stamped more than a minute later than `now` (a clock that went back) is not in force: the next
121
+ * pass is a dry run.
122
+ */
123
+ export declare function orphanSweepLicensedAt(sql: ScopedSql, now: string): string | null;
124
+ /** Refuse a destructive pass over a scope that holds no dry-run licence in force at `now`. */
125
+ export declare function refuseUnlicensedOrphanSweep(sql: ScopedSql, now: string): void;
126
+ /**
127
+ * Record what a dry run found as the scope's licence, inside the caller's scope transaction: the
128
+ * first `ORPHAN_SWEEP_LICENCE_CAP` of `ids`, stamped `now`. Writes only when that set differs from
129
+ * the one held, or the one held is older than half the window, so a dry run that keeps finding the
130
+ * same orphans moves no write revision (a carry and a kept-copy release are fenced on it). An empty
131
+ * set clears a held licence, and writes nothing when there is none. Returns whether it wrote.
132
+ */
133
+ export declare function recordOrphanSweepLicence(sql: ScopedSql, ids: readonly string[], now: string): boolean;
134
+ /**
135
+ * `condemnOrphanAttachments` over only the ids in `ids` the scope's licence lists, while it is in
136
+ * force at `now`: a destructive pass deletes nothing its dry run did not list. Inside the caller's
137
+ * scope transaction, so a load that dropped the licence meanwhile leaves nothing to condemn.
138
+ */
139
+ export declare function condemnLicensedOrphanAttachments(sql: ScopedSql, ids: readonly string[], now: string): string[];
140
+ /** The ids the scope's licence lists, held or expired: at most `ORPHAN_SWEEP_LICENCE_CAP`. */
141
+ export declare function licensedOrphanIds(sql: ScopedSql): string[];
142
+ /**
143
+ * Take ids out of the licence: the ones a destructive pass deleted, and the ones whose objects are
144
+ * gone some other way, so its next pass in the window goes on with the ids it has not reached and
145
+ * never back to what is gone. A licence left with nothing is no licence, so the next destructive
146
+ * pass is refused and the scope is dry-run again. Writes only when one of `ids` is held.
147
+ */
148
+ export declare function consumeOrphanSweepLicence(sql: ScopedSql, ids: readonly string[]): void;
149
+ /** Drop the whole licence: every dump load does, so a restored, carried or forked store starts with none. */
150
+ export declare function clearOrphanSweepLicence(sql: ScopedSql): void;
151
+ /**
152
+ * The copy-ledger states (#1722) in which another script's copy of a scope can no longer hold a
153
+ * row the serving copy lacks, nor discover one. An ALLOWLIST: every other state, a future one
154
+ * included, holds the pass. Only `done` qualifies: the copy was wiped (or found already wiped),
155
+ * reaped with its scope, or is the move's destination, the copy that serves. Every other state can
156
+ * still hold, or still turn up, a write the serving copy never saw:
157
+ *
158
+ * - `pending`: a move in flight; its outcome is not known yet.
159
+ * - `eligible`: a carry's source awaiting its fenced wipe. The wipe is what discovers a write that
160
+ * landed after the export and turns the copy `kept`, and it is best effort, so until it has run
161
+ * the copy may hold an upload whose bytes share this scope's prefix.
162
+ * - `kept`: such a write was found; staff resolve it.
163
+ * - `retained`: a copy kept on purpose (a bind that did not land, a copy from before the ledger),
164
+ * whose contents nobody checked against the serving copy.
165
+ */
166
+ export declare const SETTLED_COPY_STATES: readonly string[];
167
+ /** The refusal of a pass over a scope with a copy not yet settled, or null when there is none. */
168
+ export declare function unsettledCopyRefusal(scopeId: string, copies: readonly {
169
+ state: string;
170
+ scriptRef: string;
171
+ }[]): Error | null;
172
+ /**
173
+ * What a pass throws when the deployment holds no attachment store for the tenant, yet the scope
174
+ * holds attachment rows (#2314): its store binding is missing, which is a failure to fix, never the
175
+ * `bucket: 'none'` of a scope that keeps no files.
176
+ */
177
+ export declare function missingAttachmentStore(tenantId: string, scopeId: string): Error;
178
+ /** The blob key of a scope's restore fence (guard 3). Outside `att/`, so no pass ever lists it. */
179
+ export declare function attachmentSweepFenceKey(scopeId: string): string;
180
+ /**
181
+ * Record that a scope's state is about to be replaced (a PITR rewind, a dump restore), so no pass
182
+ * deletes its bytes for `ORPHAN_SWEEP_FENCE_MS`. Call it BEFORE the replacement and let a throw
183
+ * refuse the replacement: a rewind whose fence was not written could hand the sweep a state that
184
+ * lacks rows a later restore brings back.
185
+ */
186
+ export declare function fenceAttachmentSweep(store: TenantBlobStore, scopeId: string, now: string): Promise<void>;
187
+ /**
188
+ * What a caller asks of a host's pass (`ScopeHost.sweepOrphanAttachments`). No instant: the
189
+ * host judges the age floor and the fence against its OWN clock, so no caller can step past
190
+ * either by handing in a later time.
191
+ */
192
+ export interface OrphanSweepRequest {
193
+ /** Report what a pass would condemn and delete, and change nothing. */
194
+ dryRun?: boolean;
195
+ /** The most objects deleted in one pass. Default `ORPHAN_SWEEP_LIMIT`. */
196
+ limit?: number;
197
+ /**
198
+ * A host with no directory (a CP-less deployment) cannot read the copy ledger, so it cannot see
199
+ * a kept or pending copy of the scope in another version's script, whose rows the serving copy
200
+ * lacks. It refuses unless its caller says it checked the ledger and found no such copy.
201
+ */
202
+ copiesSettled?: boolean;
203
+ /**
204
+ * The version the platform routed this pass to: the one the scope runs, by the directory. A host
205
+ * that knows the version its own code is deployed as refuses a pass routed to another (a stale
206
+ * script, a dispatch mixup, a promote mid-pass). See {@link orphanSweepVersionRefusal}.
207
+ */
208
+ expectedVersionId?: string;
209
+ }
210
+ /**
211
+ * Why a pass may not run in a script deployed as `deployed`, when the platform routed it to the
212
+ * script running `expected` (#2314), or null. A script deployed as another version refuses any
213
+ * pass. A deployed script that carries no version identity cannot be told it is the one routed to,
214
+ * so it refuses a destructive pass and lets a dry run proceed, since a dry run deletes nothing.
215
+ * No `expected` (a host the platform does not route to, a self-host) asks nothing.
216
+ */
217
+ export declare function orphanSweepVersionRefusal(deployed: string | null, expected: string | undefined, destructive: boolean): Error | null;
218
+ /** The options the kernel's pass takes from its host: the request, and the host's clock. */
219
+ export interface OrphanSweepOptions {
220
+ /** The instant the pass judges age and the fence against: the HOST's clock, never a caller's. */
221
+ now: string;
222
+ /** Report what a pass would condemn and delete, and change nothing. */
223
+ dryRun?: boolean;
224
+ /** Candidate age floor in ms. Default `ORPHAN_SWEEP_GRACE_MS`; never below one day. */
225
+ graceMs?: number;
226
+ /** How long a fence holds. Default `ORPHAN_SWEEP_FENCE_MS`; never below 31 days. */
227
+ fenceMs?: number;
228
+ /** The most objects deleted in one pass. Default `ORPHAN_SWEEP_LIMIT`. */
229
+ limit?: number;
230
+ }
231
+ export interface OrphanSweepReport {
232
+ /** Objects under the scope's attachment prefix. */
233
+ listed: number;
234
+ /** Objects old enough to be judged. */
235
+ candidates: number;
236
+ /** Objects whose id no row names: condemned (or, in a dry run, that would be). */
237
+ orphans: number;
238
+ /** Objects deleted. Always 0 in a dry run, and while fenced. */
239
+ deleted: number;
240
+ /** The keys deleted, or in a dry run the keys that would be. At most `limit`. */
241
+ keys: string[];
242
+ /** Set when the restore fence held the pass: the instant until which it holds. */
243
+ fencedUntil?: string;
244
+ /**
245
+ * Set when a destructive pass could not bring the scope's dry-run licence up to date afterwards
246
+ * (#2350): take out what it deleted, and what is gone some other way. Any deletes stand and `keys`
247
+ * names them. The licence keeps rows for ids that are gone, which license nothing a pass could
248
+ * delete, and which the next pass that settles the licence takes out.
249
+ */
250
+ consumeFailed?: true;
251
+ dryRun: boolean;
252
+ /**
253
+ * `'none'` when the deployment holds no attachment store for the tenant at all, so nothing was
254
+ * listed (#2314). Set apart from a pass that listed an empty store, so a store binding missing
255
+ * from a vertical that does keep files cannot pass for a clean sweep.
256
+ */
257
+ bucket?: 'none';
258
+ }
259
+ /**
260
+ * What the scope side of a pass is: the read for a dry run, and the licence it records; the
261
+ * licensed condemnation otherwise, and the consumption of the licence by what was deleted.
262
+ */
263
+ export interface OrphanSweepScope {
264
+ rowless(ids: readonly string[]): Promise<string[]>;
265
+ /** Condemn the ids the scope's licence lists (`condemnLicensedOrphanAttachments`). */
266
+ condemn(ids: readonly string[], now: string): Promise<string[]>;
267
+ /** Record what a dry run found as the scope's licence (`recordOrphanSweepLicence`). */
268
+ license(ids: readonly string[], now: string): Promise<void>;
269
+ /** The ids the scope's licence lists (`licensedOrphanIds`). */
270
+ licensed(): Promise<string[]>;
271
+ /** Take ids out of the licence (`consumeOrphanSweepLicence`). */
272
+ consume(ids: readonly string[]): Promise<void>;
273
+ }
274
+ /**
275
+ * One pass over one scope's attachment bytes. The host supplies the store and the scope side;
276
+ * this decides, in this order: the fence, the candidates by age, the condemnation in batches,
277
+ * the fence again, the deletes. Every failure before a delete leaves every object in place, and a
278
+ * delete that fails leaves its tombstone, so the next pass finishes it.
279
+ */
280
+ export declare function sweepOrphanAttachments(store: TenantBlobStore, scopeId: string, scope: OrphanSweepScope, opts: OrphanSweepOptions): Promise<OrphanSweepReport>;
281
+ //# sourceMappingURL=attachment-sweep.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attachment-sweep.d.ts","sourceRoot":"","sources":["../src/attachment-sweep.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AASlE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAEH,mFAAmF;AACnF,eAAO,MAAM,wBAAwB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