@substrat-run/contract-tests 0.176.0 → 0.178.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.
@@ -1,8 +1,14 @@
1
1
  import { type StoreResponse } from '@substrat-run/contracts';
2
- import type { ScopeStoreAddress, ScopeStoreRunner } from '@substrat-run/kernel';
2
+ import { type ScopeStoreAddress, type ScopeStoreRunner } from '@substrat-run/kernel';
3
3
  export declare const invalidStoreInput: (message: string) => StoreResponse;
4
+ /** A stage the object does not hold, or one it will not take again: 409 `stage_refused` (D-69). */
5
+ export declare const stageRefused: (message: string) => StoreResponse;
4
6
  /** The object an address names: the same string the hosted path signs. */
5
7
  export declare const objectNameOf: (address: ScopeStoreAddress) => string;
8
+ export interface CounterRunnerOptions {
9
+ /** The clock a stage's age is read from, in ms. A test moves it; it defaults to `Date.now`. */
10
+ now?: () => number;
11
+ }
6
12
  /**
7
13
  * The trivial driver (#2213, RFC §7): a counter per address, in the process. The
8
14
  * reference runner both contract suites use, and the one the runner suite holds to
@@ -12,11 +18,24 @@ export declare const objectNameOf: (address: ScopeStoreAddress) => string;
12
18
  * negative). Each increment is kept against the subject it names, so the object holds
13
19
  * personal data the way a real driver does: `substrat.erase` removes that subject's part
14
20
  * and answers `{ erased: 1 }` only if there was one, so a repeat, or a subject that
15
- * never wrote, answers 0. A wipe or an import replaces everything, subjects included.
16
- * `substrat.size` reports the total as `bytes`: a stand-in for storage, never negative.
21
+ * never wrote, answers 0. A wipe or a commit replaces everything, subjects included.
22
+ * `substrat.size` reports the total, and what its stage holds, as `bytes`: a stand-in for
23
+ * storage, never negative.
24
+ *
25
+ * Its dump moves in pages (D-69), one table of rows cut by `maxBytes` with the kernel's own page
26
+ * accounting (UTF-8 bytes, the table heading, always one row), so the contract is shown on a driver
27
+ * written in TypeScript as well as on one in Python. The revision counts every change to what the
28
+ * dump holds: an increment, a commit, a wipe, and an erase that erased something. A stage unused for
29
+ * longer than `STORE_STAGE_MAX_AGE_MS` is dropped no later than the next call to its object, by the
30
+ * injectable clock, so the driver needs no timer. A wipe and an erase drop every stage. A commit
31
+ * answers the count of distinct tables, and asked again for the stage last committed it answers the
32
+ * same count and changes nothing; only a wipe ends that memory, and a stage id that was committed is
33
+ * not taken again. A stage the object does not hold is refused with 409 `stage_refused`. It takes
34
+ * only rows of its `counter` table and refuses any other table or a negative count when they are
35
+ * staged. Its pages have no row limit of their own, so it never refuses a row it gave.
17
36
  *
18
37
  * The objects live on the runner, not in `start`, so a stop and a start serve the same
19
38
  * ones, as a driver's repositories outlive its process.
20
39
  */
21
- export declare function counterScopeStoreRunner(): ScopeStoreRunner;
40
+ export declare function counterScopeStoreRunner(options?: CounterRunnerOptions): ScopeStoreRunner;
22
41
  //# sourceMappingURL=counter-runner.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"counter-runner.d.ts","sourceRoot":"","sources":["../src/counter-runner.ts"],"names":[],"mappings":"AACA,OAAO,EAA2D,KAAK,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACtH,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAQhF,eAAO,MAAM,iBAAiB,YAAa,MAAM,KAAG,aAElD,CAAC;AAEH,0EAA0E;AAC1E,eAAO,MAAM,YAAY,YAAa,iBAAiB,KAAG,MACkC,CAAC;AAK7F;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,uBAAuB,IAAI,gBAAgB,CA6D1D"}
1
+ {"version":3,"file":"counter-runner.d.ts","sourceRoot":"","sources":["../src/counter-runner.ts"],"names":[],"mappings":"AACA,OAAO,EAUL,KAAK,aAAa,EACnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAkB,KAAK,iBAAiB,EAAE,KAAK,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAQrG,eAAO,MAAM,iBAAiB,YAAa,MAAM,KAAG,aAElD,CAAC;AAEH,mGAAmG;AACnG,eAAO,MAAM,YAAY,YAAa,MAAM,KAAG,aAE7C,CAAC;AAEH,0EAA0E;AAC1E,eAAO,MAAM,YAAY,YAAa,iBAAiB,KAAG,MACkC,CAAC;AAgB7F,MAAM,WAAW,oBAAoB;IACnC,+FAA+F;IAC/F,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,GAAE,oBAAyB,GAAG,gBAAgB,CA8H5F"}
@@ -1,5 +1,6 @@
1
1
  import { z } from 'zod';
2
- import { scopeStoreObjectName, storeEraseInput, storeImportInput } from '@substrat-run/contracts';
2
+ import { scopeStoreObjectName, mergeDumpPages, storeCommitStageInput, storeDiscardStageInput, storeEraseInput, storeExportPageInput, storeStagePageInput, STORE_STAGE_MAX_AGE_MS, } from '@substrat-run/contracts';
3
+ import { storeDumpPages } from '@substrat-run/kernel';
3
4
  const incrementInput = z
4
5
  .object({ by: z.number().int().nonnegative().optional(), subjectId: z.string().min(1).optional() })
5
6
  .optional();
@@ -8,9 +9,21 @@ const counterRow = z.tuple([z.string().min(1).nullable(), z.number().int().nonne
8
9
  export const invalidStoreInput = (message) => ({
9
10
  error: { code: 'validation_failed', status: 400, body: { message } },
10
11
  });
12
+ /** A stage the object does not hold, or one it will not take again: 409 `stage_refused` (D-69). */
13
+ export const stageRefused = (message) => ({
14
+ error: { code: 'stage_refused', status: 409, body: { message } },
15
+ });
11
16
  /** The object an address names: the same string the hosted path signs. */
12
17
  export const objectNameOf = (address) => scopeStoreObjectName(address.tenantId, address.vertical, address.scopeId, address.binding);
18
+ const COUNTER_DDL = 'CREATE TABLE counter (subject TEXT, n INTEGER NOT NULL)';
19
+ const COUNTER_COLUMNS = ['subject', 'n'];
13
20
  const totalOf = (object) => [...(object?.values() ?? [])].reduce((sum, n) => sum + n, 0);
21
+ /** What a stage holds, as the counter measures it: the sum of its rows' counts. */
22
+ const stagedTotalOf = (pages) => pages
23
+ .flat()
24
+ .filter((table) => table.name === 'counter')
25
+ .flatMap((table) => table.rows)
26
+ .reduce((sum, row) => sum + (typeof row[1] === 'number' ? row[1] : 0), 0);
14
27
  /**
15
28
  * The trivial driver (#2213, RFC §7): a counter per address, in the process. The
16
29
  * reference runner both contract suites use, and the one the runner suite holds to
@@ -20,20 +33,42 @@ const totalOf = (object) => [...(object?.values() ?? [])].reduce((sum, n) => sum
20
33
  * negative). Each increment is kept against the subject it names, so the object holds
21
34
  * personal data the way a real driver does: `substrat.erase` removes that subject's part
22
35
  * and answers `{ erased: 1 }` only if there was one, so a repeat, or a subject that
23
- * never wrote, answers 0. A wipe or an import replaces everything, subjects included.
24
- * `substrat.size` reports the total as `bytes`: a stand-in for storage, never negative.
36
+ * never wrote, answers 0. A wipe or a commit replaces everything, subjects included.
37
+ * `substrat.size` reports the total, and what its stage holds, as `bytes`: a stand-in for
38
+ * storage, never negative.
39
+ *
40
+ * Its dump moves in pages (D-69), one table of rows cut by `maxBytes` with the kernel's own page
41
+ * accounting (UTF-8 bytes, the table heading, always one row), so the contract is shown on a driver
42
+ * written in TypeScript as well as on one in Python. The revision counts every change to what the
43
+ * dump holds: an increment, a commit, a wipe, and an erase that erased something. A stage unused for
44
+ * longer than `STORE_STAGE_MAX_AGE_MS` is dropped no later than the next call to its object, by the
45
+ * injectable clock, so the driver needs no timer. A wipe and an erase drop every stage. A commit
46
+ * answers the count of distinct tables, and asked again for the stage last committed it answers the
47
+ * same count and changes nothing; only a wipe ends that memory, and a stage id that was committed is
48
+ * not taken again. A stage the object does not hold is refused with 409 `stage_refused`. It takes
49
+ * only rows of its `counter` table and refuses any other table or a negative count when they are
50
+ * staged. Its pages have no row limit of their own, so it never refuses a row it gave.
25
51
  *
26
52
  * The objects live on the runner, not in `start`, so a stop and a start serve the same
27
53
  * ones, as a driver's repositories outlive its process.
28
54
  */
29
- export function counterScopeStoreRunner() {
55
+ export function counterScopeStoreRunner(options = {}) {
56
+ const now = options.now ?? Date.now;
30
57
  const objects = new Map();
58
+ const revisions = new Map();
59
+ const stages = new Map();
60
+ const committed = new Map();
61
+ const wrote = (id) => revisions.set(id, (revisions.get(id) ?? 0) + 1);
31
62
  return {
32
63
  driver: 'counter',
33
64
  async start() { },
34
65
  async stop() { },
35
66
  async invoke(address, request) {
36
67
  const id = objectNameOf(address);
68
+ // An abandoned stage is dropped by the next call to its object: no timer.
69
+ const held = stages.get(id);
70
+ if (held && now() - held.touchedAt > STORE_STAGE_MAX_AGE_MS)
71
+ stages.delete(id);
37
72
  const object = objects.get(id);
38
73
  switch (request.operation) {
39
74
  case 'read':
@@ -46,38 +81,93 @@ export function counterScopeStoreRunner() {
46
81
  const next = object ?? new Map();
47
82
  next.set(subject, (next.get(subject) ?? 0) + (input.data?.by ?? 1));
48
83
  objects.set(id, next);
84
+ wrote(id);
49
85
  return { result: totalOf(next) };
50
86
  }
51
87
  case 'substrat.size':
52
- return { result: { bytes: totalOf(object) } };
88
+ return { result: { bytes: totalOf(object) + stagedTotalOf(stages.get(id)?.pages ?? []) } };
89
+ case 'substrat.selfcheck':
90
+ return { result: { operations: ['increment', 'read'] } };
53
91
  case 'substrat.wipe':
54
92
  objects.delete(id);
93
+ stages.delete(id);
94
+ committed.delete(id);
95
+ wrote(id);
55
96
  return { result: {} };
56
97
  case 'substrat.erase': {
57
98
  const input = storeEraseInput.safeParse(request.input);
58
99
  if (!input.success)
59
100
  return invalidStoreInput('substrat.erase takes { subjectId }');
60
- return { result: { erased: object?.delete(input.data.subjectId) ? 1 : 0 } };
101
+ const erased = object?.delete(input.data.subjectId) ? 1 : 0;
102
+ // A stage may hold the subject: a restore racing this erase fails at its commit. What was last
103
+ // committed is still committed, so a lost commit answer can be retried across the erase.
104
+ stages.delete(id);
105
+ if (erased)
106
+ wrote(id);
107
+ return { result: { erased } };
61
108
  }
62
- case 'substrat.export':
109
+ case 'substrat.export-page': {
110
+ const input = storeExportPageInput.safeParse(request.input);
111
+ if (!input.success)
112
+ return invalidStoreInput('substrat.export-page takes { cursor, maxBytes }');
113
+ const rows = [...(object ?? [])].map(([subject, n]) => [subject, n]);
114
+ const start = input.data.cursor === null ? 0 : Number(input.data.cursor);
115
+ if (!Number.isInteger(start) || start < 0)
116
+ return invalidStoreInput('substrat.export-page: the cursor is not one this store gave');
117
+ const [first] = storeDumpPages([{ name: 'counter', ddl: COUNTER_DDL, columns: COUNTER_COLUMNS, rows: rows.slice(start) }], input.data.maxBytes);
118
+ const page = first[0];
119
+ const end = start + page.rows.length;
63
120
  return {
64
121
  result: {
65
- tables: [
66
- {
67
- name: 'counter',
68
- ddl: 'CREATE TABLE counter (subject TEXT, n INTEGER NOT NULL)',
69
- columns: ['subject', 'n'],
70
- rows: [...(object ?? [])].map(([subject, n]) => [subject, n]),
71
- },
72
- ],
122
+ tables: [page],
123
+ next: end < rows.length ? String(end) : null,
124
+ revision: String(revisions.get(id) ?? 0),
73
125
  },
74
126
  };
75
- case 'substrat.import': {
76
- const input = storeImportInput.safeParse(request.input);
127
+ }
128
+ case 'substrat.stage-page': {
129
+ const input = storeStagePageInput.safeParse(request.input);
77
130
  if (!input.success)
78
- return invalidStoreInput('substrat.import takes { tables }');
131
+ return invalidStoreInput('substrat.stage-page takes { stageId, seq, tables }');
132
+ const { stageId, seq, tables } = input.data;
133
+ if (committed.get(id)?.stageId === stageId)
134
+ return stageRefused(`stage ${stageId} was committed, and an id is not used again`);
135
+ // Only counter rows come in, so a staged count is never negative and size is never wrong.
136
+ const foreign = tables.find((one) => one.name !== 'counter');
137
+ if (foreign)
138
+ return invalidStoreInput(`a counter store has one table, counter, not ${foreign.name}`);
139
+ if (!z.array(counterRow).safeParse(tables.flatMap((one) => one.rows)).success) {
140
+ return invalidStoreInput('a counter row is [subject or null, a non-negative integer]');
141
+ }
142
+ // Page 0 of a new stage drops any other.
143
+ if (seq === 0 && stages.get(id)?.stageId !== stageId)
144
+ stages.set(id, { stageId, pages: [], touchedAt: now() });
145
+ const stage = stages.get(id);
146
+ if (stage?.stageId !== stageId)
147
+ return stageRefused(`no stage ${stageId} to add page ${seq} to`);
148
+ stage.touchedAt = now();
149
+ if (seq < stage.pages.length)
150
+ return { result: { staged: false } };
151
+ if (seq > stage.pages.length)
152
+ return invalidStoreInput(`stage ${stageId} holds ${stage.pages.length} pages, not ${seq}`);
153
+ stage.pages.push(tables);
154
+ return { result: { staged: true } };
155
+ }
156
+ case 'substrat.commit-stage': {
157
+ const input = storeCommitStageInput.safeParse(request.input);
158
+ if (!input.success)
159
+ return invalidStoreInput('substrat.commit-stage takes { stageId }');
160
+ const stage = stages.get(id);
161
+ if (stage?.stageId !== input.data.stageId) {
162
+ // The stage last committed answers again with the same count, and changes nothing.
163
+ const last = committed.get(id);
164
+ if (last?.stageId === input.data.stageId)
165
+ return { result: { tables: last.tables } };
166
+ return stageRefused(`no stage ${input.data.stageId} to commit`);
167
+ }
168
+ const tables = mergeDumpPages(stage.pages);
79
169
  // The whole object is replaced: no counter table is an empty object.
80
- const rows = z.array(counterRow).safeParse(input.data.tables.find((one) => one.name === 'counter')?.rows ?? []);
170
+ const rows = z.array(counterRow).safeParse(tables.find((one) => one.name === 'counter')?.rows ?? []);
81
171
  if (!rows.success)
82
172
  return invalidStoreInput('a counter row is [subject or null, a non-negative integer]');
83
173
  // A dump names each row key once: a repeated subject is refused, never folded or dropped.
@@ -85,7 +175,19 @@ export function counterScopeStoreRunner() {
85
175
  if (next.size !== rows.data.length)
86
176
  return invalidStoreInput('a counter table names each subject once');
87
177
  objects.set(id, next);
88
- return { result: { tables: input.data.tables.length } };
178
+ stages.delete(id);
179
+ committed.set(id, { stageId: input.data.stageId, tables: tables.length });
180
+ wrote(id);
181
+ return { result: { tables: tables.length } };
182
+ }
183
+ case 'substrat.discard-stage': {
184
+ const input = storeDiscardStageInput.safeParse(request.input);
185
+ if (!input.success)
186
+ return invalidStoreInput('substrat.discard-stage takes { stageId }');
187
+ const dropped = stages.get(id)?.stageId === input.data.stageId;
188
+ if (dropped)
189
+ stages.delete(id);
190
+ return { result: { discarded: dropped } };
89
191
  }
90
192
  default:
91
193
  return { error: { code: 'unknown_operation', status: 400 } };
@@ -1 +1 @@
1
- {"version":3,"file":"counter-runner.js","sourceRoot":"","sources":["../src/counter-runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,gBAAgB,EAAsB,MAAM,yBAAyB,CAAC;AAGtH,MAAM,cAAc,GAAG,CAAC;KACrB,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC;KAClG,QAAQ,EAAE,CAAC;AACd,8FAA8F;AAC9F,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;AAE3F,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,OAAe,EAAiB,EAAE,CAAC,CAAC;IACpE,KAAK,EAAE,EAAE,IAAI,EAAE,mBAAmB,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,EAAE;CACrE,CAAC,CAAC;AAEH,0EAA0E;AAC1E,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,OAA0B,EAAU,EAAE,CACjE,oBAAoB,CAAC,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;AAE7F,MAAM,OAAO,GAAG,CAAC,MAAsD,EAAU,EAAE,CACjF,CA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IAAI,CAAC,KAAK,CAAC,OAAO;wBAAE,OAAO,iBAAiB,CAAC,0CAA0C,CAAC,CAAC;oBACzF,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,OAAO,KAAK,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC;oBAC/D,IAAI,OAAO;wBAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;oBAC/B,OAAO,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,CAAC;gBAC5C,CAAC;gBACD;oBACE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,mBAAmB,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE,CAAC;YACjE,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"directory-audit-suite.d.ts","sourceRoot":"","sources":["../src/directory-audit-suite.ts"],"names":[],"mappings":"AAKA,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAG5D;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,SAAS,CAAC;IAChB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACzC,8FAA8F;IAC9F,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;IAC/C;;;;OAIG;IACH,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1B;AAumBD;;;;GAIG;AACH,wBAAgB,mCAAmC,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC,qBAAqB,CAAC,GAAG,IAAI,CAomBhI"}
1
+ {"version":3,"file":"directory-audit-suite.d.ts","sourceRoot":"","sources":["../src/directory-audit-suite.ts"],"names":[],"mappings":"AAKA,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAG5D;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,SAAS,CAAC;IAChB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACzC,8FAA8F;IAC9F,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;IAC/C;;;;OAIG;IACH,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1B;AAsnBD;;;;GAIG;AACH,wBAAgB,mCAAmC,CAAC,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC,qBAAqB,CAAC,GAAG,IAAI,CAomBhI"}
@@ -351,6 +351,21 @@ const CASES = [
351
351
  };
352
352
  },
353
353
  },
354
+ {
355
+ // #2351: the digest of the migrations read from a version's bundle.
356
+ action: 'recordMigrationsExtracted',
357
+ write: { table: 'vertical_versions', verb: 'UPDATE' },
358
+ arrange: async (host, staff) => {
359
+ const slug = await newVertical(host, staff);
360
+ const version = await publish(host, staff, slug);
361
+ return {
362
+ call: () => host.admin.recordMigrationsExtracted(staff, slug, version, 'e'.repeat(32)),
363
+ state: () => host.admin.versionMigrationsExtracted(staff, slug, version),
364
+ changed: 'e'.repeat(32),
365
+ row: { before: null, after: { vertical: slug, versionId: version, digest: 'e'.repeat(32) } },
366
+ };
367
+ },
368
+ },
354
369
  // #2526: the role, grant and org writes at a tenant node.
355
370
  {
356
371
  action: 'defineRole',