@substrat-run/kernel 0.147.0 → 0.149.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 (108) hide show
  1. package/dist/attachment-sweep.d.ts +208 -0
  2. package/dist/attachment-sweep.d.ts.map +1 -0
  3. package/dist/attachment-sweep.js +318 -0
  4. package/dist/attachment-sweep.js.map +1 -0
  5. package/dist/audit-outcome.d.ts +1 -1
  6. package/dist/audit-outcome.d.ts.map +1 -1
  7. package/dist/audit-outcome.js +4 -2
  8. package/dist/audit-outcome.js.map +1 -1
  9. package/dist/export-break.d.ts +137 -0
  10. package/dist/export-break.d.ts.map +1 -0
  11. package/dist/export-break.js +219 -0
  12. package/dist/export-break.js.map +1 -0
  13. package/dist/index.d.ts +24 -10
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/index.js +16 -7
  16. package/dist/index.js.map +1 -1
  17. package/dist/install-receipts.d.ts +116 -0
  18. package/dist/install-receipts.d.ts.map +1 -0
  19. package/dist/install-receipts.js +162 -0
  20. package/dist/install-receipts.js.map +1 -0
  21. package/dist/invocation-line.d.ts +85 -0
  22. package/dist/invocation-line.d.ts.map +1 -1
  23. package/dist/invocation-line.js +43 -0
  24. package/dist/invocation-line.js.map +1 -1
  25. package/dist/map-bounded.d.ts +8 -0
  26. package/dist/map-bounded.d.ts.map +1 -0
  27. package/dist/map-bounded.js +16 -0
  28. package/dist/map-bounded.js.map +1 -0
  29. package/dist/migration-digest.d.ts +56 -0
  30. package/dist/migration-digest.d.ts.map +1 -1
  31. package/dist/migration-digest.js +92 -0
  32. package/dist/migration-digest.js.map +1 -1
  33. package/dist/migration-fence.d.ts +14 -0
  34. package/dist/migration-fence.d.ts.map +1 -0
  35. package/dist/migration-fence.js +515 -0
  36. package/dist/migration-fence.js.map +1 -0
  37. package/dist/migration-replay.d.ts +52 -0
  38. package/dist/migration-replay.d.ts.map +1 -0
  39. package/dist/migration-replay.js +140 -0
  40. package/dist/migration-replay.js.map +1 -0
  41. package/dist/module-migrations.d.ts +3 -3
  42. package/dist/module-migrations.js +3 -3
  43. package/dist/peer.d.ts +32 -2
  44. package/dist/peer.d.ts.map +1 -1
  45. package/dist/peer.js +100 -4
  46. package/dist/peer.js.map +1 -1
  47. package/dist/permission-eval.d.ts +8 -0
  48. package/dist/permission-eval.d.ts.map +1 -1
  49. package/dist/permission-eval.js +14 -0
  50. package/dist/permission-eval.js.map +1 -1
  51. package/dist/platform-sweep.d.ts +114 -361
  52. package/dist/platform-sweep.d.ts.map +1 -1
  53. package/dist/platform-sweep.js +134 -561
  54. package/dist/platform-sweep.js.map +1 -1
  55. package/dist/promote-review.d.ts +125 -0
  56. package/dist/promote-review.d.ts.map +1 -0
  57. package/dist/promote-review.js +181 -0
  58. package/dist/promote-review.js.map +1 -0
  59. package/dist/schedule-state.d.ts +91 -0
  60. package/dist/schedule-state.d.ts.map +1 -0
  61. package/dist/schedule-state.js +118 -0
  62. package/dist/schedule-state.js.map +1 -0
  63. package/dist/scope-copy-ledger.d.ts +29 -0
  64. package/dist/scope-copy-ledger.d.ts.map +1 -1
  65. package/dist/scope-copy-ledger.js +23 -0
  66. package/dist/scope-copy-ledger.js.map +1 -1
  67. package/dist/scope-copy.d.ts.map +1 -1
  68. package/dist/scope-copy.js +3 -2
  69. package/dist/scope-copy.js.map +1 -1
  70. package/dist/scope-host.d.ts +303 -11
  71. package/dist/scope-host.d.ts.map +1 -1
  72. package/dist/scope-host.js.map +1 -1
  73. package/dist/scope-identity.d.ts +68 -0
  74. package/dist/scope-identity.d.ts.map +1 -0
  75. package/dist/scope-identity.js +75 -0
  76. package/dist/scope-identity.js.map +1 -0
  77. package/dist/scope-store.d.ts +9 -6
  78. package/dist/scope-store.d.ts.map +1 -1
  79. package/dist/scope-store.js.map +1 -1
  80. package/dist/spine-restore.d.ts +2 -0
  81. package/dist/spine-restore.d.ts.map +1 -1
  82. package/dist/spine-restore.js +6 -1
  83. package/dist/spine-restore.js.map +1 -1
  84. package/dist/store-driver-releases.d.ts +306 -0
  85. package/dist/store-driver-releases.d.ts.map +1 -0
  86. package/dist/store-driver-releases.js +581 -0
  87. package/dist/store-driver-releases.js.map +1 -0
  88. package/dist/table-ownership.d.ts +5 -2
  89. package/dist/table-ownership.d.ts.map +1 -1
  90. package/dist/table-ownership.js +19 -10
  91. package/dist/table-ownership.js.map +1 -1
  92. package/dist/testing.d.ts +2 -0
  93. package/dist/testing.d.ts.map +1 -1
  94. package/dist/testing.js +2 -0
  95. package/dist/testing.js.map +1 -1
  96. package/dist/upload-link.d.ts +142 -0
  97. package/dist/upload-link.d.ts.map +1 -0
  98. package/dist/upload-link.js +441 -0
  99. package/dist/upload-link.js.map +1 -0
  100. package/dist/version-migrations.d.ts +63 -1
  101. package/dist/version-migrations.d.ts.map +1 -1
  102. package/dist/version-migrations.js +174 -8
  103. package/dist/version-migrations.js.map +1 -1
  104. package/dist/vertical-scope-stores.d.ts +43 -0
  105. package/dist/vertical-scope-stores.d.ts.map +1 -0
  106. package/dist/vertical-scope-stores.js +195 -0
  107. package/dist/vertical-scope-stores.js.map +1 -0
  108. package/package.json +2 -2
@@ -21,8 +21,12 @@
21
21
  * bounded batch at a time, and until it reaches a version the read falls back to that
22
22
  * version's manifest. The fallback is only for those rows. A version published by this code
23
23
  * is split on the way in.
24
+ * - `migration_digest_derived` (#2339): 1 once `migration_digest` is the one the control plane
25
+ * derives from these rows and the manifest's `doClasses`, never the one the push sent. NULL is
26
+ * a version stored before this, whose digest is still the pushed one: a backfill re-derives
27
+ * those a batch at a time, and a read of one derives it first.
24
28
  */
25
- import { deployManifest, storedDeployManifest, } from '@substrat-run/contracts';
29
+ import { declaredMigrationDeclarations, deployManifest, migrationDigestOf, reviewLine, storedDeployManifest, substratError, UNHELD_MIGRATION_DIGEST_PREFIX, unheldMigrationDigest, } from '@substrat-run/contracts';
26
30
  /**
27
31
  * The table, and the index the backfill walks. Interpolated into both adapters' directory DDL,
28
32
  * so `lint:spine-ddl` sees one spelling on each side. Anything that references this table or
@@ -42,10 +46,16 @@ export const VERSION_MIGRATIONS_DDL = `
42
46
  -- The module's SqlMigration.version, e.g. 0001-init.
43
47
  version TEXT NOT NULL,
44
48
  sql TEXT NOT NULL,
49
+ -- The migration's declared moves and discards (#2322), as JSON { moves?, discards? }.
50
+ -- NULL = it declares none, or was stored before they were carried.
51
+ declarations TEXT,
45
52
  PRIMARY KEY (version_id, ordinal)
46
53
  );
47
54
  CREATE INDEX IF NOT EXISTS vertical_versions_unsplit
48
55
  ON vertical_versions (id) WHERE migrations_split IS NULL;
56
+ -- #2339: versions whose migration_digest is still the pushed one, not yet re-derived.
57
+ CREATE INDEX IF NOT EXISTS vertical_versions_underived
58
+ ON vertical_versions (id) WHERE migration_digest_derived IS NULL;
49
59
  `;
50
60
  /**
51
61
  * Take `migrations` out of a manifest.
@@ -84,12 +94,43 @@ export function splitManifestMigrations(manifestJson, mode) {
84
94
  migrations: result.success && result.data !== undefined ? result.data : null,
85
95
  };
86
96
  }
97
+ /** The `declarations` column of one row: JSON `{ moves?, discards? }`, or NULL when it declares none. */
98
+ function declarationsJson(m) {
99
+ if (!m.moves && !m.discards)
100
+ return null;
101
+ return JSON.stringify({ ...(m.moves ? { moves: m.moves } : {}), ...(m.discards ? { discards: m.discards } : {}) });
102
+ }
103
+ /** What a stored `declarations` column must parse as: the push boundary's own schema, and nothing else. */
104
+ const storedDeclarations = declaredMigrationDeclarations.strict();
105
+ /**
106
+ * One row's declarations as a `DeclaredMigration`'s spread, or null when the column holds
107
+ * something that is not a declaration — which the caller answers as "not available" for the
108
+ * whole version, never as a list that silently lost what a migration may lose.
109
+ */
110
+ function declarationsOf(json) {
111
+ if (json === null)
112
+ return {};
113
+ let parsed;
114
+ try {
115
+ parsed = JSON.parse(json);
116
+ }
117
+ catch {
118
+ return null;
119
+ }
120
+ const result = storedDeclarations.safeParse(parsed);
121
+ if (!result.success || (!result.data.moves && !result.data.discards))
122
+ return null;
123
+ return {
124
+ ...(result.data.moves ? { moves: result.data.moves } : {}),
125
+ ...(result.data.discards ? { discards: result.data.discards } : {}),
126
+ };
127
+ }
87
128
  /** Replace one version's migration rows. The caller sets its `migration_count` and `migrations_split`. */
88
129
  export function writeVersionMigrations(db, versionId, migrations) {
89
130
  db.run('DELETE FROM vertical_version_migrations WHERE version_id = ?', versionId);
90
131
  (migrations ?? []).forEach((m, ordinal) => {
91
- db.run(`INSERT INTO vertical_version_migrations (version_id, ordinal, module_id, version, sql)
92
- VALUES (?, ?, ?, ?, ?)`, versionId, ordinal, m.moduleId, m.version, m.sql);
132
+ db.run(`INSERT INTO vertical_version_migrations (version_id, ordinal, module_id, version, sql, declarations)
133
+ VALUES (?, ?, ?, ?, ?, ?)`, versionId, ordinal, m.moduleId, m.version, m.sql, declarationsJson(m));
93
134
  });
94
135
  }
95
136
  /**
@@ -173,15 +214,140 @@ export function versionMigrationsOf(db, versionId) {
173
214
  }
174
215
  if (row.migration_count === null)
175
216
  return { verticalSlug: row.vertical_slug, migrations: null };
176
- const rows = db.all(`SELECT module_id, version, sql FROM vertical_version_migrations
217
+ const rows = db.all(`SELECT module_id, version, sql, declarations FROM vertical_version_migrations
177
218
  WHERE version_id = ? ORDER BY ordinal`, versionId);
178
219
  // Never a short list: rows that disagree with the count are not the version's migrations.
179
220
  if (rows.length !== row.migration_count)
180
221
  return { verticalSlug: row.vertical_slug, migrations: null };
181
- return {
182
- verticalSlug: row.vertical_slug,
222
+ const migrations = [];
223
+ for (const r of rows) {
224
+ // Never a list without what a migration declares it may lose (#2322): a row whose
225
+ // declarations do not read makes the whole version "not available".
226
+ const declared = declarationsOf(r.declarations);
227
+ if (declared === null)
228
+ return { verticalSlug: row.vertical_slug, migrations: null };
183
229
  // Parsed on the way in (`splitManifestMigrations`), so the brand is the stored value's.
184
- migrations: rows.map((r) => ({ moduleId: r.module_id, version: r.version, sql: r.sql })),
185
- };
230
+ migrations.push({ moduleId: r.module_id, version: r.version, sql: r.sql, ...declared });
231
+ }
232
+ return { verticalSlug: row.vertical_slug, migrations };
233
+ }
234
+ /**
235
+ * The `reason` on a push refused because its `digests.migration` is not the one the control plane
236
+ * derives from the migrations it carries (#2339).
237
+ */
238
+ export const MIGRATION_DIGEST_MISMATCH_REASON = 'migration_digest_mismatch';
239
+ /** The manifest's `doClasses` as the stored parser reads them (absent is `[]`), or null when they do not read. */
240
+ function doClassesOf(raw) {
241
+ const result = storedDeployManifest.shape.doClasses.safeParse(raw);
242
+ return result.success ? result.data : null;
243
+ }
244
+ /**
245
+ * A version's migration digest as the control plane derives it (#2339): `migrationDigestOf`
246
+ * over the manifest's `doClasses` and the migrations the version stores, with what each
247
+ * declares. A version that stores no migrations to derive it from (`migrations` null), or whose
248
+ * `doClasses` do not read, gets `unheldMigrationDigest`, which equals no other version's.
249
+ */
250
+ export async function derivedMigrationDigest(versionId, doClasses, migrations) {
251
+ const classes = doClassesOf(doClasses);
252
+ if (migrations === null || classes === null)
253
+ return unheldMigrationDigest(versionId);
254
+ return migrationDigestOf({ doClasses: classes, migrations });
255
+ }
256
+ /**
257
+ * The migration digest a publish stores (#2339): the one derived from what it stores, never the
258
+ * one pushed. A push that carries its migrations and pushed another digest is refused
259
+ * (`validation_failed`, reason {@link MIGRATION_DIGEST_MISMATCH_REASON}): either its CLI hashes
260
+ * something other than what it sent, or it hashes less than the platform compares. One that
261
+ * carries none is not refused, since nothing can check it, and stores the unheld digest.
262
+ */
263
+ export async function publishedMigrationDigest(input) {
264
+ let doClasses;
265
+ if (input.manifestJson !== null) {
266
+ try {
267
+ doClasses = JSON.parse(input.manifestJson)?.doClasses;
268
+ }
269
+ catch {
270
+ doClasses = null;
271
+ }
272
+ }
273
+ const derived = await derivedMigrationDigest(input.id, input.manifestJson === null ? null : doClasses, input.migrations);
274
+ if (input.migrations !== null && derived !== input.migrationDigest) {
275
+ throw substratError('validation_failed', `the push's migration digest (${input.migrationDigest}) is not the digest of the migrations it carries ` +
276
+ `(${derived}). The platform derives the digest a promote compares from the migrations and their declared ` +
277
+ 'moves and discards itself, so a push must hash exactly those: upgrade to a CLI release whose push digest ' +
278
+ 'covers its SQL migrations and their declarations (npm i -g @substrat-run/cli), and push again', { reason: MIGRATION_DIGEST_MISMATCH_REASON });
279
+ }
280
+ return derived;
281
+ }
282
+ /** The two reads that find versions whose digest is not derived yet, answered from `vertical_versions_underived`. */
283
+ export const UNDERIVED_IDS_SQL = 'SELECT id FROM vertical_versions WHERE migration_digest_derived IS NULL ORDER BY id LIMIT ?';
284
+ export const UNDERIVED_PROBE_SQL = 'SELECT 1 AS present FROM vertical_versions WHERE migration_digest_derived IS NULL LIMIT 1';
285
+ /** How many versions one digest batch derives at most. Each reads at most the push's 512 KiB of SQL. */
286
+ const DIGEST_BATCH_VERSIONS = 10;
287
+ /**
288
+ * Derive one stored version's migration digest from its stored rows and record it (#2339),
289
+ * unless it is derived already. Returns the digest the version now holds, or undefined when
290
+ * there is no such version.
291
+ *
292
+ * Two statements, not a transaction: the digest is computed between them (Web Crypto is
293
+ * asynchronous), and the write is guarded on the row still being underived, so two derivations
294
+ * racing write once. A version's migrations and `doClasses` never change after it is published,
295
+ * so both derive the same value, and what was read is what is recorded.
296
+ */
297
+ export async function deriveVersionMigrationDigest(db, versionId) {
298
+ const row = db.all(`SELECT migration_digest, migration_digest_derived,
299
+ CASE WHEN manifest_json IS NULL THEN 0 ELSE 1 END AS has_manifest,
300
+ CASE WHEN json_valid(manifest_json) THEN json_extract(manifest_json, '$.doClasses') END AS do_classes
301
+ FROM vertical_versions WHERE id = ?`, versionId)[0];
302
+ if (!row)
303
+ return undefined;
304
+ if (row.migration_digest_derived !== null)
305
+ return row.migration_digest;
306
+ let doClasses = null;
307
+ if (row.has_manifest === 1) {
308
+ try {
309
+ // `json_extract` answers an array as its JSON text, and NULL for a manifest without the key.
310
+ doClasses = row.do_classes === null ? undefined : JSON.parse(row.do_classes);
311
+ }
312
+ catch {
313
+ doClasses = null;
314
+ }
315
+ }
316
+ const digest = await derivedMigrationDigest(versionId, doClasses, versionMigrationsOf(db, versionId)?.migrations ?? null);
317
+ db.run('UPDATE vertical_versions SET migration_digest = ?, migration_digest_derived = 1 WHERE id = ? AND migration_digest_derived IS NULL', digest, versionId);
318
+ return digest;
319
+ }
320
+ /**
321
+ * Re-derive the next versions stored before #2339, whose migration digest is still the one their
322
+ * push sent: at most `limit` of them. Returns how many it derived, and whether any are left.
323
+ * Resumable and idempotent on #1764's terms: each version is marked as it is derived, and a
324
+ * derived one is never selected again. Until the backfill reaches a version, a read of it
325
+ * derives it first (`deriveVersionMigrationDigest`), so no gate compares a pushed digest.
326
+ */
327
+ export async function deriveMigrationDigestsBatch(db, limit = DIGEST_BATCH_VERSIONS) {
328
+ const ids = db.all(UNDERIVED_IDS_SQL, limit);
329
+ for (const { id } of ids)
330
+ await deriveVersionMigrationDigest(db, id);
331
+ return { derived: ids.length, more: versionsAwaitDigest(db) };
332
+ }
333
+ /** Whether any version's migration digest still waits to be derived. One probe of the partial index. */
334
+ export function versionsAwaitDigest(db) {
335
+ return db.all(UNDERIVED_PROBE_SQL).length > 0;
336
+ }
337
+ /**
338
+ * The promote gate's refusal when the migration digest moved and the change was not acknowledged.
339
+ * A side whose digest is unheld (#2339) is named with why it always asks, so a vertical whose
340
+ * pushes leave their SQL out of the manifest is not surprised that every promote does.
341
+ */
342
+ export function migrationChangeRefusal(outgoing, incoming) {
343
+ const unheld = [outgoing, incoming]
344
+ .filter((d) => d.startsWith(UNHELD_MIGRATION_DIGEST_PREFIX))
345
+ .map((d) => d.slice(UNHELD_MIGRATION_DIGEST_PREFIX.length));
346
+ return (`promotion changes migrations (${outgoing} → ${incoming}) — acknowledge it explicitly to promote` +
347
+ (unheld.length === 0
348
+ ? ''
349
+ : `. ${unheld.length === 1 ? `Version ${reviewLine(unheld[0])} holds` : `Versions ${unheld.map((id) => reviewLine(id)).join(' and ')} hold`} ` +
350
+ 'no migrations the platform can compare: the push left them out of the manifest (over the size a manifest ' +
351
+ 'carries, or from before manifests carried them), so a promote to or over it always asks for this acknowledgement'));
186
352
  }
187
353
  //# sourceMappingURL=version-migrations.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version-migrations.js","sourceRoot":"","sources":["../src/version-migrations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,EACL,cAAc,EACd,oBAAoB,GAGrB,MAAM,yBAAyB,CAAC;AAGjC;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG;;;;;;;;;;;;;CAarC,CAAC;AAUF;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,uBAAuB,CAAC,YAA2B,EAAE,IAAuB;IAC1F,IAAI,YAAY,KAAK,IAAI;QAAE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC;IACrE,IAAI,MAAe,CAAC;IACpB,IAAI,CAAC;QACH,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IACpC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC;IAC5C,CAAC;IACD,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,YAAY,IAAI,MAAM,CAAC,EAAE,CAAC;QACxG,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC;IAC5C,CAAC;IACD,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,GAAG,MAAiC,CAAC;IAC3E,MAAM,MAAM,GAAG,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC;IAC1F,MAAM,MAAM,GAAG,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IACzC,OAAO;QACL,YAAY,EAAE,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,CAAC,QAAQ,CAAC,CAAC,CAAC,YAAY,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,GAAG;gBAC7I,2GAA2G;gBAC3G,kHAAkH,CAAC,CACxH,CAAC;AACJ,CAAC"}
@@ -0,0 +1,43 @@
1
+ import type { SwitchSql } from './system-switch.js';
2
+ /** Interpolated into both adapters' directory DDL, so `lint:spine-ddl` sees one spelling on each side. */
3
+ export declare const VERTICAL_SCOPE_STORES_DDL = "\n CREATE TABLE IF NOT EXISTS vertical_scope_stores (\n vertical_slug TEXT NOT NULL,\n binding TEXT NOT NULL,\n driver TEXT NOT NULL,\n -- The version that declared the binding first.\n first_version_id TEXT NOT NULL,\n PRIMARY KEY (vertical_slug, binding)\n );\n CREATE TABLE IF NOT EXISTS vertical_scope_store_versions (\n version_id TEXT PRIMARY KEY,\n vertical_slug TEXT NOT NULL,\n -- 0: the manifest could not be read, so the version may declare a store nobody can name.\n readable INTEGER NOT NULL\n );\n CREATE INDEX IF NOT EXISTS vertical_scope_store_versions_slug\n ON vertical_scope_store_versions (vertical_slug, readable);\n -- A vertical every version of which is indexed above.\n CREATE TABLE IF NOT EXISTS vertical_scope_store_indexed (\n vertical_slug TEXT PRIMARY KEY\n );\n";
4
+ /** One declared binding. */
5
+ export interface VerticalScopeStore {
6
+ readonly binding: string;
7
+ readonly driver: string;
8
+ }
9
+ /**
10
+ * Index a version `publishVersion` is inserting, in the insert's transaction, after its row. The
11
+ * vertical's older versions are indexed first when it is not marked yet, so a driver change is judged
12
+ * against every version, not only those a read reached. Refuses (`conflict`) a binding the vertical
13
+ * already declared as another driver, or one declared twice, and then nothing is written.
14
+ */
15
+ export declare function indexVersionScopeStores(db: SwitchSql, verticalSlug: string, versionId: string, manifestJson: string | null): void;
16
+ /**
17
+ * Every binding any version of the vertical declared, in binding order. An unmarked vertical is
18
+ * indexed first (the caller runs this in one transaction). Refuses (`unavailable`) when a version's
19
+ * manifest cannot be read, or when versions stored before the record moved a binding to another driver: the
20
+ * lifecycle cannot name every store the vertical may hold.
21
+ */
22
+ export declare function verticalScopeStoresOf(db: SwitchSql, verticalSlug: string): VerticalScopeStore[];
23
+ /**
24
+ * Every vertical whose any version declared a binding of `driver`, with those bindings (#2300): the
25
+ * store scripts a release rollout of the driver reaches, including a vertical whose serving version
26
+ * dropped the store while a pinned or preview scope still runs one that declares it. Every vertical
27
+ * not indexed yet is indexed first (the caller runs this in one transaction).
28
+ *
29
+ * `unreadable` names the verticals that cannot say: a version whose manifest cannot be read, or
30
+ * versions stored before the record that moved a binding to another driver. Any of them may declare the driver, so
31
+ * a caller that must reach every script (a rollout) refuses while the list is not empty, rather
32
+ * than leave a script on another release without saying so.
33
+ */
34
+ export declare function driverDeclarationsOf(db: SwitchSql, driver: string): {
35
+ verticals: {
36
+ vertical: string;
37
+ stores: VerticalScopeStore[];
38
+ }[];
39
+ unreadable: string[];
40
+ };
41
+ /** A deleted vertical's declarations go with its versions, so a slug registered again starts clean. */
42
+ export declare function forgetVerticalScopeStores(db: SwitchSql, verticalSlug: string): void;
43
+ //# sourceMappingURL=vertical-scope-stores.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vertical-scope-stores.d.ts","sourceRoot":"","sources":["../src/vertical-scope-stores.ts"],"names":[],"mappings":"AA6BA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD,0GAA0G;AAC1G,eAAO,MAAM,yBAAyB,u2BAqBrC,CAAC;AAEF,4BAA4B;AAC5B,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAiFD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,EAAE,EAAE,SAAS,EACb,YAAY,EAAE,MAAM,EACpB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,MAAM,GAAG,IAAI,GAC1B,IAAI,CAGN;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,GAAG,kBAAkB,EAAE,CAa/F;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAClC,EAAE,EAAE,SAAS,EACb,MAAM,EAAE,MAAM,GACb;IAAE,SAAS,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,kBAAkB,EAAE,CAAA;KAAE,EAAE,CAAC;IAAC,UAAU,EAAE,MAAM,EAAE,CAAA;CAAE,CA6B3F;AAED,uGAAuG;AACvG,wBAAgB,yBAAyB,CAAC,EAAE,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,GAAG,IAAI,CAInF"}
@@ -0,0 +1,195 @@
1
+ /**
2
+ * Every scope-store binding a vertical has declared, by any version (#2286, RFC scope-stores L17),
3
+ * shared by both adapters.
4
+ *
5
+ * A store object is named by (tenant, vertical, scope, binding) and carries no version, so a later
6
+ * version that drops a binding leaves the old object holding data. The lifecycle (export, wipe,
7
+ * erasure, the meter) reaches the union of every binding any version declared, which this keeps as
8
+ * a directory table, read by its keys, instead of reading every version's manifest per call.
9
+ *
10
+ * A binding keeps its driver for the life of its vertical. The driver names the store script, so a
11
+ * binding moved to another driver would point the same name at another script's object, and the union would have
12
+ * to hold both. `publishVersion` refuses it instead (`conflict`), in the transaction that inserts
13
+ * the version: one door, where the push can still be told to pick a new binding name. A manifest
14
+ * that declares one binding twice is refused there too.
15
+ *
16
+ * Each version is indexed once, and marked in `vertical_scope_store_versions`; a vertical whose
17
+ * versions are all indexed is marked in `vertical_scope_store_indexed`, so a read of it is three
18
+ * keyed lookups and no per-version work. A version stored before these tables, or loaded by a
19
+ * directory restore from an older dump, leaves its vertical unmarked. Whichever comes first, a read
20
+ * or a publish, then indexes all of the vertical's versions, oldest first, in its own transaction:
21
+ * nothing runs on a constructor's path, a restore needs no backfill of its own, and a publish judges
22
+ * a driver change against every older version, not only those indexed so far. A version whose manifest
23
+ * cannot be read is marked unreadable, and a read of its vertical refuses: it may declare a store
24
+ * nobody can name.
25
+ *
26
+ * Nothing here retires a binding: the record never shrinks (K-50 forbids it as a side effect of a
27
+ * push). The explicit retire step is an open item of the RFC (§10.8).
28
+ */
29
+ import { substratError } from '@substrat-run/contracts';
30
+ /** Interpolated into both adapters' directory DDL, so `lint:spine-ddl` sees one spelling on each side. */
31
+ export const VERTICAL_SCOPE_STORES_DDL = `
32
+ CREATE TABLE IF NOT EXISTS vertical_scope_stores (
33
+ vertical_slug TEXT NOT NULL,
34
+ binding TEXT NOT NULL,
35
+ driver TEXT NOT NULL,
36
+ -- The version that declared the binding first.
37
+ first_version_id TEXT NOT NULL,
38
+ PRIMARY KEY (vertical_slug, binding)
39
+ );
40
+ CREATE TABLE IF NOT EXISTS vertical_scope_store_versions (
41
+ version_id TEXT PRIMARY KEY,
42
+ vertical_slug TEXT NOT NULL,
43
+ -- 0: the manifest could not be read, so the version may declare a store nobody can name.
44
+ readable INTEGER NOT NULL
45
+ );
46
+ CREATE INDEX IF NOT EXISTS vertical_scope_store_versions_slug
47
+ ON vertical_scope_store_versions (vertical_slug, readable);
48
+ -- A vertical every version of which is indexed above.
49
+ CREATE TABLE IF NOT EXISTS vertical_scope_store_indexed (
50
+ vertical_slug TEXT PRIMARY KEY
51
+ );
52
+ `;
53
+ /**
54
+ * The bindings a stored manifest declares, or null when the manifest cannot be read. No manifest
55
+ * declares none. Read for its shape only, `{ binding, driver }` strings as the router reads them:
56
+ * whether a driver is one the platform runs is the push's question, and a record that refused to
57
+ * hold a driver it did not know could not refuse a move away from that driver either.
58
+ */
59
+ function declaredIn(manifestJson) {
60
+ if (manifestJson === null)
61
+ return [];
62
+ let raw;
63
+ try {
64
+ raw = JSON.parse(manifestJson);
65
+ }
66
+ catch {
67
+ return null;
68
+ }
69
+ if (typeof raw !== 'object' || raw === null || Array.isArray(raw))
70
+ return null;
71
+ const stores = raw.scopeStores;
72
+ if (stores === undefined)
73
+ return [];
74
+ if (!Array.isArray(stores))
75
+ return null;
76
+ const declared = [];
77
+ for (const store of stores) {
78
+ const { binding, driver } = (store ?? {});
79
+ if (typeof binding !== 'string' || typeof driver !== 'string')
80
+ return null;
81
+ declared.push({ binding, driver });
82
+ }
83
+ return declared;
84
+ }
85
+ /** One version, judged and written; a version already indexed is left as it is. */
86
+ function indexOne(db, verticalSlug, versionId, manifestJson) {
87
+ if (db.all('SELECT 1 AS present FROM vertical_scope_store_versions WHERE version_id = ?', versionId).length > 0)
88
+ return;
89
+ const declared = declaredIn(manifestJson);
90
+ // Every binding is judged before any is written, so a refusal writes nothing.
91
+ const fresh = [];
92
+ const seen = new Set();
93
+ for (const { binding, driver } of declared ?? []) {
94
+ if (seen.has(binding)) {
95
+ throw substratError('conflict', `a version of '${verticalSlug}' declares scope store '${binding}' twice`);
96
+ }
97
+ seen.add(binding);
98
+ const [held] = db.all('SELECT driver FROM vertical_scope_stores WHERE vertical_slug = ? AND binding = ?', verticalSlug, binding);
99
+ if (held && held.driver !== driver) {
100
+ throw substratError('conflict', `scope store '${binding}' of '${verticalSlug}' is a '${held.driver}', and a binding keeps its driver for ` +
101
+ `the life of its vertical: objects of the old driver may still hold data under that name. ` +
102
+ `Declare the '${driver}' store under a new binding name`);
103
+ }
104
+ if (!held)
105
+ fresh.push({ binding, driver });
106
+ }
107
+ for (const { binding, driver } of fresh) {
108
+ db.run('INSERT INTO vertical_scope_stores (vertical_slug, binding, driver, first_version_id) VALUES (?, ?, ?, ?)', verticalSlug, binding, driver, versionId);
109
+ }
110
+ db.run('INSERT INTO vertical_scope_store_versions (version_id, vertical_slug, readable) VALUES (?, ?, ?)', versionId, verticalSlug, declared === null ? 0 : 1);
111
+ }
112
+ /** Index every version of the vertical not indexed yet, oldest first, then mark the vertical. */
113
+ function indexVertical(db, verticalSlug) {
114
+ if (db.all('SELECT 1 AS present FROM vertical_scope_store_indexed WHERE vertical_slug = ?', verticalSlug).length > 0)
115
+ return;
116
+ const unindexed = db.all(`SELECT v.id, v.manifest_json FROM vertical_versions AS v
117
+ WHERE v.vertical_slug = ?
118
+ AND NOT EXISTS (SELECT 1 FROM vertical_scope_store_versions AS s WHERE s.version_id = v.id)
119
+ ORDER BY v.created_at, v.id`, verticalSlug);
120
+ for (const { id, manifest_json } of unindexed)
121
+ indexOne(db, verticalSlug, id, manifest_json);
122
+ db.run('INSERT OR IGNORE INTO vertical_scope_store_indexed (vertical_slug) VALUES (?)', verticalSlug);
123
+ }
124
+ /**
125
+ * Index a version `publishVersion` is inserting, in the insert's transaction, after its row. The
126
+ * vertical's older versions are indexed first when it is not marked yet, so a driver change is judged
127
+ * against every version, not only those a read reached. Refuses (`conflict`) a binding the vertical
128
+ * already declared as another driver, or one declared twice, and then nothing is written.
129
+ */
130
+ export function indexVersionScopeStores(db, verticalSlug, versionId, manifestJson) {
131
+ indexVertical(db, verticalSlug);
132
+ indexOne(db, verticalSlug, versionId, manifestJson);
133
+ }
134
+ /**
135
+ * Every binding any version of the vertical declared, in binding order. An unmarked vertical is
136
+ * indexed first (the caller runs this in one transaction). Refuses (`unavailable`) when a version's
137
+ * manifest cannot be read, or when versions stored before the record moved a binding to another driver: the
138
+ * lifecycle cannot name every store the vertical may hold.
139
+ */
140
+ export function verticalScopeStoresOf(db, verticalSlug) {
141
+ try {
142
+ indexVertical(db, verticalSlug);
143
+ }
144
+ catch (error) {
145
+ throw substratError('unavailable', `the scope stores of '${verticalSlug}' cannot be named: ${String(error.message ?? error)}`);
146
+ }
147
+ if (db.all('SELECT 1 AS present FROM vertical_scope_store_versions WHERE vertical_slug = ? AND readable = 0 LIMIT 1', verticalSlug).length > 0) {
148
+ throw substratError('unavailable', `a version of '${verticalSlug}' has a manifest that cannot be read, so its scope stores cannot be named`);
149
+ }
150
+ return db.all('SELECT binding, driver FROM vertical_scope_stores WHERE vertical_slug = ? ORDER BY binding', verticalSlug).map(({ binding, driver }) => ({ binding, driver }));
151
+ }
152
+ /**
153
+ * Every vertical whose any version declared a binding of `driver`, with those bindings (#2300): the
154
+ * store scripts a release rollout of the driver reaches, including a vertical whose serving version
155
+ * dropped the store while a pinned or preview scope still runs one that declares it. Every vertical
156
+ * not indexed yet is indexed first (the caller runs this in one transaction).
157
+ *
158
+ * `unreadable` names the verticals that cannot say: a version whose manifest cannot be read, or
159
+ * versions stored before the record that moved a binding to another driver. Any of them may declare the driver, so
160
+ * a caller that must reach every script (a rollout) refuses while the list is not empty, rather
161
+ * than leave a script on another release without saying so.
162
+ */
163
+ export function driverDeclarationsOf(db, driver) {
164
+ const slugs = db.all('SELECT DISTINCT vertical_slug FROM vertical_versions ORDER BY vertical_slug');
165
+ const unreadable = new Set();
166
+ for (const { vertical_slug } of slugs) {
167
+ try {
168
+ indexVertical(db, vertical_slug);
169
+ }
170
+ catch {
171
+ unreadable.add(vertical_slug);
172
+ }
173
+ }
174
+ for (const { vertical_slug } of db.all('SELECT DISTINCT vertical_slug FROM vertical_scope_store_versions WHERE readable = 0')) {
175
+ unreadable.add(vertical_slug);
176
+ }
177
+ const rows = db.all('SELECT vertical_slug, binding FROM vertical_scope_stores WHERE driver = ? ORDER BY vertical_slug, binding', driver);
178
+ const byVertical = new Map();
179
+ for (const { vertical_slug, binding } of rows) {
180
+ const stores = byVertical.get(vertical_slug) ?? [];
181
+ stores.push({ binding, driver });
182
+ byVertical.set(vertical_slug, stores);
183
+ }
184
+ return {
185
+ verticals: [...byVertical].map(([vertical, stores]) => ({ vertical, stores })),
186
+ unreadable: [...unreadable].sort(),
187
+ };
188
+ }
189
+ /** A deleted vertical's declarations go with its versions, so a slug registered again starts clean. */
190
+ export function forgetVerticalScopeStores(db, verticalSlug) {
191
+ db.run('DELETE FROM vertical_scope_stores WHERE vertical_slug = ?', verticalSlug);
192
+ db.run('DELETE FROM vertical_scope_store_versions WHERE vertical_slug = ?', verticalSlug);
193
+ db.run('DELETE FROM vertical_scope_store_indexed WHERE vertical_slug = ?', verticalSlug);
194
+ }
195
+ //# sourceMappingURL=vertical-scope-stores.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vertical-scope-stores.js","sourceRoot":"","sources":["../src/vertical-scope-stores.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAGxD,0GAA0G;AAC1G,MAAM,CAAC,MAAM,yBAAyB,GAAG;;;;;;;;;;;;;;;;;;;;;CAqBxC,CAAC;AAQF;;;;;GAKG;AACH,SAAS,UAAU,CAAC,YAA2B;IAC7C,IAAI,YAAY,KAAK,IAAI;QAAE,OAAO,EAAE,CAAC;IACrC,IAAI,GAAY,CAAC;IACjB,IAAI,CAAC;QACH,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IACjC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;IACD,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IAC/E,MAAM,MAAM,GAAI,GAAiC,CAAC,WAAW,CAAC;IAC9D,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,EAAE,CAAC;IACpC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;QAAE,OAAO,IAAI,CAAC;IACxC,MAAM,QAAQ,GAAyB,EAAE,CAAC;IAC1C,KAAK,MAAM,KAAK,IAAI,MAAmB,EAAE,CAAC;QACxC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,EAAE,CAA4C,CAAC;QACrF,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,MAAM,KAAK,QAAQ;YAAE,OAAO,IAAI,CAAC;QAC3E,QAAQ,CAAC,IAAI,CAAC,EAAE,OA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AAC,IAAI,EAAE,CAAC;QACnD,MAAM,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC;QACjC,UAAU,CAAC,GAAG,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;IACxC,CAAC;IACD,OAAO;QACL,SAAS,EAAE,CAAC,GAAG,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;QAC9E,UAAU,EAAE,CAAC,GAAG,UAAU,CAAC,CAAC,IAAI,EAAE;KACnC,CAAC;AACJ,CAAC;AAED,uGAAuG;AACvG,MAAM,UAAU,yBAAyB,CAAC,EAAa,EAAE,YAAoB;IAC3E,EAAE,CAAC,GAAG,CAAC,2DAA2D,EAAE,YAAY,CAAC,CAAC;IAClF,EAAE,CAAC,GAAG,CAAC,mEAAmE,EAAE,YAAY,CAAC,CAAC;IAC1F,EAAE,CAAC,GAAG,CAAC,kEAAkE,EAAE,YAAY,CAAC,CAAC;AAC3F,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@substrat-run/kernel",
3
- "version": "0.147.0",
3
+ "version": "0.149.0",
4
4
  "description": "Substrat kernel contracts and services — pure TypeScript, no platform imports (D-14)",
5
5
  "license": "AGPL-3.0-only",
6
6
  "repository": {
@@ -34,7 +34,7 @@
34
34
  "dist"
35
35
  ],
36
36
  "dependencies": {
37
- "@substrat-run/contracts": "^0.147.0"
37
+ "@substrat-run/contracts": "^0.149.0"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@types/node": "^22.20.5",