@substrat-run/contract-tests 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 (89) hide show
  1. package/dist/bind-module.d.ts +4 -0
  2. package/dist/bind-module.d.ts.map +1 -1
  3. package/dist/capability-expiry-suite.d.ts.map +1 -1
  4. package/dist/capability-expiry-suite.js +6 -4
  5. package/dist/capability-expiry-suite.js.map +1 -1
  6. package/dist/counter-runner.d.ts +22 -0
  7. package/dist/counter-runner.d.ts.map +1 -0
  8. package/dist/counter-runner.js +96 -0
  9. package/dist/counter-runner.js.map +1 -0
  10. package/dist/derived-module.d.ts +4 -0
  11. package/dist/derived-module.d.ts.map +1 -1
  12. package/dist/directory-restore-suite.d.ts.map +1 -1
  13. package/dist/directory-restore-suite.js +66 -2
  14. package/dist/directory-restore-suite.js.map +1 -1
  15. package/dist/directory-shapes.d.ts +6 -0
  16. package/dist/directory-shapes.d.ts.map +1 -1
  17. package/dist/directory-shapes.js +42 -0
  18. package/dist/directory-shapes.js.map +1 -1
  19. package/dist/entity-state-module.d.ts +8 -0
  20. package/dist/entity-state-module.d.ts.map +1 -1
  21. package/dist/entity-state-module.js +3 -0
  22. package/dist/entity-state-module.js.map +1 -1
  23. package/dist/entity-trash-module.d.ts +4 -0
  24. package/dist/entity-trash-module.d.ts.map +1 -1
  25. package/dist/entity-trash-suite.d.ts.map +1 -1
  26. package/dist/entity-trash-suite.js +20 -0
  27. package/dist/entity-trash-suite.js.map +1 -1
  28. package/dist/erasure-module.d.ts +4 -0
  29. package/dist/erasure-module.d.ts.map +1 -1
  30. package/dist/held-migrations.d.ts +27 -0
  31. package/dist/held-migrations.d.ts.map +1 -0
  32. package/dist/held-migrations.js +39 -0
  33. package/dist/held-migrations.js.map +1 -0
  34. package/dist/index.d.ts +12 -1
  35. package/dist/index.d.ts.map +1 -1
  36. package/dist/index.js +13 -1
  37. package/dist/index.js.map +1 -1
  38. package/dist/migration-fence-suite.d.ts +3 -0
  39. package/dist/migration-fence-suite.d.ts.map +1 -0
  40. package/dist/migration-fence-suite.js +173 -0
  41. package/dist/migration-fence-suite.js.map +1 -0
  42. package/dist/migration-fence.d.ts +42 -0
  43. package/dist/migration-fence.d.ts.map +1 -0
  44. package/dist/migration-fence.js +66 -0
  45. package/dist/migration-fence.js.map +1 -0
  46. package/dist/modules.d.ts +126 -0
  47. package/dist/modules.d.ts.map +1 -1
  48. package/dist/modules.js +23 -0
  49. package/dist/modules.js.map +1 -1
  50. package/dist/orphan-sweep-suite.d.ts +23 -0
  51. package/dist/orphan-sweep-suite.d.ts.map +1 -0
  52. package/dist/orphan-sweep-suite.js +411 -0
  53. package/dist/orphan-sweep-suite.js.map +1 -0
  54. package/dist/permission-suite.d.ts.map +1 -1
  55. package/dist/permission-suite.js +19 -0
  56. package/dist/permission-suite.js.map +1 -1
  57. package/dist/scope-host-suite.d.ts.map +1 -1
  58. package/dist/scope-host-suite.js +465 -10
  59. package/dist/scope-host-suite.js.map +1 -1
  60. package/dist/scope-store-runner-suite.d.ts +46 -0
  61. package/dist/scope-store-runner-suite.d.ts.map +1 -0
  62. package/dist/scope-store-runner-suite.js +187 -0
  63. package/dist/scope-store-runner-suite.js.map +1 -0
  64. package/dist/scope-store-suite.d.ts.map +1 -1
  65. package/dist/scope-store-suite.js +55 -103
  66. package/dist/scope-store-suite.js.map +1 -1
  67. package/dist/stamps-module.d.ts +4 -0
  68. package/dist/stamps-module.d.ts.map +1 -1
  69. package/dist/store-driver-release-suite.d.ts +12 -0
  70. package/dist/store-driver-release-suite.d.ts.map +1 -0
  71. package/dist/store-driver-release-suite.js +561 -0
  72. package/dist/store-driver-release-suite.js.map +1 -0
  73. package/dist/upload-link-module.d.ts +172 -0
  74. package/dist/upload-link-module.d.ts.map +1 -0
  75. package/dist/upload-link-module.js +157 -0
  76. package/dist/upload-link-module.js.map +1 -0
  77. package/dist/upload-link-replay-suite.d.ts +3 -0
  78. package/dist/upload-link-replay-suite.d.ts.map +1 -0
  79. package/dist/upload-link-replay-suite.js +291 -0
  80. package/dist/upload-link-replay-suite.js.map +1 -0
  81. package/dist/upload-link-suite.d.ts +3 -0
  82. package/dist/upload-link-suite.d.ts.map +1 -0
  83. package/dist/upload-link-suite.js +485 -0
  84. package/dist/upload-link-suite.js.map +1 -0
  85. package/dist/vertical-events-suite.d.ts +8 -0
  86. package/dist/vertical-events-suite.d.ts.map +1 -1
  87. package/dist/vertical-events-suite.js +46 -4
  88. package/dist/vertical-events-suite.js.map +1 -1
  89. package/package.json +3 -3
@@ -0,0 +1,173 @@
1
+ /**
2
+ * Contract suite for the data-loss fence (#115): an authored migration that would lose rows a
3
+ * scope holds is refused, on every adapter, and the scope fails closed with its data where it was;
4
+ * the same migration declaring the loss applies; and on a scope that holds nothing, both apply.
5
+ *
6
+ * A scope that holds data when the drop arrives is made the way the migration-comments suite makes
7
+ * one: its own dump, edited back to before the drop (the table, two rows, a journal without
8
+ * `0002`), restored in place. The next pass then runs `0002` against those rows. The fixtures are
9
+ * `fenceUndeclaredMod` and `fenceDeclaredMod`, which every scope in the kit carries.
10
+ */
11
+ import { describe, it, expect, beforeAll, afterAll } from 'vitest';
12
+ import { platformActorId, principalId, scopeId, tenantId } from '@substrat-run/contracts';
13
+ import { ulid } from '@substrat-run/kernel';
14
+ import { FENCE_DECLARED, FENCE_UNDECLARED, FENCE_REUSED_RIGHT, FENCE_REUSED_WRONG, FENCE_WIDE, FENCE_WIDE_COLUMNS, fenceDeclaredMod, fenceUndeclaredMod, fenceWideDdl, fenceReusedRightMod, fenceReusedWrongMod, fenceWideMod, } from './migration-fence.js';
15
+ export function migrationFenceContractSuite(adapterName, makeFixture) {
16
+ describe(`the migration data-loss fence (#115): ${adapterName}`, () => {
17
+ let fixture;
18
+ let host;
19
+ const t = tenantId.parse(ulid());
20
+ const staff = platformActorId.parse(ulid());
21
+ const anyone = principalId.parse(ulid());
22
+ beforeAll(async () => {
23
+ fixture = await makeFixture();
24
+ host = fixture.host;
25
+ host.registerModule(fenceUndeclaredMod);
26
+ host.registerModule(fenceDeclaredMod);
27
+ host.registerModule(fenceWideMod);
28
+ host.registerModule(fenceReusedRightMod);
29
+ host.registerModule(fenceReusedWrongMod);
30
+ await host.admin.createTenant(staff, { id: t, slug: `fence-${t.toLowerCase()}`, name: 'Fence' });
31
+ await host.admin.grantEntitlement(staff, t, FENCE_UNDECLARED.key);
32
+ await host.admin.grantEntitlement(staff, t, FENCE_DECLARED.key);
33
+ await host.admin.grantEntitlement(staff, t, FENCE_WIDE.key);
34
+ await host.admin.grantEntitlement(staff, t, FENCE_REUSED_RIGHT.key);
35
+ await host.admin.grantEntitlement(staff, t, FENCE_REUSED_WRONG.key);
36
+ });
37
+ afterAll(async () => {
38
+ await fixture?.cleanup();
39
+ });
40
+ const provision = async () => {
41
+ const s = scopeId.parse(ulid());
42
+ await host.provisionScope(staff, { tenantId: t, scopeId: s, vertical: 'fence' });
43
+ await host.admin.activateScope(staff, t, s);
44
+ return s;
45
+ };
46
+ const tables = async (s, m) => (await host.getScope(anyone, t, s)).invoke(`${m.key}/tables`, undefined);
47
+ const wideTables = (s) => tables(s, FENCE_WIDE);
48
+ const journalOf = (dump, m) => {
49
+ const table = dump.tables.find((x) => x.name === '_substrat_migrations');
50
+ const [mod, version] = [table.columns.indexOf('module_id'), table.columns.indexOf('version')];
51
+ return table.rows.filter((r) => r[mod] === m.id).map((r) => String(r[version]));
52
+ };
53
+ /** The scope's own dump, edited back to before `m`'s drop: its table, holding two rows. */
54
+ const beforeTheDrop = async (s, m) => {
55
+ const dump = await host.admin.exportScope(staff, t, s);
56
+ expect(dump.tables.some((x) => x.name === m.table)).toBe(false);
57
+ const tables = dump.tables.map((x) => {
58
+ if (x.name !== '_substrat_migrations')
59
+ return x;
60
+ const [mod, version] = [x.columns.indexOf('module_id'), x.columns.indexOf('version')];
61
+ return { ...x, rows: x.rows.filter((r) => !(r[mod] === m.id && r[version] === '0002-drop')) };
62
+ });
63
+ tables.push({
64
+ name: m.table,
65
+ ddl: `CREATE TABLE ${m.table} (id TEXT PRIMARY KEY, body TEXT NOT NULL)`,
66
+ columns: ['id', 'body'],
67
+ rows: [
68
+ ['n1', 'first'],
69
+ ['n2', 'second'],
70
+ ],
71
+ });
72
+ return { ...dump, tables };
73
+ };
74
+ it('on a scope whose table holds nothing, both drops apply', async () => {
75
+ const s = await provision();
76
+ expect(await tables(s, FENCE_UNDECLARED)).toEqual([]);
77
+ expect(await tables(s, FENCE_DECLARED)).toEqual([]);
78
+ const dump = await host.admin.exportScope(staff, t, s);
79
+ expect(journalOf(dump, FENCE_UNDECLARED)).toEqual(['0001-create', '0002-drop']);
80
+ expect(journalOf(dump, FENCE_DECLARED)).toEqual(['0001-create', '0002-drop']);
81
+ });
82
+ it('an undeclared drop of a table holding rows is refused: the scope fails closed and keeps the rows', async () => {
83
+ const s = await provision();
84
+ await host.restoreScope(staff, t, s, await beforeTheDrop(s, FENCE_UNDECLARED));
85
+ const refused = new RegExp(`migration failed for ${FENCE_UNDECLARED.id}@0002-drop — scope fails closed: .*` +
86
+ `would lose data this scope holds.*table ${FENCE_UNDECLARED.table} held 2 row\\(s\\) and is gone.*` +
87
+ `discards: \\{ '${FENCE_UNDECLARED.table}': '<why this data may go>' \\}`);
88
+ await expect(tables(s, FENCE_UNDECLARED)).rejects.toThrow(refused);
89
+ // The sweep's door reports it as the structured failure any failed migration leaves.
90
+ const outcome = await host.migrateScope(t, s);
91
+ expect(outcome).toEqual({ status: 'failed', failure: { version: `${FENCE_UNDECLARED.id}@0002-drop`, error: expect.any(String) } });
92
+ // Nothing of it ran: the rows are there, and the journal does not record the drop.
93
+ const after = await host.admin.exportScope(staff, t, s);
94
+ expect(after.tables.find((x) => x.name === FENCE_UNDECLARED.table)?.rows).toEqual([
95
+ ['n1', 'first'],
96
+ ['n2', 'second'],
97
+ ]);
98
+ expect(journalOf(after, FENCE_UNDECLARED)).toEqual(['0001-create']);
99
+ });
100
+ it('the same drop, declared with `discards`, applies to a table holding rows', async () => {
101
+ const s = await provision();
102
+ await host.restoreScope(staff, t, s, await beforeTheDrop(s, FENCE_DECLARED));
103
+ expect(await tables(s, FENCE_DECLARED)).toEqual([]);
104
+ const after = await host.admin.exportScope(staff, t, s);
105
+ expect(after.tables.some((x) => x.name === FENCE_DECLARED.table)).toBe(false);
106
+ expect(journalOf(after, FENCE_DECLARED)).toEqual(['0001-create', '0002-drop']);
107
+ });
108
+ it('measures a populated 100-column table inside the DO result limit: a lossless migration applies, a loss past the first scan is refused', async () => {
109
+ const s = await provision();
110
+ const dump = await host.admin.exportScope(staff, t, s);
111
+ const tables = dump.tables
112
+ .filter((x) => x.name !== FENCE_WIDE.table)
113
+ .map((x) => {
114
+ if (x.name !== '_substrat_migrations')
115
+ return x;
116
+ const [mod, version] = [x.columns.indexOf('module_id'), x.columns.indexOf('version')];
117
+ return { ...x, rows: x.rows.filter((r) => !(r[mod] === FENCE_WIDE.id && r[version] !== '0001-create')) };
118
+ });
119
+ tables.push({
120
+ name: FENCE_WIDE.table,
121
+ ddl: fenceWideDdl,
122
+ columns: FENCE_WIDE_COLUMNS,
123
+ rows: [FENCE_WIDE_COLUMNS.map((c) => `${c}-value`)],
124
+ });
125
+ await host.restoreScope(staff, t, s, { ...dump, tables });
126
+ const last = `c${FENCE_WIDE.columns - 1}`;
127
+ await expect(wideTables(s)).rejects.toThrow(new RegExp(`migration failed for ${FENCE_WIDE.id}@0003-drop-last — scope fails closed: .*column ${FENCE_WIDE.table}\\.${last} held 1 value\\(s\\) and is gone`));
128
+ const after = await host.admin.exportScope(staff, t, s);
129
+ // 0002 ran (its measuring did not trip the DO's result limit); 0003 did not.
130
+ expect(journalOf(after, FENCE_WIDE)).toEqual(['0001-create', '0002-touch']);
131
+ expect(after.tables.find((x) => x.name === FENCE_WIDE.table)?.columns).toContain(last);
132
+ });
133
+ /**
134
+ * The scope's own dump, back before `m`'s `0002`: its `_a` (two rows) and `_b` (one row), in
135
+ * the catalogue order `bFirst` says, and no `_c`.
136
+ */
137
+ const beforeTheReplace = async (s, m, bFirst) => {
138
+ const dump = await host.admin.exportScope(staff, t, s);
139
+ const table = (suffix, rows) => ({ name: `${m.prefix}_${suffix}`, ddl: `CREATE TABLE ${m.prefix}_${suffix} (id TEXT, x TEXT)`, columns: ['id', 'x'], rows });
140
+ const a = table('a', [
141
+ ['1', 'p'],
142
+ ['2', 'q'],
143
+ ]);
144
+ const b = table('b', [['x', 'r']]);
145
+ const tables = dump.tables
146
+ .filter((x) => x.name !== m.table)
147
+ .map((x) => {
148
+ if (x.name !== '_substrat_migrations')
149
+ return x;
150
+ const [mod, version] = [x.columns.indexOf('module_id'), x.columns.indexOf('version')];
151
+ return { ...x, rows: x.rows.filter((r) => !(r[mod] === m.id && r[version] === '0002-replace')) };
152
+ });
153
+ return { ...dump, tables: [...tables, ...(bFirst ? [b, a] : [a, b])] };
154
+ };
155
+ describe.each([true, false])('a dropped name reused by a rename, then renamed again (b created first: %s) (#115 r2)', (bFirst) => {
156
+ it("declared as the dropped table's loss, it applies, and the renamed table's rows are in its new name", async () => {
157
+ const s = await provision();
158
+ await host.restoreScope(staff, t, s, await beforeTheReplace(s, FENCE_REUSED_RIGHT, bFirst));
159
+ expect(await tables(s, FENCE_REUSED_RIGHT)).toEqual([FENCE_REUSED_RIGHT.table]);
160
+ const after = await host.admin.exportScope(staff, t, s);
161
+ expect(after.tables.find((x) => x.name === FENCE_REUSED_RIGHT.table)?.rows.map((r) => r[0]).sort()).toEqual(['1', '2']);
162
+ expect(journalOf(after, FENCE_REUSED_RIGHT)).toEqual(['0001-create', '0002-replace']);
163
+ });
164
+ it('declared as the renamed table instead, it is refused, naming the table whose rows are gone', async () => {
165
+ const s = await provision();
166
+ await host.restoreScope(staff, t, s, await beforeTheReplace(s, FENCE_REUSED_WRONG, bFirst));
167
+ await expect(tables(s, FENCE_REUSED_WRONG)).rejects.toThrow(new RegExp(`migration failed for ${FENCE_REUSED_WRONG.id}@0002-replace — scope fails closed: .*table ${FENCE_REUSED_WRONG.prefix}_b held 1 row\\(s\\) and is gone`));
168
+ expect(journalOf(await host.admin.exportScope(staff, t, s), FENCE_REUSED_WRONG)).toEqual(['0001-create']);
169
+ });
170
+ });
171
+ });
172
+ }
173
+ //# sourceMappingURL=migration-fence-suite.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migration-fence-suite.js","sourceRoot":"","sources":["../src/migration-fence-suite.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAkB,MAAM,yBAAyB,CAAC;AAC1G,OAAO,EAAE,IAAI,EAAkB,MAAM,sBAAsB,CAAC;AAE5D,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,kBAAkB,EAClB,UAAU,EACV,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,YAAY,EACZ,mBAAmB,EACnB,mBAAmB,EACnB,YAAY,GACb,MAAM,sBAAsB,CAAC;AAS9B,MAAM,UAAU,2BAA2B,CAAC,WAAmB,EAAE,WAA4C;IAC3G,QAAQ,CAAC,yCAAyC,WAAW,EAAE,EAAE,GAAG,EAAE;QACpE,IAAI,OAAyB,CAAC;QAC9B,IAAI,IAAe,CAAC;QACpB,MAAM,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;QACjC,MAAM,KAAK,GAAG,eAAe,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;QAC5C,MAAM,MAAM,GAAG,WAAW,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;QAEzC,SAAS,CAAC,KAAK,IAAI,EAAE;YACnB,OAAO,GAAG,MAAM,WAAW,EAAE,CAAC;YAC9B,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;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C;gBACxH,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE,kBAAkB,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC,CAAC;YACxF,CAAC,CAAC,CAAC;YAEH,EAAE,CAAC,4FAA4F,EAAE,KAAK,IAAI,EAAE;gBAC1G,MAAM,CAAC,GAAG,MAAM,SAAS,EAAE,CAAC;gBAC5B,MAAM,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,gBAAgB,CAAC,CAAC,EAAE,kBAAkB,EAAE,MAAM,CAAC,CAAC,CAAC;gBAC5F,MAAM,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CACzD,IAAI,MAAM,CAAC,wBAAwB,kBAAkB,CAAC,EAAE,+CAA+C,kBAAkB,CAAC,MAAM,kCAAkC,CAAC,CACpK,CAAC;gBACF,MAAM,CAAC,SAAS,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,kBAAkB,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC;YAC5G,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,42 @@
1
+ import type { ModuleRegistration } from '@substrat-run/kernel';
2
+ export declare const FENCE_UNDECLARED: {
3
+ readonly id: '@test/fence-undeclared';
4
+ readonly key: 'fence-undeclared';
5
+ readonly table: 'fu_notes';
6
+ };
7
+ export declare const FENCE_DECLARED: {
8
+ readonly id: '@test/fence-declared';
9
+ readonly key: 'fence-declared';
10
+ readonly table: 'fd_notes';
11
+ };
12
+ export declare const fenceUndeclaredMod: ModuleRegistration<[]>;
13
+ export declare const fenceDeclaredMod: ModuleRegistration<[]>;
14
+ /**
15
+ * #115 r1: a table as wide as a Durable Object allows (100 columns), so the fence's measuring query
16
+ * meets the DO's 100-column result limit on the host that enforces it. `0002` loses nothing and
17
+ * must apply; `0003` drops the last column, past the first measuring scan.
18
+ */
19
+ export declare const FENCE_WIDE: {
20
+ readonly id: '@test/fence-wide';
21
+ readonly key: 'fence-wide';
22
+ readonly table: 'fw_wide';
23
+ readonly columns: 100;
24
+ };
25
+ export declare const FENCE_WIDE_COLUMNS: string[];
26
+ export declare const fenceWideDdl: string;
27
+ export declare const fenceWideMod: ModuleRegistration<[]>;
28
+ export declare const FENCE_REUSED_RIGHT: {
29
+ readonly id: '@test/fence-reused-right';
30
+ readonly key: 'fence-reused-right';
31
+ readonly table: 'frr_c';
32
+ readonly prefix: 'frr';
33
+ };
34
+ export declare const FENCE_REUSED_WRONG: {
35
+ readonly id: '@test/fence-reused-wrong';
36
+ readonly key: 'fence-reused-wrong';
37
+ readonly table: 'frw_c';
38
+ readonly prefix: 'frw';
39
+ };
40
+ export declare const fenceReusedRightMod: ModuleRegistration<[]>;
41
+ export declare const fenceReusedWrongMod: ModuleRegistration<[]>;
42
+ //# sourceMappingURL=migration-fence.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migration-fence.d.ts","sourceRoot":"","sources":["../src/migration-fence.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,kBAAkB,EAAkC,MAAM,sBAAsB,CAAC;AAwB/F,eAAO,MAAM,gBAAgB;aAAK,EAAE,EAAE,wBAAwB;aAAE,GAAG,EAAE,kBAAkB;aAAE,KAAK,EAAE,UAAU;CAAW,CAAC;AACtH,eAAO,MAAM,cAAc;aAAK,EAAE,EAAE,sBAAsB;aAAE,GAAG,EAAE,gBAAgB;aAAE,KAAK,EAAE,UAAU;CAAW,CAAC;AAOhH,eAAO,MAAM,kBAAkB,wBAA4H,CAAC;AAC5J,eAAO,MAAM,gBAAgB,wBAK5B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,UAAU;aAAK,EAAE,EAAE,kBAAkB;aAAE,GAAG,EAAE,YAAY;aAAE,KAAK,EAAE,SAAS;aAAE,OAAO,EAAE,GAAG;CAAW,CAAC;AACjH,eAAO,MAAM,kBAAkB,UAAmF,CAAC;AACnH,eAAO,MAAM,YAAY,QAET,CAAC;AACjB,eAAO,MAAM,YAAY,wBAIvB,CAAC;AAgBH,eAAO,MAAM,kBAAkB;aAAK,EAAE,EAAE,0BAA0B;aAAE,GAAG,EAAE,oBAAoB;aAAE,KAAK,EAAE,OAAO;aAAE,MAAM,EAAE,KAAK;CAAW,CAAC;AACxI,eAAO,MAAM,kBAAkB;aAAK,EAAE,EAAE,0BAA0B;aAAE,GAAG,EAAE,oBAAoB;aAAE,KAAK,EAAE,OAAO;aAAE,MAAM,EAAE,KAAK;CAAW,CAAC;AACxI,eAAO,MAAM,mBAAmB,wBAA+G,CAAC;AAChJ,eAAO,MAAM,mBAAmB,wBAA+G,CAAC"}
@@ -0,0 +1,66 @@
1
+ /**
2
+ * #115: two modules whose second migration drops their table — one undeclared, one declaring the
3
+ * loss with `discards`. On a scope where the table is empty both apply, which is every scope in
4
+ * the kit; `migrationFenceContractSuite` gives the table rows by restoring a dump from before the
5
+ * drop, and that is where the two part company.
6
+ */
7
+ import { moduleManifest } from '@substrat-run/contracts';
8
+ import { testOperations } from './test-operations.js';
9
+ const fenceModule = (id, key, table, migrations) => ({
10
+ manifest: moduleManifest.parse({
11
+ id,
12
+ version: '1.0.0',
13
+ kernelContract: '^0.0.1',
14
+ permissions: [],
15
+ events: { emits: [], consumes: [] },
16
+ migrations: { journalDir: './migrations', compatibleFrom: '1.0.0' },
17
+ attachmentTargets: [],
18
+ entitlementKey: key,
19
+ }),
20
+ migrations,
21
+ ...testOperations({
22
+ [`${key}/tables`]: ((ctx) => ctx.sql.query(`SELECT name FROM sqlite_master WHERE type = 'table' AND name = '${table}'`).map((r) => r.name)),
23
+ }),
24
+ });
25
+ export const FENCE_UNDECLARED = { id: '@test/fence-undeclared', key: 'fence-undeclared', table: 'fu_notes' };
26
+ export const FENCE_DECLARED = { id: '@test/fence-declared', key: 'fence-declared', table: 'fd_notes' };
27
+ const createAndDrop = (table, drop) => [
28
+ { version: '0001-create', sql: `CREATE TABLE ${table} (id TEXT PRIMARY KEY, body TEXT NOT NULL);` },
29
+ { version: '0002-drop', sql: `DROP TABLE ${table};`, ...drop },
30
+ ];
31
+ export const fenceUndeclaredMod = fenceModule(FENCE_UNDECLARED.id, FENCE_UNDECLARED.key, FENCE_UNDECLARED.table, createAndDrop(FENCE_UNDECLARED.table, {}));
32
+ export const fenceDeclaredMod = fenceModule(FENCE_DECLARED.id, FENCE_DECLARED.key, FENCE_DECLARED.table, createAndDrop(FENCE_DECLARED.table, { discards: { [FENCE_DECLARED.table]: 'contract fixture: the notes this table held are retired' } }));
33
+ /**
34
+ * #115 r1: a table as wide as a Durable Object allows (100 columns), so the fence's measuring query
35
+ * meets the DO's 100-column result limit on the host that enforces it. `0002` loses nothing and
36
+ * must apply; `0003` drops the last column, past the first measuring scan.
37
+ */
38
+ export const FENCE_WIDE = { id: '@test/fence-wide', key: 'fence-wide', table: 'fw_wide', columns: 100 };
39
+ export const FENCE_WIDE_COLUMNS = ['id', ...Array.from({ length: FENCE_WIDE.columns - 1 }, (_, i) => `c${i + 1}`)];
40
+ export const fenceWideDdl = `CREATE TABLE ${FENCE_WIDE.table} (id TEXT PRIMARY KEY, ${FENCE_WIDE_COLUMNS.slice(1)
41
+ .map((c) => `${c} TEXT`)
42
+ .join(', ')})`;
43
+ export const fenceWideMod = fenceModule(FENCE_WIDE.id, FENCE_WIDE.key, FENCE_WIDE.table, [
44
+ { version: '0001-create', sql: `${fenceWideDdl};` },
45
+ { version: '0002-touch', sql: `UPDATE ${FENCE_WIDE.table} SET c1 = c1;` },
46
+ { version: '0003-drop-last', sql: `ALTER TABLE ${FENCE_WIDE.table} DROP COLUMN c${FENCE_WIDE.columns - 1};` },
47
+ ]);
48
+ /**
49
+ * #115 r2: a dropped name reused by a rename, then renamed again. `0002` drops `<p>_b`, renames
50
+ * `<p>_a` onto that name and on to `<p>_c`. Declared as `<p>_b`'s loss it applies; declared as
51
+ * `<p>_a`'s — the remedy a rename credited to the dropped table would name — it is refused, since
52
+ * `<p>_a`'s rows are all in `<p>_c` and `<p>_b`'s are the ones gone.
53
+ */
54
+ const reusedName = (p, discard) => [
55
+ { version: '0001-create', sql: `CREATE TABLE ${p}_b (id TEXT, x TEXT); CREATE TABLE ${p}_a (id TEXT, x TEXT);` },
56
+ {
57
+ version: '0002-replace',
58
+ sql: `DROP TABLE ${p}_b; ALTER TABLE ${p}_a RENAME TO ${p}_b; ALTER TABLE ${p}_b RENAME TO ${p}_c;`,
59
+ discards: { [`${p}_${discard}`]: 'contract fixture: the staging copy is replaced' },
60
+ },
61
+ ];
62
+ export const FENCE_REUSED_RIGHT = { id: '@test/fence-reused-right', key: 'fence-reused-right', table: 'frr_c', prefix: 'frr' };
63
+ export const FENCE_REUSED_WRONG = { id: '@test/fence-reused-wrong', key: 'fence-reused-wrong', table: 'frw_c', prefix: 'frw' };
64
+ export const fenceReusedRightMod = fenceModule(FENCE_REUSED_RIGHT.id, FENCE_REUSED_RIGHT.key, FENCE_REUSED_RIGHT.table, reusedName('frr', 'b'));
65
+ export const fenceReusedWrongMod = fenceModule(FENCE_REUSED_WRONG.id, FENCE_REUSED_WRONG.key, FENCE_REUSED_WRONG.table, reusedName('frw', 'a'));
66
+ //# sourceMappingURL=migration-fence.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migration-fence.js","sourceRoot":"","sources":["../src/migration-fence.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,MAAM,WAAW,GAAG,CAAC,EAAU,EAAE,GAAW,EAAE,KAAa,EAAE,UAA0B,EAAsB,EAAE,CAAC,CAAC;IAC/G,QAAQ,EAAE,cA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10 @@ export declare const testModManifest: {
71
71
  entityType: string;
72
72
  readPermission: string & z.$brand<"PermissionKey">;
73
73
  writePermission?: (string & z.$brand<"PermissionKey">) | undefined;
74
+ uploadLinks?: {
75
+ maxBytes: number;
76
+ contentTypes?: string[] | undefined;
77
+ } | undefined;
74
78
  }[];
75
79
  liveTargets?: {
76
80
  entityType: string;
@@ -227,6 +231,10 @@ export declare const scheduleModManifest: {
227
231
  entityType: string;
228
232
  readPermission: string & z.$brand<"PermissionKey">;
229
233
  writePermission?: (string & z.$brand<"PermissionKey">) | undefined;
234
+ uploadLinks?: {
235
+ maxBytes: number;
236
+ contentTypes?: string[] | undefined;
237
+ } | undefined;
230
238
  }[];
231
239
  liveTargets?: {
232
240
  entityType: string;
@@ -389,6 +397,10 @@ export declare const freshnessModManifest: {
389
397
  entityType: string;
390
398
  readPermission: string & z.$brand<"PermissionKey">;
391
399
  writePermission?: (string & z.$brand<"PermissionKey">) | undefined;
400
+ uploadLinks?: {
401
+ maxBytes: number;
402
+ contentTypes?: string[] | undefined;
403
+ } | undefined;
392
404
  }[];
393
405
  liveTargets?: {
394
406
  entityType: string;
@@ -563,6 +575,10 @@ export declare const jobsModManifest: {
563
575
  entityType: string;
564
576
  readPermission: string & z.$brand<"PermissionKey">;
565
577
  writePermission?: (string & z.$brand<"PermissionKey">) | undefined;
578
+ uploadLinks?: {
579
+ maxBytes: number;
580
+ contentTypes?: string[] | undefined;
581
+ } | undefined;
566
582
  }[];
567
583
  liveTargets?: {
568
584
  entityType: string;
@@ -720,6 +736,10 @@ export declare const flowModManifest: {
720
736
  entityType: string;
721
737
  readPermission: string & z.$brand<"PermissionKey">;
722
738
  writePermission?: (string & z.$brand<"PermissionKey">) | undefined;
739
+ uploadLinks?: {
740
+ maxBytes: number;
741
+ contentTypes?: string[] | undefined;
742
+ } | undefined;
723
743
  }[];
724
744
  liveTargets?: {
725
745
  entityType: string;
@@ -876,6 +896,10 @@ export declare const atomicModManifest: {
876
896
  entityType: string;
877
897
  readPermission: string & z.$brand<"PermissionKey">;
878
898
  writePermission?: (string & z.$brand<"PermissionKey">) | undefined;
899
+ uploadLinks?: {
900
+ maxBytes: number;
901
+ contentTypes?: string[] | undefined;
902
+ } | undefined;
879
903
  }[];
880
904
  liveTargets?: {
881
905
  entityType: string;
@@ -1032,6 +1056,10 @@ export declare const lateModManifest: {
1032
1056
  entityType: string;
1033
1057
  readPermission: string & z.$brand<"PermissionKey">;
1034
1058
  writePermission?: (string & z.$brand<"PermissionKey">) | undefined;
1059
+ uploadLinks?: {
1060
+ maxBytes: number;
1061
+ contentTypes?: string[] | undefined;
1062
+ } | undefined;
1035
1063
  }[];
1036
1064
  liveTargets?: {
1037
1065
  entityType: string;
@@ -1188,6 +1216,10 @@ export declare const billedModManifest: {
1188
1216
  entityType: string;
1189
1217
  readPermission: string & z.$brand<"PermissionKey">;
1190
1218
  writePermission?: (string & z.$brand<"PermissionKey">) | undefined;
1219
+ uploadLinks?: {
1220
+ maxBytes: number;
1221
+ contentTypes?: string[] | undefined;
1222
+ } | undefined;
1191
1223
  }[];
1192
1224
  liveTargets?: {
1193
1225
  entityType: string;
@@ -1344,6 +1376,10 @@ export declare const guardedModManifest: {
1344
1376
  entityType: string;
1345
1377
  readPermission: string & z.$brand<"PermissionKey">;
1346
1378
  writePermission?: (string & z.$brand<"PermissionKey">) | undefined;
1379
+ uploadLinks?: {
1380
+ maxBytes: number;
1381
+ contentTypes?: string[] | undefined;
1382
+ } | undefined;
1347
1383
  }[];
1348
1384
  liveTargets?: {
1349
1385
  entityType: string;
@@ -1500,6 +1536,10 @@ export declare const withdrawEarlyManifest: {
1500
1536
  entityType: string;
1501
1537
  readPermission: string & z.$brand<"PermissionKey">;
1502
1538
  writePermission?: (string & z.$brand<"PermissionKey">) | undefined;
1539
+ uploadLinks?: {
1540
+ maxBytes: number;
1541
+ contentTypes?: string[] | undefined;
1542
+ } | undefined;
1503
1543
  }[];
1504
1544
  liveTargets?: {
1505
1545
  entityType: string;
@@ -1656,6 +1696,10 @@ export declare const victimModManifest: {
1656
1696
  entityType: string;
1657
1697
  readPermission: string & z.$brand<"PermissionKey">;
1658
1698
  writePermission?: (string & z.$brand<"PermissionKey">) | undefined;
1699
+ uploadLinks?: {
1700
+ maxBytes: number;
1701
+ contentTypes?: string[] | undefined;
1702
+ } | undefined;
1659
1703
  }[];
1660
1704
  liveTargets?: {
1661
1705
  entityType: string;
@@ -1812,6 +1856,10 @@ export declare const withdrawLateManifest: {
1812
1856
  entityType: string;
1813
1857
  readPermission: string & z.$brand<"PermissionKey">;
1814
1858
  writePermission?: (string & z.$brand<"PermissionKey">) | undefined;
1859
+ uploadLinks?: {
1860
+ maxBytes: number;
1861
+ contentTypes?: string[] | undefined;
1862
+ } | undefined;
1815
1863
  }[];
1816
1864
  liveTargets?: {
1817
1865
  entityType: string;
@@ -1968,6 +2016,10 @@ export declare const gateModManifest: {
1968
2016
  entityType: string;
1969
2017
  readPermission: string & z.$brand<"PermissionKey">;
1970
2018
  writePermission?: (string & z.$brand<"PermissionKey">) | undefined;
2019
+ uploadLinks?: {
2020
+ maxBytes: number;
2021
+ contentTypes?: string[] | undefined;
2022
+ } | undefined;
1971
2023
  }[];
1972
2024
  liveTargets?: {
1973
2025
  entityType: string;
@@ -2133,6 +2185,10 @@ export declare const impersonationEchoManifest: {
2133
2185
  entityType: string;
2134
2186
  readPermission: string & z.$brand<"PermissionKey">;
2135
2187
  writePermission?: (string & z.$brand<"PermissionKey">) | undefined;
2188
+ uploadLinks?: {
2189
+ maxBytes: number;
2190
+ contentTypes?: string[] | undefined;
2191
+ } | undefined;
2136
2192
  }[];
2137
2193
  liveTargets?: {
2138
2194
  entityType: string;
@@ -2289,6 +2345,10 @@ export declare const permModManifest: {
2289
2345
  entityType: string;
2290
2346
  readPermission: string & z.$brand<"PermissionKey">;
2291
2347
  writePermission?: (string & z.$brand<"PermissionKey">) | undefined;
2348
+ uploadLinks?: {
2349
+ maxBytes: number;
2350
+ contentTypes?: string[] | undefined;
2351
+ } | undefined;
2292
2352
  }[];
2293
2353
  liveTargets?: {
2294
2354
  entityType: string;
@@ -2459,6 +2519,10 @@ export declare const deniedScheduleModManifest: {
2459
2519
  entityType: string;
2460
2520
  readPermission: string & z.$brand<"PermissionKey">;
2461
2521
  writePermission?: (string & z.$brand<"PermissionKey">) | undefined;
2522
+ uploadLinks?: {
2523
+ maxBytes: number;
2524
+ contentTypes?: string[] | undefined;
2525
+ } | undefined;
2462
2526
  }[];
2463
2527
  liveTargets?: {
2464
2528
  entityType: string;
@@ -2628,6 +2692,10 @@ export declare const composedEngineModManifest: {
2628
2692
  entityType: string;
2629
2693
  readPermission: string & z.$brand<"PermissionKey">;
2630
2694
  writePermission?: (string & z.$brand<"PermissionKey">) | undefined;
2695
+ uploadLinks?: {
2696
+ maxBytes: number;
2697
+ contentTypes?: string[] | undefined;
2698
+ } | undefined;
2631
2699
  }[];
2632
2700
  liveTargets?: {
2633
2701
  entityType: string;
@@ -2793,6 +2861,10 @@ export declare const composerModManifest: {
2793
2861
  entityType: string;
2794
2862
  readPermission: string & z.$brand<"PermissionKey">;
2795
2863
  writePermission?: (string & z.$brand<"PermissionKey">) | undefined;
2864
+ uploadLinks?: {
2865
+ maxBytes: number;
2866
+ contentTypes?: string[] | undefined;
2867
+ } | undefined;
2796
2868
  }[];
2797
2869
  liveTargets?: {
2798
2870
  entityType: string;
@@ -2960,6 +3032,10 @@ export declare const connectorModManifest: {
2960
3032
  entityType: string;
2961
3033
  readPermission: string & z.$brand<"PermissionKey">;
2962
3034
  writePermission?: (string & z.$brand<"PermissionKey">) | undefined;
3035
+ uploadLinks?: {
3036
+ maxBytes: number;
3037
+ contentTypes?: string[] | undefined;
3038
+ } | undefined;
2963
3039
  }[];
2964
3040
  liveTargets?: {
2965
3041
  entityType: string;
@@ -3147,6 +3223,10 @@ export declare const listModManifest: {
3147
3223
  entityType: string;
3148
3224
  readPermission: string & z.$brand<"PermissionKey">;
3149
3225
  writePermission?: (string & z.$brand<"PermissionKey">) | undefined;
3226
+ uploadLinks?: {
3227
+ maxBytes: number;
3228
+ contentTypes?: string[] | undefined;
3229
+ } | undefined;
3150
3230
  }[];
3151
3231
  liveTargets?: {
3152
3232
  entityType: string;
@@ -3320,6 +3400,10 @@ export declare const searchModManifest: {
3320
3400
  entityType: string;
3321
3401
  readPermission: string & z.$brand<"PermissionKey">;
3322
3402
  writePermission?: (string & z.$brand<"PermissionKey">) | undefined;
3403
+ uploadLinks?: {
3404
+ maxBytes: number;
3405
+ contentTypes?: string[] | undefined;
3406
+ } | undefined;
3323
3407
  }[];
3324
3408
  liveTargets?: {
3325
3409
  entityType: string;
@@ -3477,6 +3561,10 @@ export declare const parseModManifest: {
3477
3561
  entityType: string;
3478
3562
  readPermission: string & z.$brand<"PermissionKey">;
3479
3563
  writePermission?: (string & z.$brand<"PermissionKey">) | undefined;
3564
+ uploadLinks?: {
3565
+ maxBytes: number;
3566
+ contentTypes?: string[] | undefined;
3567
+ } | undefined;
3480
3568
  }[];
3481
3569
  liveTargets?: {
3482
3570
  entityType: string;
@@ -3634,6 +3722,10 @@ export declare const concurrencyModManifest: {
3634
3722
  entityType: string;
3635
3723
  readPermission: string & z.$brand<"PermissionKey">;
3636
3724
  writePermission?: (string & z.$brand<"PermissionKey">) | undefined;
3725
+ uploadLinks?: {
3726
+ maxBytes: number;
3727
+ contentTypes?: string[] | undefined;
3728
+ } | undefined;
3637
3729
  }[];
3638
3730
  liveTargets?: {
3639
3731
  entityType: string;
@@ -3791,6 +3883,10 @@ export declare const idempotencyModManifest: {
3791
3883
  entityType: string;
3792
3884
  readPermission: string & z.$brand<"PermissionKey">;
3793
3885
  writePermission?: (string & z.$brand<"PermissionKey">) | undefined;
3886
+ uploadLinks?: {
3887
+ maxBytes: number;
3888
+ contentTypes?: string[] | undefined;
3889
+ } | undefined;
3794
3890
  }[];
3795
3891
  liveTargets?: {
3796
3892
  entityType: string;
@@ -3958,6 +4054,10 @@ export declare const capModManifest: {
3958
4054
  entityType: string;
3959
4055
  readPermission: string & z.$brand<"PermissionKey">;
3960
4056
  writePermission?: (string & z.$brand<"PermissionKey">) | undefined;
4057
+ uploadLinks?: {
4058
+ maxBytes: number;
4059
+ contentTypes?: string[] | undefined;
4060
+ } | undefined;
3961
4061
  }[];
3962
4062
  liveTargets?: {
3963
4063
  entityType: string;
@@ -4131,6 +4231,10 @@ export declare const peerModManifest: {
4131
4231
  entityType: string;
4132
4232
  readPermission: string & z.$brand<"PermissionKey">;
4133
4233
  writePermission?: (string & z.$brand<"PermissionKey">) | undefined;
4234
+ uploadLinks?: {
4235
+ maxBytes: number;
4236
+ contentTypes?: string[] | undefined;
4237
+ } | undefined;
4134
4238
  }[];
4135
4239
  liveTargets?: {
4136
4240
  entityType: string;
@@ -4256,6 +4360,8 @@ export declare const peerModManifest: {
4256
4360
  } | undefined;
4257
4361
  };
4258
4362
  export declare const peerMod: ModuleRegistration;
4363
+ export declare const peerModNarrowed: ModuleRegistration;
4364
+ export declare const peerModWithoutCaller: ModuleRegistration;
4259
4365
  export declare const emittedModManifest: {
4260
4366
  id: string & z.$brand<"ModuleId">;
4261
4367
  version: string;
@@ -4288,6 +4394,10 @@ export declare const emittedModManifest: {
4288
4394
  entityType: string;
4289
4395
  readPermission: string & z.$brand<"PermissionKey">;
4290
4396
  writePermission?: (string & z.$brand<"PermissionKey">) | undefined;
4397
+ uploadLinks?: {
4398
+ maxBytes: number;
4399
+ contentTypes?: string[] | undefined;
4400
+ } | undefined;
4291
4401
  }[];
4292
4402
  liveTargets?: {
4293
4403
  entityType: string;
@@ -4450,6 +4560,10 @@ export declare const loggedModManifest: {
4450
4560
  entityType: string;
4451
4561
  readPermission: string & z.$brand<"PermissionKey">;
4452
4562
  writePermission?: (string & z.$brand<"PermissionKey">) | undefined;
4563
+ uploadLinks?: {
4564
+ maxBytes: number;
4565
+ contentTypes?: string[] | undefined;
4566
+ } | undefined;
4453
4567
  }[];
4454
4568
  liveTargets?: {
4455
4569
  entityType: string;
@@ -4613,6 +4727,10 @@ export declare const asyncLogModManifest: {
4613
4727
  entityType: string;
4614
4728
  readPermission: string & z.$brand<"PermissionKey">;
4615
4729
  writePermission?: (string & z.$brand<"PermissionKey">) | undefined;
4730
+ uploadLinks?: {
4731
+ maxBytes: number;
4732
+ contentTypes?: string[] | undefined;
4733
+ } | undefined;
4616
4734
  }[];
4617
4735
  liveTargets?: {
4618
4736
  entityType: string;
@@ -4795,6 +4913,10 @@ export declare const liveModManifest: {
4795
4913
  entityType: string;
4796
4914
  readPermission: string & z.$brand<"PermissionKey">;
4797
4915
  writePermission?: (string & z.$brand<"PermissionKey">) | undefined;
4916
+ uploadLinks?: {
4917
+ maxBytes: number;
4918
+ contentTypes?: string[] | undefined;
4919
+ } | undefined;
4798
4920
  }[];
4799
4921
  liveTargets?: {
4800
4922
  entityType: string;
@@ -4952,6 +5074,10 @@ export declare const brokenModManifest: {
4952
5074
  entityType: string;
4953
5075
  readPermission: string & z.$brand<"PermissionKey">;
4954
5076
  writePermission?: (string & z.$brand<"PermissionKey">) | undefined;
5077
+ uploadLinks?: {
5078
+ maxBytes: number;
5079
+ contentTypes?: string[] | undefined;
5080
+ } | undefined;
4955
5081
  }[];
4956
5082
  liveTargets?: {
4957
5083
  entityType: string;